• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: tell Grog to glog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: tell Grog to glog
      • From: Gil Dawson <email@hidden>
References: 
 >RE: AS and Unicode characters (From: KOENIG Yvan <email@hidden>)
 >Re: AS and Unicode characters (From: "Mark J. Reed" <email@hidden>)
 >Re: AS and Unicode characters (From: KOENIG Yvan <email@hidden>)
 >tell Grog to glog (From: Gil Dawson <email@hidden>)

  • Prev by Date: tell Grog to glog
  • Next by Date: Re: Mail.app "reply" verb returning nothing
  • Previous by thread: tell Grog to glog
  • Next by thread: Re: tell Grog to glog
  • Index(es):
    • Date
    • Thread