I really don't get how to use GUIs as it makes me more confused before I try to learn.
I have several big scripts which I want to add GUIs instead of MsgBox as GUIs are better to adapt to what I want.
Some times I want a GUI in middle of a script that consists of 1600 lins of code which again consists of several functions and objects.
By adding anything in start of script and GUI after it gives many warnings. See line 5 under.
And I really don't get that how can I add GUIs to my scripts to show up without a hotkey.
Any one have time to make this under to work by existing in same file? So I take the learning from there
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
::FTW::Free the world
Gui, Add, Text,, Enter first text Submit:
Gui, Add, Edit, vAssociatedVar
Gui, Add, Button,, Submit
F12::Gui, Show
Return
ButtonSubmit:
Gui, Submit, NoHide
MsgBox, Content of first text: %AssociatedVar%
Return
Gui, Add, Text,, Enter second text Submit:
Gui, Add, Edit, vAssociatedVar
Gui, Add, Button,, Submit2
F11:: Gui, Show
Return
ButtonSubmit2:
Gui, Submit, NoHide
MsgBox, Content of second text: %AssociatedVar%
Return