@Andreik I completely agree with you.
Moreover, it seems from your labeling
GUISetState(@SW_SHOW, $hGUI) ; <<< ------ You need this
I read the post, saw the script, drew a conclusion, completed the puzzle and added some touches, how would I do it
In no case should it be considered that I gave the solution
just point out what's missing (in my perception)