So the below code does not work when the get function is called. Basically each time it goes in the repeat the \v doesn’t work on a menu I am clicking on and then trying to move down it. It’s like the \v is not recognized. Don’t worry about the else part it is the if part that has the problem.
“RepeatKey”.get("\v",2,false)
on get params
set key to item 1 of params
set cnt to item 2 of params
if item 3 of params equals false then
repeat cnt times
Wait 0.5 Seconds
TypeText key
end repeat
TypeText return
else
repeat cnt times
Wait 0.5 Seconds
TypeText key & return
end repeat
end if
end get
Now the wierd thing I have discovered is that it works fine if the function is modified a little bit like below. I think the problem is that a single character code passed in a variable does not function properly in Eggplant.
on get params
set key to item 1 of params
set cnt to item 2 of params
if item 3 of params equals false then
repeat cnt times
set string to string & key
(*Wait 0.5 Seconds
TypeText key*)
end repeat
log string
TypeText string & return
else
repeat cnt times
Wait 0.5 Seconds
TypeText key & return
end repeat
end if
end get
Any ideas of why this is behaving like this?