I'm getting this error when trying to change the title of a button, and Im not sure what I'm missing....
Cant set «class butT» "off" of window "window" to "on". (-10006)
this works to change the button from on to off when clicked.....
if title of theObject = "on" then
set title of button "on" of window "window" to "off"
end if
but adding an else statement to change it back results in the error
if title of theObject = "on" then
set title of button "on" of window "window" to "off"
else if title of theObject = "off" then
set title of button "off" of window "window" to "on"
end if
any thoughts?
Cant set «class butT» "off" of window "window" to "on". (-10006)
this works to change the button from on to off when clicked.....
if title of theObject = "on" then
set title of button "on" of window "window" to "off"
end if
but adding an else statement to change it back results in the error
if title of theObject = "on" then
set title of button "on" of window "window" to "off"
else if title of theObject = "off" then
set title of button "off" of window "window" to "on"
end if
any thoughts?