Simple task, need help

Discuss RoboTask here
Post Reply
fusiongt
Posts: 2
Joined: Sat Aug 11, 2007 2:01 am

Simple task, need help

Post by fusiongt »

I have a simple task but I need help on it.

I want to send keystrokes to a window. My keystrokes are something like "send me #"

After "#" I want to have a number that I specify, and I want that number to increase by +1 each time the event is triggered.

Then after that I want the information to be entered with the enter button.

My triggering event is a cycle that goes ever 60 seconds. So what I want is when it's activated to go something like this:

1. Event is activated
2. Switches to window, types in "send me #"
3. After the "#" something like '1' is added. Then it presses enter.
4. After 60 seconds it does it again, but this type does 'send me #2' and it keeps doing that over and over.


I know it sounds simple but I can't figure it out. Any help would be greatly appreciated!
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Simple task, need help

Post by Oleg »

You easily can do this by using user variable.
Create the variable named MyCounter (for example) with value 0. See menu Options | Variables and go to "User Variables" tab.

Your task will looks so:

Activate window //"Window command" action with focus parameter
Increment variable MyCounter
Send keystroke "send me #{MyCounter}"

But pay attention:
characters: #, %, ^, + are reserved in "Send keystroke" action for key combinations.
In order to send these symbols, use the following combinations
# -> +(3)    i.e. Shift-3
% -> +(5)    i.e. Shift-5
^ -> +(6)    i.e. Shift-6
+ -> +(=)    i.e. Shift-=

In your case your string will be such:
send me +(3){MyCounter}
fusiongt
Posts: 2
Joined: Sat Aug 11, 2007 2:01 am

Simple task, need help

Post by fusiongt »

excellent thanks!
Post Reply