Scope/Context issue?
Scope/Context issue?
- Subject: Scope/Context issue?
- From: Skeeve <email@hidden>
- Date: Tue, 05 Feb 2008 01:32:24 +0100
The originating question (in German) is here
http://www.fischer-bayern.de/phpBB2/viewtopic.php?t=2665
I have a ScriptA
-- -- -- -- -- -- -- --
property cntr : 0
on run
set my cntr to (my cntr) + 1
display dialog "A says: " & cntr
end run
-- -- -- -- -- -- -- --
Saved as an APPlication
And a ScriptB
-- -- -- -- -- -- -- --
on run
set a to load script file "Macintosh
HD:Users:skeeve:Desktop:iScript:ScriptA.app"
tell a to run
end run
-- -- -- -- -- -- -- --
Now each time I run ScriptA, "cntr" gets incremented.
But running ScriptB, which in turn runs ScriptA, doesn't increment the
counter. Okay. It does, but it's forgotten when you start again.
Can someone explain the background?
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden