Posts: 4
	Threads: 3
	Joined: Feb 2009
	
	
 
	
	
		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)
	 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		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      
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
 
 
	
	
	
		
	Posts: 1,271
	Threads: 399
	Joined: Mar 2003
	
	
 
	
	
		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?
	
	
	
	
	
 
 
	
	
	
		
	Posts: 1,271
	Threads: 399
	Joined: Mar 2003
	
	
 
	
	
		i tried SendKey, but that does not work. even when wmc is visible as window.
i tried
Macro 
wmcRemote 
;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
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		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.