Jump to content
Sign in to follow this  

autoit GUI interacts with anoter GUI

Recommended Posts


Hi everyone and thnx anyway.

I want to build a gui with one button which "press" another button in another GUI.

The second GUI is the Shoutcast Source DSP plugin for winamp and the other button is the "Push To Talk" Button in input systab.

With the autoit info window i checked the class name of the button ([CLASS:Button; INSTANCE:25])

Here is my code....

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 1019, 788, 189, 121)
$Button1 = GUICtrlCreateButton("Button1", 248, 352, 377, 73, $WS_GROUP)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
        Case $Button1
            ControlClick("SHOUTcast Source","","[CLASS:Button; INSTANCE:25]")

I tried with the controlcommand("SHOUTcast Source","","[CLASS:Button; INSTANCE:25]", "Check")

with the same syntax of control command i had automated some install wizards in the past.

Why is this happening... ?

the finest Blues Jazz Rock by VL and SpecKtotallynoob.com tutorials about SysAdmins NetAdmins SecAdmins

Share this post

Link to post
Share on other sites

- check return value returned by ControlClick() and read remarks about that function in helpfile

- try to add ControlFocus() just before ControlClick()

- check Opt('WinTitleMatchMode') - to be sure about targeting of correct window

- try to use another similar functions to the same control, for example: ControlGetPos() if it works or not

- ...

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.