Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to macro and kind of confused.
#1
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.

Code:
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.
#2
Create function SendKeysToWindow. Its code is here:
pasting to notepad (when notepad is in background)

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

Macro for your window would be like this:
Macro Macro2206
Code:
Copy      Help
int w1=act(win("EverQuest" "_EverQuestwndclass"))
int c1=child ;;the focused control
rep
,SendKeysToWindow c1 key(E)
,wait 5.2
#3
For some weird reason i'm getting Unknown identifier for SendKeysToWindows.
#4
Need to create function SendKeysToWindow. It must be function, not macro.
#5
Created a new functiion, copy pasted it, get the same error : "Error in Function: unknown identifier" which target SendKeysToWindow.
#6
Create new function named SendKeysToWindow, and paste SendKeysToWindow code from the link.
pasting to notepad (when notepad is in background)
#7
Hmm, the notepad one work... the EQ one doesn't... so I guess the program is preventing macro?
#8
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: 4 Guest(s)