I do have one autoit script file with multiple functions.
p.e.
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <GuiButton.au3>
#include <Constants.au3>
#include <EditConstants.au3>
#include <Misc.au3>
#include <MsgBoxConstants.au3>
#include <HotString.au3>
Func ACase()
$Form4=GUICreate("ACase", 100, 195, 290, 142)
etc etc
GUISetState(@SW_SHOW, $Form4)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
SUB_Write2ini(....) ;I write a few things in an ini file
Case $a
Case $b
etc
EndSwitch
WEnd
EndFunc
Func BCase()
$Form5=GUICreate("BCase", 100, 195, 290, 142)
etc etc
GUISetState(@SW_SHOW, $Form5)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
SUB_Write2ini(....) ;I write a few things in an ini file
Case $a
Case $b
etc
EndSwitch
WEnd
EndFunc
When I activate the 1st function (ACase), using a shortcut and the 2nd function (BCase) (with a different shortcut) and I click on a button in whatever of these 2 Gui's, I can't use the other Gui anymore. It doesn't do the right thing as if autoit only remembers the Gui I first used.
What did I wrong? How can I let autoit know which GUI is active and to connect to the function of that Gui?
Hope I made myself clear.