probably can not be the best example what you are looking for but may give some help....
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1_1 = GUICreate("Form1", 245, 260, 192, 124, Default, $WS_EX_TOPMOST)
$1 = GUICtrlCreateButton("-", 32, 88, 75, 25)
$2 = GUICtrlCreateButton("A", 32, 128, 75, 25)
$3 = GUICtrlCreateButton("B", 32, 168, 75, 25)
$4 = GUICtrlCreateButton("C", 32, 208, 75, 25)
$5 = GUICtrlCreateButton("0", 136, 88, 75, 25)
$6 = GUICtrlCreateButton("1", 136, 128, 75, 25)
$7 = GUICtrlCreateButton("2", 136, 168, 75, 25)
$8 = GUICtrlCreateButton("3", 136, 208, 75, 25)
$xT = GUICtrlCreateInput("", 120, 56, 81, 21)
HotKeySet("{F1}","about")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Opt("SendKeyDelay", 5)
Opt("SendKeyDownDelay", 5)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $1
MsgBox(0,"","Inside Loop")
EndSwitch
WEnd
Func about()
MsgBox(0,"Func","I AM Here") ; you can add your pause script here
EndFunc