Hi,
I wondered if anyone can point me to some examples of nice GUIs created with ahk, or which work with ahk?
Many thanks
Examples of nice GUIs?
Started by
futureTom
, Jan 25 2012 01:06 PM
21 replies to this topic
#1
-
Posted 25 January 2012 - 01:06 PM
Your question is meaningless.
A GUI is created to do stuff related to a script (script which in a pure code way should work without a gui), a gui alone is useless if you don't know what you want...
So asking for a "nice GUI" is not really interesting...
By the way, with AHK these is no real "nice" gui, you "can't" (easily) do things like Office 10 with AHK.
An example of "medium" complexity GUI :
Ok, the text is French but you can see the use of edit (pre-filed), checkbox (pre-checked), combobox (pre-filed and selected) and button.
A GUI is created to do stuff related to a script (script which in a pure code way should work without a gui), a gui alone is useless if you don't know what you want...
So asking for a "nice GUI" is not really interesting...
By the way, with AHK these is no real "nice" gui, you "can't" (easily) do things like Office 10 with AHK.
An example of "medium" complexity GUI :
Gui 1:Add, CheckBox, w115 y10 vOptDM, Dialog Model Gui 1:Add, CheckBox, w115 vOptBS, Subroutine Set Gui 1:Add, CheckBox, w115 vOptDS Checked, Data Section Gui 1:Add, CheckBox, w115 vOptDX, Dialog Box Gui 1:Add, CheckBox, w115 y10 x+5 vOptFD, Buffer Gui 1:Add, CheckBox, w115 y+6 vOptRUS, Standard Text Gui 1:Add, CheckBox, w115 y+6 vOptAll, Tout sauf StdTxt Gui 1:Add, CheckBox, w115 y+6 vOptAllRUS, Tout Gui 1:Add, Button, w90 y10 vStartSearch Default, Rechercher Gui 1:Add, Button, w90 y+10, Construire index Gui 1:Add, Button, w90 y+10, Afficher l'index Gui 1:Add, Button, w90 y+10, Extracteur Gui 1:Add, Text, x10 yp-15,Recherche dans un répertoire spécifique : Gui 1:Add, DropDownList, vDirSpec w75, C:\|D:\||E:\ Gui 1:Add, Text, ,Texte recherché (mot complet, exemple : test ne ramènera pas tests) : Gui 1:Add, Edit, vSearch w335, Texte Gui 1:Add, CheckBox, x10 vReBuild, Remplacer fichiers déjà indexés Gui 1:Add, CheckBox, x10 vNoCache Checked, Ne pas utiliser de cache Gui 1:Add, Button, x+150 yp-10 w50 gQuitter, Quitter Gui 1:Show Return GuiEscape: GuiClose: Quitter: ExitApp
Ok, the text is French but you can see the use of edit (pre-filed), checkbox (pre-checked), combobox (pre-filed and selected) and button.
#2
-
Posted 25 January 2012 - 02:15 PM
if it's just examples of good gui design or solutions, just google any. Most "utility" apps style of window are doable in AHK, except for a few modern controls like split button. The documentation has some example code like a listview/treeview explorer.
Some examples from the scripts & functions forum:
http://www.autohotke...topic81600.html
http://www.autohotke...ic74673-75.html
http://www.autohotke...topic59079.html
http://www.autohotke...topic71046.html
http://www.autohotke...topic53317.html (additions)
http://www.autohotke...topic75317.html
http://www.autohotke...topic71992.html (creator)
http://www.autohotke...topic18378.html
or Google image search: gui site:autohotkey.com/forum
Some examples from the scripts & functions forum:
http://www.autohotke...topic81600.html
http://www.autohotke...ic74673-75.html
http://www.autohotke...topic59079.html
http://www.autohotke...topic71046.html
http://www.autohotke...topic53317.html (additions)
http://www.autohotke...topic75317.html
http://www.autohotke...topic71992.html (creator)
http://www.autohotke...topic18378.html
or Google image search: gui site:autohotkey.com/forum
#3
-
Posted 25 January 2012 - 03:55 PM
wonders why everyone writes gui's in global space instead of function
#4
-
Posted 25 January 2012 - 05:20 PM
Never lose.
WIN or LEARN.
WIN or LEARN.
What do you mean tank by 'writing gui in function' ?
#6
-
Posted 26 January 2012 - 01:37 AM
myGui() myGui() { static thisVar, thatVar gui, SomeGuiName: new gui,Default gui,+LastFound gui, add, groupbox, w250 h130,example gui, add, text, xm12 ym30 section, this Label gui, add, text, xm12 yp+30, that label gui, add, button, yp+30 gDone, Ok gui, add, edit, ys ym30 vthisVar, gui, add, edit, yp+30 vthatVar, gui, add, button, yp+30 gguiclose, cancel gui, show,, gui in a function return winexist() Done: { gui,submit,nohide ListVars msgbox your values `nthisVar :%thisVar%`nthatVar :%thatVar% return } guiclose: { gui,destroy ExitApp return } }
#7
-
Posted 26 January 2012 - 03:07 AM
Never lose.
WIN or LEARN.
WIN or LEARN.
I modified your code so that the Gui can be called multiple times while one is displayed.
myGui("x300 y200", "gui example 1") myGui("x300 y400", "gui example 2") myGui(position, title) { static thisVar, thatVar gui, new gui, Default gui, +LastFound +LabelMyGui gui, add, groupbox, w250 h130,example gui, add, text, xm12 ym30 section, this Label gui, add, text, xm12 yp+30, that label gui, add, button, yp+30 gDone, Ok gui, add, edit, ys ym30 vthisVar, gui, add, edit, yp+30 vthatVar, gui, add, button, yp+30 gmyguiclose, cancel gui, show, % position, % title return winexist() Done: { gui,submit,nohide ; ListVars msgbox your values `nthisVar :%thisVar%`nthatVar :%thatVar% return } myguiclose: { gui,destroy return } }
#8
-
Posted 26 January 2012 - 09:37 AM
HEELLLLLP!!!
I dont know why this is SO complicated! HOW do you write a script so that the checkbox guicontrolget doesnt start until submit button is pressed?????
I dont know why this is SO complicated! HOW do you write a script so that the checkbox guicontrolget doesnt start until submit button is pressed?????
#9
-
Posted 22 September 2012 - 07:33 PM
Use a g-label
#10
-
Posted 22 September 2012 - 07:38 PM
Can you give me an example? If not I understand, but Ive been searching for days and Id love some help.
I need a two group gui two lists of checkboxes. When I press submit....I want the ahk to find all the checked boxes and run corresponding exe or msi . Essentially, a list of apps to be silently installed to make managing my pc lab easier.
I have written and rewritten....I have 19 student apps and 14 admin apps to install as needed in two groups of checkboxes using send keystrokes to automate the install....I just need to know the checkbox part.
This is my sample:
Whats missing? Glabel? I looked it up, but not very clear how it is used. Sorry for being either blind or too noobly for all this.
I need a two group gui two lists of checkboxes. When I press submit....I want the ahk to find all the checked boxes and run corresponding exe or msi . Essentially, a list of apps to be silently installed to make managing my pc lab easier.
I have written and rewritten....I have 19 student apps and 14 admin apps to install as needed in two groups of checkboxes using send keystrokes to automate the install....I just need to know the checkbox part.
This is my sample:
Gui, Add, CheckBox, x26 y20 w110 h60 vcomlife , Comic Life Gui, Show, x131 y91 h172 w168, New GUI Window Gui, Add, Button, defualt, Load Checked programs Gui, Submit, nohide Return Comlife: GuiControlGet,comlife1 runwait, D:\Install\comiclife-win.exe Return }
Whats missing? Glabel? I looked it up, but not very clear how it is used. Sorry for being either blind or too noobly for all this.
#11
-
Posted 22 September 2012 - 08:01 PM
@tank
what kind of syntax is that lol
what kind of syntax is that lol
sub or func { code }very funny :lol:
#12
-
Posted 22 September 2012 - 08:11 PM
I CAN PROTECT YOUR SCRIPT (ANTI-DECOMPILER by Klark92) (AHK_L*)(PM)
Klark92's Script2Exe Wizard
AHK_L / AHK COMPILED EXE / BIN ICON CHANGER
It's complicated because you didnt read the documentation.HEELLLLLP!!!
I dont know why this is SO complicated! HOW do you write a script so that the checkbox guicontrolget doesnt start until submit button is pressed?????
AHK is about reading and trying it out yourself, in my opinion.
And GUIs are, imho, one of the easiest things.
<!-- m -->http://www.autohotke...ommands/Gui.htm<!-- m -->
<!-- m -->http://www.autohotke.../GuiControl.htm<!-- m -->
<!-- m -->http://www.autohotke... ... rolGet.htm<!-- m -->
Gui, Add, CheckBox, x26 y20 vcomlife , FireFox Gui, add, checkbox, x26 y45 vDunno, Chrome Gui, Add, Button, default gOk, Load Checked programs ; contains gLabel (gOk) if the user presses the load checked programs button, then the Ok label will tirgger Gui, Show, x131 y91 h172 w168, New GUI Window Return Ok: ; label triggered by the button { Gui, submit, nohide ; hide or nohide depends on what you want If comlife = 1 Run, FireFox.exe If dunno = 1 Run, Chrome.exe } return GuiClose: ExitApp
#13
-
Posted 22 September 2012 - 08:32 PM
I havent read the entire docs start to finish. But I read it and read it...and spent three days trying before asking for help. The problem is that it just states what everything is and how to use it. The help file never shows you how to use different commands together to achieve something..,. other than "hello world" lol.
Parameters ...blah blah.
Thanks....thats great. But how do I USE them to achieve something?
I really appreciate the help.
I learn best by seeing how groups of commands work together. I cant make heads or tails of the help file. Especially when it tells me three ways I can write something ....that I still do know how to use.
Thanks again!
Parameters ...blah blah.
Thanks....thats great. But how do I USE them to achieve something?
I really appreciate the help.
I learn best by seeing how groups of commands work together. I cant make heads or tails of the help file. Especially when it tells me three ways I can write something ....that I still do know how to use.
Thanks again!
#14
-
Posted 22 September 2012 - 08:39 PM
Nice! NOW I get how to use a glabel!
Man you saved my bacon....
Man you saved my bacon....
#15
-
Posted 22 September 2012 - 08:44 PM