Jump to content
Sign in to follow this  

help grabbing info from combo box

Recommended Posts

I'm trying to make a small interface that'll establish some information to send to my script... I'm new to auto it in general, however I've managed to make the script it self rather stable it's just the gui I'm having problems with. The variable I'm trying to call for is $Game when it gets to the point where it needs to enter the information stored in the drop down in $game it just enters a 3. I assume I'm doing something terribly wrong here...

#include <GUIConstants.au3>
GUICreate("P2P Host Launcher", 300, 100)  
GUISetState () 
$Game = GUICtrlCreateCombo ("Ultimate Mortal Kombat 3 (rev 1.2)", 10,10) 
GUICtrlSetData(-1,"Ultimate Mortal Kombat 3 (rev 1.1)|Mortal Kombat II (rev L3.1)","Mortal Kombat II (rev L1.4)") 
GUISetState () 
$button_1 = GUICtrlCreateButton ("OK",  10, 30, 50)
$button_2 = GUICtrlCreateButton ( "Cancel",  0, -1) 
While 1
    $msg = GUIGetMsg() 
    If $msg = $button_2 Then Exit 0; on a close event, exit the loop.
    If $msg = $button_1 Then ExitLoop
Global $Paused
HotKeySet("{ESC}", "Terminate")
While 1
    WinWait("MAME32k", "")
    If Not WinActive("MAME32k", "") Then WinActivate("MAME32k", "")
        WinWaitActive("MAME32k", "")
    Opt("WinTitleMatchMode", 2)
        WinSetTrans("MAME32k", "", 200)
    ControlFocus ("MAME32k", "", "SysListView321")
        ControlClick("MAME32k", "", "SysListView321", "right", 1)
$title = WinGetTitle("n02", "")
    WinWait($title, "")
    If Not WinActive($title, "") Then WinActivate($title, "")
        WinWaitActive($title, "")
    ControlFocus ( $title, "Host", "SysTabControl321")
        ControlClick($title, "Host", "SysTabControl321", "left", 1 )
    ControlFocus ( $title, "", "Edit3")
        ControlClick( $title, "", "Edit3", "left", 2)
        ControlSend ( $title, "", "Edit3", "{del}" )
        ControlSend ( $title, "", "Edit3", $Game)
    ControlFocus ($title, "Host", "Button5")
        ControlClick ($title, "Host", "Button5")
    WinWait("Connection Window", "")
        ControlClick ("Connection Window", "", "Button2")
        WinSetState ($Game, "", @SW_SHOWMAXIMIZED )
Func Terminate()
    Exit 0
Edited by mud409

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...