Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anonymous window
#1
Hello,

I'm trying to figure out a way to send commands to an inactive window where the Child ID can't be found. So would it be possible to create a Child ID for the window, or is there another way to send commands to an inactive window?

I'm currently using the code for sending commands to the inactive window here pasting to notepad (when notepad is in background)
#2
To send keys or characters to an inactive window, you need to know which child window (or the window itself) would have focus when the window is active. You cannot create a child window. This macro displays focused child or window info. Run it when the window is active. Then use that info in your macro, with function id, child or win.

Macro Macro1294
Trigger F12     Help - how to add the trigger to the macro
Code:
Copy      Help
int w=child
str sc st; int cid
sc.getwinclass(w)
st.getwintext(w)
cid=GetWinId(w)
out "class=%s[]text=%s[]id=%i" sc st cid
#3
i ask here, because i could also test, but am busy.
posting from my old notebook, which is mainly used as television by using windows media center (win 7).
i want to send keystrokes to minimized windows media center.
what do i have to do for that?
pi
#4
i tried SendKey, but that does not work. even when wmc is visible as window.

i tried
Macro wmcRemote
Code:
Copy      Help
;int hwnd=win("Windows Media Center" "eHome Render Window")
int hwnd=child("" "eHome FlipEx Host Window" win("Windows Media Center" "eHome Render Window") 0x1)

SendKey hwnd VK_NEXT
pi
#5
Spy++ shows that wmc uses raw input (WM_INPUT). QM cannot post this message.
Probably you'll have to temporarily activate wmc to press key.


Forum Jump:


Users browsing this thread: 1 Guest(s)