ANtiPriuSS 0 Posted July 30, 2017 Share Posted July 30, 2017 Hello, 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! expandcollapse popup#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) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $Start Do WinActivate(blah.$Name1[, ""]) Sleep(120000) WinActivate(blah.$Name2[, ""]) Sleep(120000) WinActivate(blah.$Name3[, ""]) Sleep(120000) Until $i = 1 EndSwitch WEnd Link to post Share on other sites
Danp2 1,382 Posted July 30, 2017 Share Posted July 30, 2017 Maybe this? WinActivate("blah." & $Name1) WebDriver UDF [GH&S] Latest version Wiki FAQs Link to post Share on other sites
ANtiPriuSS 0 Posted July 30, 2017 Author Share Posted July 30, 2017 Thank you! Link to post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now