Hi,
I have a problem that totally confuses me… Near the start of the script, there is a piece of script that says "display window “license” attached to window “chooser”. Now, when that runs, I get the error “NSCannotCreateScriptCommandError (10)”. If I remove the “attached to” statement, it works fine. I can’t see anything wrong with the script, but maybe someone on here is clever enough to spot an error.
on launched appstart
set configwin to window "config"
set license to window "license"
set mainw to window "main"
set regwin to window "registerwin"
-- display License
tell user defaults
if default entry "configon" exists then
set nol to contents of default entry "license"
if nol equals 0 -- display the panel
display license attached to window "chooser"
delay 0.1
tell license
set state of button "nol" to nol
end tell
end if
set hasrestart to contents of default entry "Restart"
if hasrestart equals "You Bet"
tell mainw
set contents of text field "restarttext" of tab view item "welcome" of tab view "maintabs" to "You don't need to restart"
set visible of button "reboot" of tab view item "welcome" of tab view "maintabs" to false
end tell
else
tell mainw
set contents of text field "restarttext" of tab view item "welcome" of tab view "maintabs" of mainw to "You must restart your Mac by clicking the restart button below."
end tell
end if
else
display configwin
end if
end tell
end launched
Thanks for your time!!
-Elijah