forked from TheArkive/CallTipsForAll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLanguage_CallTip_Design_Help.txt
211 lines (175 loc) · 8.24 KB
/
Language_CallTip_Design_Help.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
This documents explains how to get the most out of using this script to display
call tips on demand using the included configuration files.
This script allows you to add multiple languages for use with call tips. This
document explains how to design each language folder.
Please note that examples are indented for clarity. The indentation is NOT
meant to be used verbatim. The column of pipe (|) characters represents the
left edge of the document.
All regex matches are UNQUOTED in all List_*.txt files.
================================================================================
Table of Contents
================================================================================
1. Folder Structure
2. Script Settings
3. Commands List
4. Object Lists
5. Hotkeys
================================================================================
1. Folder Structure
================================================================================
All entries are folders unless they have an extension.
ScriptDir
Languages <--- base dir for languages
LangName <--- base dir for any single language
Keywords
KW_*.txt (optional)
Objects
List_ObjType.txt
Other
List_Commands.txt
List_Functions.txt
CallTipsForAll.ahk <--- script file
================================================================================
2. Script Settings
================================================================================
Modify script settings in the Settings window. You can access the Settings
window from the tray menu.
================================================================================
3. Other folder - including only 1 to 1 references
================================================================================
The "Other" folder consists of files named List_*.txt (ie. List_Commands.txt).
Only one file is needed but you can use multiple files to break things up into
categories, and for easier proofing.
A "Command List" in this context simply means something that can be expressed as
"1 to 1". Functions and commands have a single name, and a definition. Objects
on the other hand have the "object name" as well as a list of nested methods,
properties, and other objects (in some cases).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The format for files in the Other folder is as follows. All entries must be
separated by 2 blank lines (a total of 3 CRLFs). All entries are multi-line
entries.
Example:
|
|Entry
|
|
|Entry
|
|
|...
|
The format for each "Entry" is as follows:
|
|Type <--- Function, Command, Flow, Operator, etc.
|Element_Name
|`multi-line_call_tip_text <--- First call tip (starts with Chr(96))
|more text for first call tip.
|`another_call_tip ... <--- optional
|`help_link_to_chm_topic <--- required, can be blank
|
The user will use Up/Down arrows to scroll between the various call tips.
You can have single blank lines in the description, but I don't recommend this
for the sake of grouping and clarity. Instead format your descriptions like so:
|
|`Desc start line.
|/Start a line with forward slash to add a CRLF before it.
|Forward slashes (/) can still be used within the desc.
|Only forward slashes at the beginning of the line will
|create extra CRLFs.
|`This starts another call tip entry. Scroll call tips with UP/DOWN keys.
For CHM help links, decompile the CHM to see the dir structure. You can
decomplie a CHM with HTML Help Workshop.
Link: https://www.microsoft.com/en-us/download/details.aspx?id=21138
CHM Help Link example: /docs/folder/file.htm
/docs/folder/file.htm#ID_section
================================================================================
4. Object Lists
================================================================================
Ensure your object list files are placed in the proper folder as described
above. The structure of each file is as follows:
|
|Regex matches (multi-line) <-- first batch of lines
|... more regex matches
|... take as many lines as you need
|... to identify as many objects as you want...
|`custom_call_tip_for_obj <-- First call tip
|remember, all call tips can be multi-line
|`another call tip <--- optional
|2nd line of 2nd calltip
|`ObjectOverLapList <--- required, can be blank
|`help_link_to_chm_topic <--- required, can be blank
|
|
|Method or Property Entry
|
|
|Method or Property Entry
|
|
|...
|
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The "Regex matches (multi-line)" are formatted as follows:
|
|Level ObjType Label RegexMatchStr <--- separated by spaces
| ie...
|0 ArrayObject ArrayByFunc Array\(
> Level is an integer from 0-9. It indicates which order the objects should be
loaded in. Some objects are derived from other objects, so it is important to
set the level correctly, otherwise some objects may not show if you don't take
the proper order into account.
> ObjType is a string such as "GuiObject". This is normally consistent on each
line within a single regex line batch, but different related objects that share
methods/properties can be grouped into the same list file if it makes sense to
do so.
> Label this can be anything but it MUST be unique across ALL of the object
list files.
> RegExMatchStr must match the expression that represents the value of the var
(meaning everything to the right of the operator that assigns the value, like =
or :=). The other case is described later. Be sure to NOT use literal braces \{
or \} in the regex as this will confuse the script. Use \x7B and \x7D instead.
Braces are used on level 1+ lines to indicated that a specific {ObjectType} must
be substituted. So, the list of all level 0 objects will be parsed to find a
match. All other levels are parsed the same way.
Be careful using ^ and $, otherwise your scope may be too specific.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Some objects are not set by assignment and must be detected differently. You
can identify an object in that case using comments:
0 InputHookObject InputHookByComment ;[ \t]*InputHookObject
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Some objects are derived from callback function parameters. Matching callback
objects should be done starting on level 2. Here's an example:
2 InputHookObject InputHookByCallback [\w]+\x28([\w]+).*;[ \t]*InputHook
The above line would match "iHook" in the following InputHook callback example:
|
|IH := InputHook("V I1","","")
|IH.OnKeyDown := Func("keyPress")
|
|keyPress(iHook, VK, SC) { ; InputHookObject <--- object match
| ; ... function content
|}
|
Matching objects this way can be a bit dicey, since it requires specific
instances that may be sometimes obsecure. Use with caution.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Each "Method or Property Entry" is formatted as follows:
|Format: |Example:
| |
|Type |Method
|Name |DefineMethod
|`Desc-multi-line |`Obj.DefineMethod(Name,FuncObj) <--- required
|`2nd call tip |`Another call tip... <--- optional
|`CHM_help_Link |`/docs/folder/item.htm <--- required, can be blank
Extra line breaks after the ` are not necessary. The extra breaks are only
shown here for clarity. If desired, you can omit all line breaks surrounding
the ` character for each entry.
> Type is "Method" or "Property".
> Name is the name of the method or property. Do not add extra dots (.) or
parenthesis.
> Description is the same as Functions and Commands. You can use the Chr(96) `
to separate additional multi-line descrptions and you can use forward slash (/)
at the beginning of a line to add a CRLF.
================================================================================
5. Hotkeys
================================================================================
Set hotkeys in the settings window from the tray icon.