AutoHotkey syntax lists (text files)

Put simple Tips and Tricks that are not entire Tutorials in this forum
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

AutoHotkey syntax lists (text files)

19 Apr 2018, 07:09

- Previously, AutoHotkey syntax lists were available as text files, when you downloaded AutoHotkey.
- Here is an example for the last version of AutoHotkey Basic, AutoHotkey v1.0.48.05:
Index of /download/1.0
https://autohotkey.com/download/1.0/
AutoHotkey104805.zip
https://autohotkey.com/download/1.0/Aut ... 104805.zip
AutoHotkey104805.zip\Extras\Editors\Syntax
- I have attempted to update these for the latest version of AutoHotkey, AutoHotkey v1.1.28.02. The zip also includes copies of the text files from 2009 for AutoHotkey v1.0.48.05.
- [EDIT:] Fixed ZInfo.txt to say 'v1.1.28.02' not 'v1.0.28.02'.
Attachments
AHKSyntax_1.1.28.02.zip
(34.6 KiB) Downloaded 296 times
Last edited by jeeswg on 19 Apr 2018, 17:37, edited 2 times in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
burque505
Posts: 1731
Joined: 22 Jan 2017, 19:37

Re: AutoHotkey syntax lists (text files)

19 Apr 2018, 10:56

Thanks, jeeswg. I didn't find "Join" in there anywhere.
Regards,
burque505
gregster
Posts: 8927
Joined: 30 Sep 2013, 06:48

Re: AutoHotkey syntax lists (text files)

19 Apr 2018, 11:57

Isn't Join just an specific option in Continuation sections? (I haven't looked at the file, so I don't know if it tries to list all available options...?)
User avatar
derz00
Posts: 497
Joined: 02 Feb 2016, 17:54
Location: Middle of the round cube
Contact:

Re: AutoHotkey syntax lists (text files)

19 Apr 2018, 12:38

oops, a typo in the OP--should be 1.1.28.02

Cheers
try it and see
...
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey syntax lists (text files)

19 Apr 2018, 17:27

- @burque505: Keywords.txt contains 'Join' as used by continuation sections.
- This page contains a 'Join' example custom function, but it isn't a standard (built-in) part of AutoHotkey.
Functions
https://autohotkey.com/docs/Functions.htm#Variadic
I only knew about it because I saw this post the other day:
Example for "Join" re variadic functions: bug? - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=47563
- @derz00: Fixed. It had said '1.0.28.02', when it should have said '1.1.28.02'. Thanks. I've fixed this in ZInfo.txt also, and updated the zip.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: AutoHotkey syntax lists (text files)

19 Apr 2018, 23:48

It's kind of confusing - I have no idea which file contains which info for what version.
It would be nice if you could add an Overwie.ahk that explains that.
Other than that it's good work - I'll use it to complete a few Syntax Highlighters.
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey syntax lists (text files)

19 Apr 2018, 23:54

I'll add this info to ZInfo.txt during the next update:

Code: Select all

all of the files relate to AHK v1.1.28.02
apart from the 'ZAhkBasic' files

Commands - keywords + parameters
ControlFlowStatements - keywords + parameters
Directives - keywords + parameters
Functions - keywords + parameters
Keys - keyboard keys for use with Send/as hotkeys
Keywords - miscellaneous keywords
NamesCommands - keywords only (no parameters)
NamesControlFlowStatements - keywords only (no parameters)
NamesDirectives - keywords only (no parameters)
NamesFunctions - keywords only (no parameters)
NamesVariables - keywords only (no parameters)
ZAhkBasicCommandNames - old files for AHK Basic
ZAhkBasicCommands - old files for AHK Basic
ZAhkBasicFunctions - old files for AHK Basic
ZAhkBasicKeys - old files for AHK Basic
ZAhkBasicKeywords - old files for AHK Basic
ZAhkBasicVariables - old files for AHK Basic
ZInfo - readme/overview
ZSyntaxRaw - raw text obtained from AutoHotkey.chm
ZSyntaxRawRetValueCropped - raw text obtained from AutoHotkey.chm (text before/including ' := ' removed)
You know, the original files, they didn't have any helpful info. Cheers.
Last edited by jeeswg on 19 Apr 2018, 23:57, edited 1 time in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: AutoHotkey syntax lists (text files)

19 Apr 2018, 23:57

Thanks
Recommends AHK Studio
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 00:12

Also consistent with Commands Directives, Functions etc:
NamesKeywords.txt:

Code: Select all

Abort
AboveNormal
Abs
ACos
Add
ahk_class
ahk_exe
ahk_group
ahk_id
ahk_pid
All
Alnum
Alpha
AltSubmit
AltTab
AltTabAndMenu
AltTabMenu
AltTabMenuDismiss
AlwaysOnTop
And
Asc
ASin
ATan
AutoSize
Background
BackgroundTrans
BelowNormal
Between
BitAnd
BitNot
BitOr
BitShiftLeft
BitShiftRight
BitXOr
bold
Border
Bottom
Button
Buttons
ByRef
Cancel
Capacity
Caption
Ceil
Center
Check
Check3
Checkbox
Checked
CheckedGray
Choose
ChooseString
Chr
Click
Close
Color
ComboBox
Contains
ControlList
Cos
Count
Date
DateTime
Days
DDL
Default
Delete
DeleteAll
Delimiter
Deref
Destroy
Digit
Disable
Disabled
DropDownList
Eject
Enable
Enabled
Error
Exist
Exp
Expand
ExStyle
Files
FileSystem
First
Flash
Float
FloatFast
Floor
Focus
Font
global
Grid
Group
GroupBox
GuiClose
GuiContextMenu
GuiDropFiles
GuiEscape
GuiSize
Hdr
Hidden
Hide
High
HKCC
HKCR
HKCU
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
HKLM
HKU
Hours
HScroll
Icon
IconSmall
ID
IDLast
Ignore
ImageList
In
Integer
IntegerFast
Interrupt
Is
italic
Join
Label
LastFound
LastFoundExist
Left
Limit
Lines
List
ListBox
ListView
Ln
local
Lock
Log
Logoff
Low
Lower
Lowercase
LTrim
MainWindow
Margin
Maximize
MaximizeBox
MaxSize
Minimize
MinimizeBox
MinMax
MinSize
Minutes
Mod
MonthCal
Mouse
Move
Multi
NA
No
NoActivate
NoDefault
NoHide
NoIcon
NoMainWindow
norm
Normal
NoSort
NoSortHdr
NoStandard
Not
NoTab
NoTimers
Number
Off
Ok
On
Or
OwnDialogs
Owner
Parse
Password
Pic
Picture
Pixel
Pos
Pow
Priority
ProcessName
Radio
Range
Read
ReadOnly
Realtime
Redraw
Reg
REG_BINARY
REG_DWORD
REG_EXPAND_SZ
REG_MULTI_SZ
REG_SZ
Region
Relative
Rename
Report
Resize
Restore
Retry
RGB
Right
Round
RTrim
Screen
Seconds
Section
Serial
SetLabel
ShiftAltTab
Show
Sin
Single
Slider
SortDesc
Sqrt
Standard
static
Status
StatusBar
StatusCD
strike
Style
Submit
SysMenu
Tab
Tab2
TabStop
Tan
Text
Theme
Tile
Time
Tip
ToggleCheck
ToggleEnable
ToolWindow
Top
Topmost
TransColor
Transparent
Tray
TreeView
TryAgain
Type
UnCheck
underline
Unicode
Unlock
UpDown
Upper
Uppercase
UseErrorLevel
Vis
VisFirst
Visible
VScroll
Wait
WaitClose
WantCtrlA
WantF2
WantReturn
Wrap
Xdigit
xm
xp
xs
Yes
ym
yp
ys
{AltDown}
{AltUp}
{Blind}
{Click}
{CtrlDown}
{CtrlUp}
{LWinDown}
{LWinUp}
{Raw}
{RWinDown}
{RWinUp}
{ShiftDown}
{ShiftUp}
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 00:54

- These have an absolutely clear definition:
commands
control flow statements
directives
functions
variables

- If you want to somehow make 'keywords', 'a thing', you'll have to do some detailed categorisation stating sources and principles. So that anyone in the world could recreate exactly the same list. At the moment I don't see any logical basis for 'keywords'.
- Btw where is RawRead? Should object methods be listed?
list of every object type/property/method - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=44081
- There is also this, if you want to use GUI-related keywords.
GUI - Complete Command & Property Listing - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 29#p213529
- What about window classes like AutoHotkeyGUI / AutoHotkey2?
- I've done what I wanted to do. A lot of how this project might move forward, is for people doing autocomplete etc, to tailor it to their requirements. As I suggested here:
AHK Auto Formatter? - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=1778
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 06:59

Object methods are not keywords.
We also need operators.

Keywords are parameters that commonly give or have special meaning for functions/commands or methods and are very specific. Im not sure about that definition - but keywords is something that is commonly used to define syntax highlighters and in editors.
I think would be useful specifically for editors/syntax highlighting.
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 08:21

- @nnnik: If you wanted to post an updated version of Keywords.txt with more keywords, that would be fine.
- Already in the list: Not/Or/And, Between/Contains/In/Is.
- Not in the list: class/new/this.
- Note: Keywords.txt is almost unchanged from the AHK Basic original (I added ahk_exe/Files/Reg), and it currently contains nothing object-related since AHK Basic didn't have objects.
- Note: object methods aren't currently listed anywhere in the zip, in case you wanted them somewhere.
- If you wanted symbolic operators, see OPERATOR PRECEDENCE, here:
jeeswg's characters tutorial - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=26486
- Potentially a systematic check for (read through of) lines containing '[v1.1.' could be done, these indicate new features.
- Anyhow, it's for people other than me to make suggestions, I'm happy with what I've got, and I find that drop-down menus/script assistance slows me down, I prefer hotstrings for code blocks, code lines and individual words.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 08:48

No just a list of operators. I wouldn't even mention precedence.
Also not/Or/And are operators.
Methods should be in their file - I might do this this weekend.
Maintaining this list should help people to implement proper Syntax Highlighting for the latest version.

v2 should be it's own zip
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 08:57

- The operators link has a list of the symbolic operators listed in a form that's easy to parse. (I know they're operators, in the post above I listed operators that were already in the list.)
- If your doing methods, this could save you some work.
list of every object type/property/method - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=44081
- You could start a separate AHK v2 keywords file if you like.
- I wanted to get more feedback before considering an AHK v2 zip, i.e. I want people to point out all possible issues with the AHK v1.1 zip before moving forwards.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 10:50

We should probably use github for hosting though - so that people can edit it and see it in public.
Thanks for the link i will use it.

I dont understand what you mean - do you already have a list for operators?
Recommends AHK Studio
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 12:15

- I keep various syntax lists, listed in this post:
list of every command/function/variable from across all versions - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 42#p131642
- Here's a list of operators. I wasn't sure if this list was applicable to this project, since most of the operators are symbolic not words, however, there are symbols listed in Keys.txt.

Code: Select all

;Variables and Expressions
;https://autohotkey.com/docs/Variables.htm#Operators
;jeeswg's characters tutorial - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=7&t=26486

;operators
new
++
--
**
-
!
~
&
*
/
//
+
<<
>>
^
|
.
~=
>
<
>=
<=
=
==
<>
!=
NOT
AND
&&
OR
||
;?: (ternary operator)
?
:
:=
+=
-=
*=
/=
//=
.=
|=
&=
^=
>>=
<<=
,
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
burque505
Posts: 1731
Joined: 22 Jan 2017, 19:37

Re: AutoHotkey syntax lists (text files)

20 Apr 2018, 16:06

Thanks for the clarification, jeeswg.
Regards,
burque505
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AutoHotkey syntax lists (text files)

26 Jun 2019, 08:48

From here, some words to add in for the next update:
Send - Syntax & Usage | AutoHotkey
https://www.autohotkey.com/docs/commands/Send.htm

Code: Select all

{Text}

Down
DownR
DownTemp
Up
I will try to list all AHK-related words (including those mentioned above) in the next update.
Any recommendations for further words to add are welcome.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Tips and Tricks (v1)”

Who is online

Users browsing this forum: No registered users and 8 guests