How do I learn ahk? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Xtendera
Posts: 9
Joined: 06 Jul 2020, 22:29

How do I learn ahk?

10 Jul 2020, 12:52

Hello, I would like to learn autohotkey, but don't know how. I tried reading the doc, but I am stuck on how to use the gui right now. Any ideas?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: How do I learn ahk?  Topic is solved

10 Jul 2020, 13:31

Are you talking about AHK's command reference GUI?

https://www.youtube.com/results?search_query=civ+reborn+autohotkey
https://www.youtube.com/c/JoeGlines-Automator/playlists
https://www.youtube.com/watch?v=k7e9MrP-U_g&list=PLXXz88_TPiHrrXlvIZItayrjQ9Xs_mcxZ

There are of course many more AHK videos available. Picked them for the reason that they're offering full-blown AHK serials/playlists.
Have phun :)
Xtendera
Posts: 9
Joined: 06 Jul 2020, 22:29

Re: How do I learn ahk?

10 Jul 2020, 13:35

Isn't there something like a course or video on this?
Xtendera
Posts: 9
Joined: 06 Jul 2020, 22:29

Re: How do I learn ahk?

10 Jul 2020, 13:37

Also, what does the New command do? Isn't it the same as show?
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: How do I learn ahk?

10 Jul 2020, 13:46

Check out the links above. Once you've watched them all feel free to come back. Happy scripting :thumbup:
garry
Posts: 3764
Joined: 22 Dec 2013, 12:50

Re: How do I learn ahk?

10 Jul 2020, 15:08

a small GUI example

Code: Select all

#warn
#noenv
name1:="MATHE-TEST" 
setworkingdir,%a_scriptdir%
Gui,1:default
Gui,1: +AlwaysOnTop -DPIScale -Theme
;Gui,1:Color,C8D0D4,Black                      ;-GUI gray    / EDIT is BLACK
Gui,1:Color,762e1c,Black                       ; GUI bordeaux/ EDIT is BLACK
Gui,1:Font,CYellow s12,Lucida Console          ; EDIT-TEXT is Yellow
;-------
A:=20
B:=60
Gui,1:add,Text,    x10    y10   cWhite,A=
Gui,1:add,Edit,    x140   y10   w120 h40    right   vA1 , %a%   
Gui,1:add,Text,    x10    y70   cWhite,B=
Gui,1:add,Edit,    x140   y70   w120 h40    right   vB1 , %b%
Gui,1:add,Text,    x10    y130  cRED,RESULT=
Gui,1:add,Edit,    x140   y130  w120 h40    right   vResult readonly cWhite,

;- normal button
;Gui,1: Add, Button, x20 y350 w250 h37 gCALC,CALCULATE
;- or color button
Gui,1: Add, Progress, x20 y350 w250 h37 Disabled Background87CEEB
Gui,1: Add, Text, xp yp wp hp BackgroundTrans 0x201 cBlack vText +Border gCALC,CALCULATE
;--
Gui,1: Add, Button, x300 y350 w150 h37 gClear,CLEAR
;--------
Gui,1:Show,x1 y1 w800 h420 ,%name1%
GuiControl, Focus,A1                        ;- set focus to the first field
send,{end}
Return
;-------------
Guiclose:
exitapp
;-------------
CALC:
Gui,1:submit,nohide
if (a1="" or B1="")
  return
c:=a1+b1
Guicontrol,1:,Result,%c%
msgbox, 262208,TEST-MATHE,You clicked button = CALCULATE`n----------------`nThe result is %c%,2  ;- msgbox for 2 seconds
return
;-------------
CLEAR:
Guicontrol,1:,A1
Guicontrol,1:,B1
Guicontrol,1:,Result,
return
;======================== END SCRIPT ====================

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333, mikeyww and 331 guests