Jump to content
Sign in to follow this  

WinMenuSelectItem and ControlCommand(SelectString)

Recommended Posts


My code is:

If WinExists("User Agreement & Disclaimer") And ControlCommand("User Agreement & Disclaimer", "", "WindowsForms10.BUTTON.app.0.378734a2", "IsEnabled", "") = 1 Then
        ControlClick("User Agreement & Disclaimer", "", "WindowsForms10.BUTTON.app.0.378734a2")
        WinWait("Guitar Hero Three Control Panel")
        WinMenuSelectItem("Guitar Hero Three Control Panel", "", "File", "&Open Game Settings")
        WinWait("Choose which game settings to load")
        ControlCommand("Choose which game settings to load", "", "WindowsForms10.LISTBOX.app.0.378734a1", "SelectString", "Guitar Hero III (English)")
        ControlClick("Choose which game settings to load", "", "WindowsForms10.BUTTON.app.0.378734a")

But it doesn't work and I have no idea why, can anyone help? (nothing works after the first WinWait command, before you say that I may put wrong title, I've put a MsgBox command after WinWait and it shown up, so it means something is wrong in the commands after the first WinWait)

EDIT: Also this doesn't work either:

If WinExists("ExecuteActions") And ControlCommand("ExecuteActions", "", "WindowsForms10.BUTTON.app.0.378734a2", "IsEnabled", "") = 1 Then
        ControlClick("ExecuteActions", "", "WindowsForms10.BUTTON.app.0.378734a2")
        ;If TrayItemGetState($launchgame) = 1 Then Run("C:\Program Files\Aspyr\Guitar Hero III\GH3.exe")
        If TrayItemGetState($launchgame) = $TRAY_CHECKED Then MsgBox(0, "", "")

Everything (in this code) works except the last line, it doesn't recognize if the tray item is checked or not. Nothing happened when I use $TRAY_CHECKED or 1.

Edited by Asd123456

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.