Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why can't I set a variable to cancel in applescript

I give props to apple for making an easy to use scripting language but I was recently creating a shortcut and encountered a minor but important question/problem. For what ever reason it won't let me set a variable to cancel. Here is my script:

set myUrl to "my email url, which u are not privy to"

set "Stop" to "Cancel"

try

display dialog myUrl & "Go to your E-MAIL" with title "GO?" with icon go buttons {"Stop", "Go to site"} default button 2

if button returned of result is "Go to site" then

tell application "Safari" to makenewdocumentwith properties {URL:myUrl}

end if

end try

SYNTAX ERROR:

Can’t set "Yo mama" to "Cancel". Access not allowed.

MacBook Air, null

Posted on May 27, 2015 2:14 PM

Reply
1 reply

Why can't I set a variable to cancel in applescript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.