Posts: 57
	Threads: 17
	Joined: Dec 2008
	
	
 
	
	
		Ok hello Qm Forum,
 This post is to anyone that can help me with this.. I have an example code ive put together of basically what i want, but its not seeming to work with windows that use flash and its driving me insane :| I cant figure out why ive tried every thing every acc possible, html you name it.. to my knowledge i cant figure it out. So i ask anyone here esepcially Gint. if you can help me much appreciation is well owed.. The Code is below..
"Simple code to just click Send on yahoo.. what I need is somethng similar but not for yahoo and example of how I can click something on a site that uses flash with out mouse clicks becuase  I think the code looks sloppy when it has to use your mouse.."
Macro 
Acc SendButton=acc("Send" "PUSHBUTTON" win("" "ATL:007C37C0") "Button" "" 0x1001)
int x y w h
SendButton.Location(x y w h)
int b=child(SendButton)
ScreenToClient b +&x
x+w/2; y+h/2 ;;center
int xy=(x&0xffff)|(y<<16)
SendMessage(b WM_LBUTTONDOWN 1 xy)
SendMessage(b WM_LBUTTONUP 0 xy)
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		This works
Macro 
int w1=win("Internet Explorer" "IEFrame")
Htm el=htm("OBJECT" "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" "" w1 0 3 0xA21)
el.Mouse(1 10 10 1)
WM_LBUTTONDOWN works only if the window is active and the mouse is over the flash object.
Macro 
int w1=win("Internet Explorer" "IEFrame")
act w1 ;;works only if IE is active
Htm el=htm("OBJECT" "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" "" w1 0 3 0xA21)
el.Mouse(0 10 10 1) ;;works only if mouse is there
int x y w h
el.Location(x y w h)
int w2=child("" "Internet Explorer_Server" w1)
ScreenToClient w2 +&x
x+w/2; y+h/2 ;;center
int xy=(x&0xffff)|(y<<16)
SendMessage(w2 WM_LBUTTONDOWN 1 xy)
SendMessage(w2 WM_LBUTTONUP 0 xy)
 
 
	
	
	
		
	Posts: 57
	Threads: 17
	Joined: Dec 2008
	
	
 
	
	
		Omg tyvm bro i cannot thank you enough.. maybe do you think in newer versions could you add a find flash option like the acc and html options ?? just a thought..
	
	
	
	
	
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
 
	
	
	
		
	Posts: 57
	Threads: 17
	Joined: Dec 2008
	
	
 
	
	
		Ok one more thing.. yes that code works but kind of counter acts what i wanted to do.. is there a way to make "Macro" click a certain xy on the window without showing the mouse click?? Thats what i really wanted.. if that is possible that is what I was trying to get at in the first post.
Macro 
int x y w h
SendButton.Location(x y w h)
int b=child(SendButton)
ScreenToClient b +&x
x+w/2; y+h/2 ;;center
int xy=(x&0xffff)|(y<<16)
SendMessage(b WM_LBUTTONDOWN 1 xy)
SendMessage(b WM_LBUTTONUP 0 xy)
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		I did not find a way. Works only if mouse is over the object.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 57
	Threads: 17
	Joined: Dec 2008
	
	
 
	
	
		Ok so really any way im going to have to use a mouse click.. Last two questions:
1. If i have to use a lef is there a way to hide the mouse? and could u show me a mini example..
2. And is there anyother was than the one we discuss in earlier post?
	
	
	
	
	
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
 
	
	
	
		
	Posts: 57
	Threads: 17
	Joined: Dec 2008
	
	
 
	
	
		Alright thanks for ur time.. ill try and figure something out
	
	
	
	
	
 
 
	
	
	
		
	Posts: 57
	Threads: 17
	Joined: Dec 2008
	
	
 
	
	
		I had one more question becuase i edited some the code and it opens one of the windows in the game that contains flash, but the program is a exe file so i guess it makes a difference..
Is there a way to select a certain window if they all share same id?? but you can not select them single when you select it becomes a group selection
Macro 
Acc a=acc("" "GRAPHIC" win("Surfing Window" "#32770") "MacromediaFlashPlayerActiveX" "" 0x1000)
int x y w h
a.Location(x y w h)
int b=child(a)
ScreenToClient b +&x
x+w/2; y+h/2 ;;center
int xy=(x&0xffff)|(y<<16)
SendMessage(b WM_LBUTTONDOWN 1 xy)
SendMessage(b WM_LBUTTONUP 0 xy)
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		Quote:Is there a way to select a certain window if they all share same id?
Use match index with function child().
	
 
	
	
	
	
 
 
	
	
	
		
	Posts: 57
	Threads: 17
	Joined: Dec 2008
	
	
 
	
	
		Ok thank you will give it a try
	
	
	
	
	
 
 
	
	
	
		
	Posts: 576
	Threads: 97
	Joined: Aug 2007
	
	
 
	
	
		KINGMOFO Wrote:Macro 
Acc a=acc("" "GRAPHIC" win("Surfing Window" "#32770") "MacromediaFlashPlayerActiveX" "" 0x1000)
int x y w h
a.Location(x y w h)
int b=child(a)
ScreenToClient b +&x
x+w/2; y+h/2 ;;center
int xy=(x&0xffff)|(y<<16)
SendMessage(b WM_LBUTTONDOWN 1 xy)
SendMessage(b WM_LBUTTONUP 0 xy)
just thinking here, can xy be predetermined here to maybe solve your problem?
	
 
	
	
	
	
 
 
	
	
	
		
	Posts: 57
	Threads: 17
	Joined: Dec 2008
	
	
 
	
	
		Gint this code is designed to click the exact center of the button.. how would i make it click a certain x y on the button instead of the exact center..
Macro 
Acc SendButton=acc("Send" "PUSHBUTTON" win("" "ATL:007C37C0") "Button" "" 0x1001)
int x y w h
SendButton.Location(x y w h)
int b=child(SendButton)
ScreenToClient b +&x
x+w/2; y+h/2 ;;center
int xy=(x&0xffff)|(y<<16)
SendMessage(b WM_LBUTTONDOWN 1 xy)
SendMessage(b WM_LBUTTONUP 0 xy)
 
 
	
	
	
		
	Posts: 57
	Threads: 17
	Joined: Dec 2008