need help @ autoIT

05/04/2013 11:40 domissmash#1
Hi guys!
im newbie @ autoIT and i am trying to make auto login bot for league of leagends so i see there is a lot of peoples who are good at AutoIT and can help me.

I need script who press button when it become active , but i dont know how to make anythink like that.

Thats what i haved made

sleep(1000)
mousemove(1872,28)
mouseclick("")
mouseclick("")
sleep(2000)
mousemove(1261,786)
mouseclick("") <------ In this place i need to press it when its active
mousemove(522,526)
mouseclick("")
send ( "Password" )
sleep(100)
MouseClickDrag("",724,460,427, 460)
send ( "Username" )
sleep(100)
mousemove(685,565)
mouseclick("")
sleep(1000)

Please help me and dont hate me its just second day on autoIT :)
05/04/2013 13:58 Croco™#2
Google: [Only registered and activated users can see links. Click Here To Register...]

Parameters:
Quote:
MouseClick ( "button" [, x, y [, clicks [, speed]]] )
Code:
sleep(1000)
mousemove(1872,28)
mouseclick("[B]left[/B]")
mouseclick("[B]left[/B]")
sleep(2000)
mousemove(1261,786)
mouseclick("[B]left[/B]") <------ In this place i need to press it when its active
mousemove(522,526)
mouseclick("[B]left[/B]")
send ( "Password" )
sleep(100)
MouseClickDrag("[B]left[/B]",724,460,427, 460)
send ( "Username" )
sleep(100)
mousemove(685,565)
mouseclick("[B]left[/B]")
sleep(1000)
[Only registered and activated users can see links. Click Here To Register...]
05/04/2013 14:33 omer36#3
Quote:
Remarks
If the button is an empty string, the left button will be clicked.
PHP Code:
sleep(1000)
mouseclick("left"1872,282)
sleep(2000)
If 
WinActive("TITLE"Then <-- place your title here " league of leagends" or whatever
    Sleep
(100)
    
mouseclick("left"1261,786
    
mouseclick("left"522,526)
    
Sleep(100)
    
send "Password" )
    
sleep(100)
    
MouseClickDrag("left",724,460,427460)
    
send "Username" )
    
sleep(100)
    
mouseclick("left"685,565)
    
sleep(1000)
EndIf