Second Call to Non-Stay-Open Script App Fails
Second Call to Non-Stay-Open Script App Fails
- Subject: Second Call to Non-Stay-Open Script App Fails
- From: "S. J. Cunningham" <email@hidden>
- Date: Wed, 04 Jun 2014 04:12:05 -0400
Applescript Dudes:
Can someone explain to me why the second call to this non-stay-open script app fails:
================
property dsa : application "Data Storage App"
launch dsa
set currentValue to dsa's getTestProperty()
display dialog "Current value is: " & currentValue
set currentValue to dsa's getTestProperty() -- second call fails if app isn't stay-open
display dialog "Current value is: " & currentValue
===================
The "Data Storage App" is
===================
property testProperty : "initial Value"
on getTestProperty()
return testProperty
end getTestProperty
on setTestProperty(newValue)
set testProperty to newValue
return
end setTestProperty
====================
I thought the whole point of "launch" was to open an app without calling it's run handler. I know I can make this work by making the app stay-open but I don't understand why I have to. Note that adding a second "launch" before the second call meets with the same failure.
Thanks.
Steve
_______________________________________________
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