Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to macro and kind of confused.
Hi, I've ben trying many maccro... but i just can't get this one working lol.

I want to sendkey to a windows in the background, as I navigate or do something else.

So in general, the basi c is , I need to send the END key to the windows of everquest, wait 5.2second and repeat.

I can somehow get it to work if the windows is active , but not in the background.

Copy      Help
rep 2
    int w1=act(win("EverQuest" "_EverQuestwndclass"))
'E              ;; End
wait 5.2

is the code, when I press it, it does cast but wont repeat either.
Create function SendKeysToWindow. Its code is here:
pasting to notepad (when notepad is in background)

Then try this macro with Notepad:
Macro Macro2207
Copy      Help
int w1=act(win("Untitled - Notepad" "Notepad")) ;;to test
int c1=child ;;the focused control
,SendKeysToWindow c1 key(a)
;You can activate some other window, this macro will still work.

Macro for your window would be like this:
Macro Macro2206
Copy      Help
int w1=act(win("EverQuest" "_EverQuestwndclass"))
int c1=child ;;the focused control
,SendKeysToWindow c1 key(E)
,wait 5.2
For some weird reason i'm getting Unknown identifier for SendKeysToWindows.
Need to create function SendKeysToWindow. It must be function, not macro.
Created a new functiion, copy pasted it, get the same error : "Error in Function: unknown identifier" which target SendKeysToWindow.
Create new function named SendKeysToWindow, and paste SendKeysToWindow code from the link.
pasting to notepad (when notepad is in background)
Hmm, the notepad one work... the EQ one doesn't... so I guess the program is preventing macro?
Not all programs/windows support the send-keys method used by SendKeysToWindow.
Other way would be to run the program on other computer, real or virtual.
I don't know other ways to send keys to background windows.

Forum Jump:

Users browsing this thread: 1 Guest(s)