Re: 4D Called from AppleScript

2018-03-06 Thread B.Bippus via 4D_Tech
Maybe you can use 'osascript' via LEP. Like:

-- Displaying a dialog with osascript
osascript -e 'display dialog ""' returns execution error: No user
interaction allowed.

One option is to tell a background process like SystemUIServer to display
the dialog:
answer=$(osascript -e 'try
tell application "SystemUIServer"
set answer to text returned of (display dialog "" default answer "")
end
try
activate application (path to frontmost application as text)
end
answer
end' | tr '\r' '\n')
[[ $answer ]] || exit

You can also tell the frontmost application to display a dialog, but the
dialog isn't shown immediately if the application is not responding. If
MPlayer OS X is frontmost, text dialogs don't accept any keyboard input.
answer=$(osascript -e 'try
tell application (path to frontmost application as text)
text returned of (display dialog "" default answer "")
end
end' | tr '\r' '\n')
[[ $answer ]] || exit


Bernd


2018-03-06 16:07 GMT+01:00 Herr Alexander Heintz via 4D_Tech <
4d_tech@lists.4d.com>:

> Hi Folks,
>
> does anyone know, if it is possible to talk to 4D from AppleScript?
> I have a small application that receives information form a phone system
> and can launch an AppleScript.
> Now I would like this to „talk“ to 4D.
> Any ideas, is it even possible?
>
> Thanks
> Alex
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Called from AppleScript

2018-03-06 Thread Jeremy Roussak via 4D_Tech
That’s the one I had in mind, yes.

Jeremy


Jeremy Roussak
j...@mac.com



> On 6 Mar 2018, at 15:57, Axel Kohlepp via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Miyako: https://github.com/miyako/4d-tips-custom-url
> 
> mfg
> 
> Axel Kohlepp
> 
> Herr Alexander Heintz via 4D_Tech schrieb:
>> Hi Folks,
>> 
>> does anyone know, if it is possible to talk to 4D from AppleScript?
>> I have a small application that receives information form a phone system and 
>> can launch an AppleScript.
>> Now I would like this to „talk“ to 4D.
>> Any ideas, is it even possible?
>> 
>> Thanks
>> Alex

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Called from AppleScript

2018-03-06 Thread Axel Kohlepp via 4D_Tech

Miyako: https://github.com/miyako/4d-tips-custom-url

mfg

Axel Kohlepp

Herr Alexander Heintz via 4D_Tech schrieb:

Hi Folks,

does anyone know, if it is possible to talk to 4D from AppleScript?
I have a small application that receives information form a phone system and 
can launch an AppleScript.
Now I would like this to „talk“ to 4D.
Any ideas, is it even possible?

Thanks
Alex

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Called from AppleScript

2018-03-06 Thread John Baughman via 4D_Tech
I did a couple of quick google searches and found  that AppleScript can send 
HTTP Get/Post requests, SOAP requests, and SQL requests. 4D can respond/consume 
 any of these. 

For example google found for "AppleScript Get and Post requests"…

 
https://stackoverflow.com/questions/12678900/can-applescript-send-get-or-post-requests

Another idea might be to have apple script create xml files that 4D could read. 

There are probably more direct ways to get 4D talking with AppleScript that 
others will quickly point out.

John



> On Mar 6, 2018, at 5:32 AM, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Miyako has something that allows 4D to respond to custom URLs. It was 
> mentioned here recently. You might be able to adapt that.
> 
> Just a thought.
> 
> Jeremy
> 
> 
> Jeremy Roussak
> j...@mac.com
> 
> 
> 
>> On 6 Mar 2018, at 15:07, Herr Alexander Heintz via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Hi Folks,
>> 
>> does anyone know, if it is possible to talk to 4D from AppleScript?
>> I have a small application that receives information form a phone system and 
>> can launch an AppleScript.
>> Now I would like this to „talk“ to 4D.
>> Any ideas, is it even possible?
>> 
>> Thanks
>> Alex
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D Called from AppleScript

2018-03-06 Thread Jeremy Roussak via 4D_Tech
Miyako has something that allows 4D to respond to custom URLs. It was mentioned 
here recently. You might be able to adapt that.

Just a thought.

Jeremy


Jeremy Roussak
j...@mac.com



> On 6 Mar 2018, at 15:07, Herr Alexander Heintz via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hi Folks,
> 
> does anyone know, if it is possible to talk to 4D from AppleScript?
> I have a small application that receives information form a phone system and 
> can launch an AppleScript.
> Now I would like this to „talk“ to 4D.
> Any ideas, is it even possible?
> 
> Thanks
> Alex
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

4D Called from AppleScript

2018-03-06 Thread Herr Alexander Heintz via 4D_Tech
Hi Folks,

does anyone know, if it is possible to talk to 4D from AppleScript?
I have a small application that receives information form a phone system and 
can launch an AppleScript.
Now I would like this to „talk“ to 4D.
Any ideas, is it even possible?

Thanks
Alex

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**