Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ACC not working with MacromediaFlash :(( UPDATED!!!!
#1
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
Code:
Copy      Help
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)
#2
This works
Macro
Code:
Copy      Help
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
Code:
Copy      Help
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)
#3
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..
#4
it is not possible
#5
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
Code:
Copy      Help
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)
#6
I did not find a way. Works only if mouse is over the object.
#7
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?
#8
1, 2 - no
#9
Alright thanks for ur time.. ill try and figure something out
#10
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
Code:
Copy      Help
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)
#11
Quote:Is there a way to select a certain window if they all share same id?

Use match index with function child().
#12
Ok thank you will give it a try
#13
KINGMOFO Wrote:Macro
Code:
Copy      Help
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?
#14
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
Code:
Copy      Help
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)
#15
nvm it was figure out


Forum Jump:


Users browsing this thread: 1 Guest(s)