Re: 'include' statement in applescript
Re: 'include' statement in applescript
- Subject: Re: 'include' statement in applescript
- From: Graham Anderson <email@hidden>
- Date: Tue, 25 Jan 2005 16:33:33 -0800
- Resent-date: Tue, 25 Jan 2005 17:25:55 -0800
- Resent-from: Graham Anderson <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
is there some kind of 'idle event' I could use
if (scriptDone is "true")
-- on to the next handler
else
--wait a little more
end if
in my other installer app creater, NSIS, functions run sequentially so
you can do something like:
psuedo-code:
call myDefines
call areWeConnected
call updateCheck
if(uptoDate is "true") then
call buildXMLFile
call launchMovie
else
call timetoUpdate
end if
all of these functions are calling multiple functions within them....
makes the code a bit easier to look at and easier to edit...at least in
my experience :)
so far it seems in applescript, areWeConnected may execute before
myDefines does
So you'll get an error because the variables have not been set yet
at least, this was what I was running into
many thanks
On Jan 25, 2005, at 3:38 PM, Michael Grant wrote:
On Jan 25, 2005, at 4:26 PM, Graham Anderson wrote:
I was doing that before..but if you've got a fairly long script...it
makes it a bit harder to deal with
so, does applescript have some kind of include capability ?
if not, I'll go back to calling handlers within handlers :(
I'm not sure what you mean by include capability, unless it's the load
script function that Brian mentioned. But even with that I don't think
you're safe against parallel execution, depending on what the handler
actually does. If the handler only runs its own code, you should be OK,
but if it runs a command in an application, for example, the parent
script won't wait for that command to finish unless it is actually
waiting for a return value that depends on it. Maybe you could have the
handler return a dummy value based on the result of the external
command, or set a flag and use a repeat until loop.
Michael
-- <http://globalocal.blogspot.com/>
Every human being has the right to communicate in any medium. This
right includes freedom of opinion and expression, and the right to
seek, receive and impart information, regardless of frontiers.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden