I’ve searched the archives but didn’t see anything that could help out with this.
I have this subroutine which I want to use whenever a user makes an error in using the app:
on setwarningcolor()
tell window "mainWin"
tell box "bxMsg"
set text color of text field "txtMsg" to {65535, 0, 0}
end tell
end tell
end setwarningcolor
This does nothing. I don’t get an error but the text color doesn’t change either. Am I doing something wrong?
Hi,
the syntax ist correct. Are all UI elements named properly?
This works for me.
I assume you are calling the subroutine with a My setwarningcolor() some where else in the script.
So I suspect you have not named the box and text field properly.
Do it in the inspector:
In the tab for identity ( the blue (!) symbol. You will see a Interface Builder identity area. And a Name field. put the name of each object there.
edit…(* note to self, type faster… *)
OK, it did work, briefly, when I clicked on the text box accidentally…:lol:
Maybe I need to put an update in my script?
Eh, now it’s working. I didn’t change anything. Thanks for the help though.