NSCannotCreateScriptCommandError (10)
NSCannotCreateScriptCommandError (10)
- Subject: NSCannotCreateScriptCommandError (10)
- From: Steve Foster <email@hidden>
- Date: Thu, 16 Dec 2004 18:19:46 +0000
Hi
I am going crazy with this and hopefully someone can point me in the right direction
I have a function which I will need to call a number of times so want to keep it separate and only write the piece of code once. What I want to work is this:
on choose menu item theObject
if the name of theObject is "Prefs" then
show window "Prefs"
readSettings() --This should then call the block of script below
end if
end choose menu item
on readSettings()
tell user defaults
set strTemplates to contents of default entry "DopTemplatesFolder" of user defaults
end tell
end readSettings
The trouble is it is giving me the following error:
NSCannotCreateScriptCommandError (10)
If a place the script inside the other statement as below it works fine but it is impractical as I need to call the same script in various places
on choose menu item theObject
if the name of theObject is "Prefs" then
show window "Prefs"
set strTemplates to contents of default entry "DopTemplatesFolder" of user defaults
end if
end choose menu item
I am working in Applescript Studio XCode 1.1
Any ideas
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:
This email sent to email@hidden