Ask for Window to Store into variable.

Discuss RoboTask here
Post Reply
fablefox
Posts: 5
Joined: Tue Jun 20, 2023 5:24 am

Ask for Window to Store into variable.

Post by fablefox »

If I drag "Send Keystrokes" it ask for Current Window or Specified Window, where we can select a window from a long list.

And I think we can make a window 'current' by making it 'Focus' via Window Command and provide a window handle.

I was thinking of making a simple task that either:

a) ask for a string, and I put this string (part of windows name) and robotask will get the window handle and store it into a global variable.

b) ask me to select a window from a long list (like using send keystrokes) and robotask will put the window handle into a global variable.

So if I have 3 app open (notepad, wordpad, vmeditor) I can just run either 'a' task or 'b' task and future send keystores will send it to either this three based on when asked for window name, I put notepad or wordpad or vmeditor.

I tried to test this logic by creating two global variables, WORK_STRING and WORK_HANDLE, where work_string will store text input via input box, while work_handle store the windows handle by getting the handle of the window which title has the work_string.


The reason I need to test this is because i might be working with a lot of text input software (work editor, code editor, etc) where I plan more than 30 x 10 "send keystrokes" stuff need to be done.

So the ability to have a task that ask for string or select a window and store the window_handle for the rest of the send keystrokes to send to would be great.
Post Reply