bobbby Posted May 9, 2010 Share Posted May 9, 2010 I have created a gui with an IECreateEmbedded. And the flash works good and all. Then i have added a controlclick to test-click on a button, When the checkbox is pressed. I also have that in an while loop. But now it seems like it clicks, but not on the position that i have added in the controlclick. And it's impossible to disable the checkbox now. Here is the code, if someone can see what i do wrong. I just want it to click on the smileys. Join an empty room and u will se the smileys. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\derpderp.ico #AutoIt3Wrapper_outfile=everybody.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <IE.au3> Opt("MouseCoordMode", 2) Opt("WinTitleMatchMode", 4) Opt("TrayMenuMode",1) $exit = TrayCreateItem("Quit") TraySetState() _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () $window = GUICreate("Everybody", 786, 536,-1,-1,bitor($WS_VISIBLE,$WS_CLIPSIBLINGS,$WS_CLIPCHILDREN,$WS_BORDER,$WS_MINIMIZEBOX,$WS_MAXIMIZEBOX)) guisetbkcolor(0x242424) $Cbox1 = GUICtrlCreateCheckbox("Smiley", 668, 70, 64, 18, BitOR($BS_PUSHLIKE,$WS_TABSTOP)) $Ac = GUICtrlCreateObj($oIE, 0, 0, 640, 520) GUICtrlSetBkColor($Ac,0x242424) GUISetState() _IENavigate ($oIE, "http://c.nonoba.com/gvf/22407-1-9553-gv.kxKQWcnN2ix5ymvNqcIa0.8kZkw.swf") While 1 $msg = GUIGetMsg() $msg1 = TrayGetMsg() if $msg = $GUI_EVENT_CLOSE or $msg1 = $exit then ExitLoop EndIf if BitAnd(GUICtrlRead($Cbox1),$GUI_CHECKED) == 1 Then ControlClick("Everybody","","[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]","left",1,50,50) EndIf WEnd GUIDelete() Exit Link to comment Share on other sites More sharing options...
JohnOne Posted May 9, 2010 Share Posted May 9, 2010 try ControlClick($Ac,"","[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]","left",1,50,50) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
bobbby Posted May 10, 2010 Author Share Posted May 10, 2010 try ControlClick($Ac,"","[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]","left",1,50,50) Now i can click on the button, but i can't fix so it's click on the smiley. Link to comment Share on other sites More sharing options...
shortiee4 Posted September 16, 2010 Share Posted September 16, 2010 Now i can click on the button, but i can't fix so it's click on the smiley. I realize this is an old thread but just in case anyone else stumbles across this like I did then here's some logic for you. This is really what I hate to see: people most likely giving up because they couldn't get that one answer to help them... or maybe it's people who don't understand the full capabilities of autoit (Not flaming, just saying... I'm here to help ). Well, here you go: The PixelSearch Function! (Yes, this is just the example from the functions page. I'm going to link you to it here though so more people know about it, it has helped me tremendously.) ; Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf ; Find a pure red pixel or a red pixel within 10 shades variations of pure red $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf You can find a color picker app to figure out the exact color you need to search for. This way you can just make a rectangle around the area that you want to search and the function will return the x, y coords for you of that pixel, just make sure to choose your color wisely - that makes all of the difference. Source: http://www.autoitscript.com/autoit3/docs/functions/PixelSearch.htm Functions Listing: http://www.autoitscript.com/autoit3/docs/functions.htm Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now