Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

AutoIT Hotkey script Help

Options
  • 10-08-2007 11:58am
    #1
    Registered Users Posts: 2,953 ✭✭✭


    Below is a snippet of code that opens a poker table, then presses the scroll bar once to move to the next table and then selects another table and it keeps going until it has 25 tables open.

    For anyone not wanting to read the science behind the script this is basically what i want to do:

    Is it possible to put something in the script that either brings the main window to the forefront or sends all the tables opened to the background. Bear in mind i didnt write the script so please try and explain in dummy terms as i just modifed a few bits and pieces.


    Also just to explain the "Where a begginers table is selected this will click the OK button" bit basically you can only open a beginners table if your new to the site, otherwise a prompt box will appear telling you it cant be open and you must click ok, if you dont click ok it wont let you click on the scroll bar and thus it will just loop and no more tables will open. It rarely happens as theres only 1 or 2 beginners table but nonetheless i have to put that in just in case.

    So anyway the problem that happens is when the 5th or 6th table opens it comes to the forefront in front of the window where the tables are opened and when it tries to select the scroll bar it just clicks on the poker table instead and then because the scroll bar didnt move it just goes back and selects the same table again which brings it back to the foreground and thus it loops and no new tables are opened. Is it possible to put something in the script that either brings the main window to the forefront or sends all the tables opened to the background
    If WinExists ("Carlospoker: Nickname") Then
    
    $handle = WinGetHandle("Carlospoker: Nickname", "")
    
    
    WinActivate($handle)
    
    $pos = WinGetPos("")
    $mPos = MouseGetPos()
    MouseClick ( "left" , $pos[0]+300, $pos[1]+170 , 1 , 10 ) ; Reset FIlter
    Sleep(20)
    MouseClick ( "left" , $pos[0]+220, $pos[1]+170 , 1 , 10 ) ; Set Filter
    Sleep(20)
    MouseClick ( "left" , $pos[0]+355, $pos[1]+100 , 1 , 10 ) ; Set 6 - max
    Sleep(20)
    MouseClick ( "left" , $pos[0]+355, $pos[1]+170 , 1 , 10 ) ; Close Filter
    
    Sleep(500)
    ;open up 8 tables
    For $i=0 to 24 Step +1
    	WinActivate($handle)
    	Sleep(1000)
    	$pTable = 220+(0)
    	MouseClick ( "left" , $pos[0]+220, $pos[1]+$pTable, 2 , 10 ) ; Open Table 1
    	Sleep(20)
    	MouseClick ( "left" , $pos[0]+370, $pos[1]+420 , 1 , 10 ) ; Where a begginers table is selected this will click the OK button
    	Sleep(20)
    	MouseClick ( "left" , $pos[0]+620, $pos[1]+490 , 1 , 10 ) ; Move Scroll Bar
    
    	
    	Sleep(3000)
    	
    Next
    
    
    
    EndIf
    


Comments

  • Registered Users Posts: 2,953 ✭✭✭dvdfan


    Ignore i got it sorted i made it click on the main window first to bring that into focus and that does the job


Advertisement