Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Targetted Window
#1
Hi all,

I did some quick reading through the first two pages of these forums and through the help, but I'd really appreciate a specific answer to my question even though I suspect I've overlooked something obvious and the answer is fairly simple.

I'd like to be able to run a macro from a keybinding (that part I have set-up) that outputs stuff to a window that is not my current focus window. So I can be browsing in my webbrowser, for instance, and then run this macro to (lets say) output the letters "Hello World" into an already open Notepad process without actually switching focus to the Notepad window.

Is there a way to do this? I saw the stuff about window handles, but didn't see how I could use them to output things to windows that are not my focus.

Thanks!

-Adam
#2
Did you try all 'Set text of ...' in 'Text' dialog in floating toolbar?
#3
Hmm,

So Set Text of Control or Window

just changed the name of the Notepad window to "Hello World" - it didn't actually type Hello World into Notepad.

Did you mean for me to use something else? The other two "Set Text of" options don't appear to do anything close to what I'm going for Sad

-Adam
#4
Because text is in a control, not in the window itself. Use another 'Drag' image to capture the control. Accessible objects also can be used instead.
#5
Function ( Function4 )
Code:
Copy      Help
str Text=
;Hi there.

Text.setwintext(id(15 win("Untitled - Notepad" "Notepad")))
#6
OR

Function ( Function4 )
Code:
Copy      Help
str Text="[]Hi there."

Text.setsel(0 id(15 "Notepad"))

This works like if you were to paste the text into Notepad and doesnt replace the old Text like setwintext does.

Note the id has to be editable for this to work.


Forum Jump:


Users browsing this thread: 1 Guest(s)