Hi ,
iam using a variable say “var1”
set var1 to “name”
Click (Text:var1,TextSize:“13”,TextBackgroundColor:(232,232,232),TextColor:(0,0,0),TextFont:“LucidaGrande”,Hotspot:(300,0))
but my screen has the keyword as NAME ( i.e )
when i run the script
Click (Text:var1,TextSize:“13”,TextBackgroundColor:(232,232,232),TextColor:(0,0,0),TextFont:“LucidaGrande”,Hotspot:(300,0))
it has to click on NAME field on my screen irrespective of the case i use , can any one please help me out on this.
Thanks in Advance
You can chain together text image property lists just like you can put multiple images in a command, and you can execute a SenseTalk function inside the property list as well, so your command could look like this:
Click (Text:var1,TextSize:"13",TextBackgroundColor:(232,232,232),TextColor:(0,0,0),TextFont:"LucidaGrande",Hotspot:(300,0)), (Text:uppercase(var1),TextSize:"13",TextBackgroundColor:(232,232,232),TextColor:(0,0,0),TextFont:"LucidaGrande",Hotspot:(300,0))
This would allow Eggplant to click on the string in your variable regardless of whether it was all lowercase or all uppercase. You could further simplify this by creating a style for your text (in the Text Preferences) so that the code would become:
Click (Text:var1,TextStyle:"MyStyle",Hotspot:(300,0)), (Text:uppercase(var1),TextStyle:"MyStyle",Hotspot:(300,0))