#1: putthing a whitespace between function name and left parenthesis
example:
incorrect (function will NOT be called)
Code: Select all
___a_toggle_window1_Xpos_between_2_and_3 ( _title, 0, -100 )
Code: Select all
___a_toggle_window1_Xpos_between_2_and_3( _title, 0, -100 )
i've made this mistake probably 4-5 times in the past month, and each time it took me some time to realize this is the root of the problem. i'm thinking i should write an ahk script to scan my scripts of " (" before i run them ...
#2: assuming pixelgetcolor outputs RGB (as opposed to BGR) color
example:
incorrect (you'll get a different color)
Code: Select all
PixelGetColor, _color, %MouseX%, %MouseY%
...
Gui, Color, %_color%
correct
Code: Select all
PixelGetColor, _color, %MouseX%, %MouseY%, RGB
...
Gui, Color, %_color%
#3 single line block comment
incorrect (hotkey will simply not take effect (i wonder what really happens in this case?))
Code: Select all
tab::
/* haha */
msgbox haha
return
correct
Code: Select all
tab::
/*
haha
*/
msgbox haha
return