[HELP] ControlClick in Google chrome ?

06/23/2014 12:22 alexutu2013#1
Hi, I want an example that use controlclick on pixels..in google chrome ...Idk what I have to put in controlID ... sorry my english sucks :(
06/23/2014 15:27 berkay2578#2
[Only registered and activated users can see links. Click Here To Register...]
Code:
ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )
Most of the time you don't need the text or the controlID property. Here is an example:
Code:
$title = "Title of the target Google Chrome tab"
$button = "Mouse button I want to simulate" ;left,right,middle,main,menu,primary,secondary
$numOfClicks = "1" ;number of times to click, 1 should do it most of the time
$xCoord = "700" ;X Coord of the click
$yCoord = "400" ;Y Coord of the click
$click = ControlClick($title, "", "", $button, $numOfClicks, $xCoord, $yCoord)
MsgBox(0, "Returned " & $click, "ControlClick was " & IIf($click = 1, "successful", "not successful"))

Func IIf($condition, $true, $false)
    If $condition Then
        Return $true
    Else
        Return $false
    EndIf
EndFunc
06/23/2014 17:30 alpines#3
berkay2578 the function IIf became useless in 3.3.10.2 because you are now able to use ternary operators. Example:
Code:
MsgBox(64, "MsgBox", (1=2 ? "yes" : "no"))
06/23/2014 19:13 alexutu2013#4
Edit: I got it , #closerequest
06/23/2014 20:07 berkay2578#5
Quote:
Originally Posted by alpines View Post
berkay2578 the function IIf became useless in 3.3.10.2 because you are now able to use ternary operators. Example:
Code:
MsgBox(64, "MsgBox", (1=2 ? "yes" : "no"))
That's PHP style o_O AutoIT really does integrate everything it wants :p Anyways, thanks for the info :)