run script not setting script property
run script not setting script property
- Subject: run script not setting script property
- From: Ken Tozier <email@hidden>
- Date: Sun, 7 Sep 2003 05:02:20 -0400
I wrote a script which works fine in script editor, but when run using
the "run script" scripting addition, a critical property isn't getting
set inside the target script. Anyone have experience with this problem
in "run script"?
Here's a snippet showing basically what I'm trying to do...
Note: all code prefixed with "PM" is a call to one of my own scripting
additions. I know the problem isn't with the my additions as they've
been battle tested for over 5 years in a heavy newspaper production
environment. It's something with run script.
property lastSearchInfo:{searchString:"", resultNameList:{},
resultAliasList:{}}
on DoSearch( inCatalogAlias )
-- Grab results of last search from the catalog for display in a
FaceSpan dialog
set lastSearchInfo to PM get resource {rez container: inCatalogAlias,
rez type:"INFO", rez name:"last search info"}
-- Do new search here
(FaceSpan dialog saves it's searches into lastSearchInfo by doing a
set my lastSearchInfo to ...)
-- Save the new search info back to the catalog
PM put resource {rez container: inCatalogAlias, rez type:"INFO", rez
name:"last search info", rez data: lastSearchInfo}
end
As mentioned before, this runs fine in script editor, but if run using
"run script", no dice. "lastSearchInfo" isn't updated at the "PM get
resource" call. Does "run script" not allow setting of non-empty
properties? If anyone has suggestions, I could sure use them. I've been
toiling away at this one for more than 10 hours.
Thanks,
Ken Tozier
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.