Jump to content

autoit GUI interacts with anoter GUI


speck
 Share

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)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

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
Link to comment
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

- ...

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...