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
**********************************************************************

Reply via email to