Jump to content
Sign in to follow this  

controlclick and IECreateEmbedded

Recommended Posts

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.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <IE.au3>

Opt("MouseCoordMode", 2)
Opt("WinTitleMatchMode", 4)

$exit = TrayCreateItem("Quit")

_IEErrorHandlerRegister ()

$oIE = _IECreateEmbedded ()
$Cbox1 = GUICtrlCreateCheckbox("Smiley", 668, 70, 64, 18, BitOR($BS_PUSHLIKE,$WS_TABSTOP))
$Ac = GUICtrlCreateObj($oIE, 0, 0, 640, 520)

_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

    if BitAnd(GUICtrlRead($Cbox1),$GUI_CHECKED) == 1 Then
        ControlClick("Everybody","","[CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]","left",1,50,50)


Share this post

Link to post
Share on other sites


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.

Share this post

Link to post
Share on other sites

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])

; 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])

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

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...