I am wondering if there is anyway around writing all the options for
this in if statements.
This works fine..
set anitem to choose file
tell app "QuarkXPress"
open anitem use doc prefs ask
end tell
What I would like to be able to do.... This gives me an error
"QuarkXPress got an error: Can't make some data into the expected type."
set docPrefs to "ask"
set anitem to choose file
tell app "QuarkXPress"
open anitem use doc prefs (docPrefs) as string
end tell
I know I could do this.. but it seems kinda inefficient
set docPrefs to "ask"
set anitem to choose file
if docPrefs is "ask"
tell app "QuarkXPress"
open anitem use doc prefs (docPrefs) as string
end tell
end if
I could write this in if statements but when you combine that with
the 5 or 6 other options it could end up being a fair size chunk of
code.