Im stuck on a problem since yesterday and as much as i hate to ask for help, i really dont know what else to try. I want Function 2 to run after Function 1 has finished. I tried GuiCtrlSetOnEvent and MsgLoop, but i dont really understand it. I tried to read tutorials but they didnt help at all.
The line that are underline is what im talking about. I want gamestart() to run first and when its finished, i want iniviteteam() to run.
Code:
#AutoIt3Wrapper_UseX64=n
#include<File.au3>
#include<autologin.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("bot", 409, 240)
$_StartBot = GUICtrlCreateButton("Start Bot", 128, 128, 161, 33)
$_StopBot = GUICtrlCreateButton("Close bot", 129, 165, 161, 33)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
HotKeySet("{F1}", "_stopbot") ;Emergency Stop
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit 1
EndSwitch
[U]Select
Case $nMsg = $_StartBot
gamestart()
inviteteam()
EndSelect[/U]
Select
Case $nMsg = $_StopBot
_stopbot()
EndSelect
WEnd






