Re: tell Grog to glog
Re: tell Grog to glog
- Subject: Re: tell Grog to glog
- From: Axel Luttgens <email@hidden>
- Date: Sun, 07 Jan 2007 10:50:57 +0100
On 7/01/07 2:22, Gil Dawson wrote:
Hi--
[...]
Can someone please help me interpret this message?
The "Connection is invalid" message indicates that the caller script was
still expecting something from Grog when the latter quit.
Looks like having Grog.app to display some dialog when launched hinders
a response to get returned to the caller script.
(don't remember whether this always has been the case...)
Given the above, something like this works:
======== Grog =========
global StartTime
on run
set StartTime to (current date)
activate
display dialog "Grog launched." giving up after 1
end run
on glog(s)
activate
display dialog "Grog called with " & ¬
s & ¬
" as a parameter."
end glog
on idle
if (current date) > (StartTime + 10) then quit
return 5 -- check again in five seconds
end idle
=======================
==== Caller script ====
-- Allow Grog.app to initialize.
ignoring application responses
tell application "Grog" to run
delay 2
end ignoring
-- Use Grog.app's script.
tell application "Grog"
glog("xxx")
glog("yyy")
end tell
=======================
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden