( SOLVE ) How do i Organize AHK script by adding Label or description text

Get help with using AutoHotkey and its commands and hotkeys
noobgraphicartist
Posts: 55
Joined: 12 Jan 2015, 18:36

( SOLVE ) How do i Organize AHK script by adding Label or description text

07 May 2016, 06:45

this is my script and i find it disaster and unorganized

Code: Select all

#IfWinActive ahk_class Photoshop ahk_exe Photoshop.exe

`::del
f3::^=
f1::^-
1::[
2::!^z
3::]

!2::
send {shift down}{ctrl down}{z down}
KeyWait, Shift
KeyWait, ctrl
KeyWait, z
send {shift up}{ctrl up}{z up}
return

K::!^K

$w::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send h
else
Send w
return

$e::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send y
else
Send e
return

$q::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send !^r
else
Send q
return



$c::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send ^!c
else
Send c
return

$v::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send n
else
Send v
return

$f::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send ^!f
else
Send f
return

$a::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send b
else
Send a
return

$j::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send !M
else
Send j
return


!Q::f12
!q::^!Q

+a::
send {ctrl down}{alt down}{a down}
KeyWait, ctrl
KeyWait, a
send {ctrl up}{alt up}{a up}
return

+s::
send {ctrl down}{alt down}{s down}
KeyWait, ctrl
KeyWait, s
send {ctrl up}{alt up}{s up}
return

+d::
send {ctrl down}{alt down}{d down}
KeyWait, ctrl
KeyWait, d
send {ctrl up}{alt up}{d up}
return
now i Want to add a small text header description so that i can quickly organize or it will look tidy when i add more script
here is example layout i want to achieve

//////////// Single Swap Keys ////////////////

`::del
f3::^=
f1::^-
1::[
2::!^z
3::]

//////////// Double Tap Swap Keys ////////////////

$w::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send h
else
Send w
return

$e::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 400)
Send y
else
Send e
return
[/code]

//////////// Shift Swap Keys ////////////////

+a::
send {ctrl down}{alt down}{a down}
KeyWait, ctrl
KeyWait, a
send {ctrl up}{alt up}{a up}
return

+s::
send {ctrl down}{alt down}{s down}
KeyWait, ctrl
KeyWait, s
send {ctrl up}{alt up}{s up}
return

+d::
send {ctrl down}{alt down}{d down}
KeyWait, ctrl
KeyWait, d
send {ctrl up}{alt up}{d up}
return


thank you for answer
Last edited by noobgraphicartist on 07 May 2016, 07:03, edited 1 time in total.
noobgraphicartist
Posts: 55
Joined: 12 Jan 2015, 18:36

Re: How do i Organize AHK script by adding Label or description text

07 May 2016, 07:02

boiler wrote:Comments in scripts
hey that was fast reply it solve my problem thank you very much

Return to “Ask For Help”

Who is online

Users browsing this forum: AHKStudent, Bing [Bot], Google [Bot], hisrRB57, Raymond888, Smile_, teadrinker, ziwzih and 51 guests