Jump to content
Sign in to follow this  

Need a bit of help with WinActivate

Recommended Posts




Im trying to build a small program to swap windows using an ini file and the win activate command but cant figure out how to format it correctly.

the windows that I want to swap will always be named blah. a varriable that Id just like to be able to control by an ini unless there is a better way.

Thanks in advanced!


#include <GUIConstants.au3>
$i = 0
$Name1 = IniRead ("settings.ini", "Input Section", "Name1", "")
$Name2 = IniRead ("settings.ini", "Input Section", "Name2", "")
$Name3 = IniRead ("settings.ini", "Input Section", "Name3", "")

$MainGUI = GUICreate("swap", 202, 200, -1, -1)
GUICtrlCreateLabel ( $Name1, 8, 8 )

$Start = GUICtrlCreateButton("Start", 72, 167, 57, 25, 0)


While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
        Case $Start
               WinActivate(blah.$Name1[, ""])
               WinActivate(blah.$Name2[, ""])
               WinActivate(blah.$Name3[, ""])
            Until $i = 1


Share this post

Link to post
Share on other sites

Thank you!


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