Autohotkey .ahk v2 simple code examples
-
simple code examples that work the first time
-
no library includes (nothing wrong with them, but all the code is now right in front of you)
-
read the comments
-
be brief
v2_1 of 3_a function that does not throw an error ; function that does not throw an error working code
v2_2 of 3_a function that thows an error ; function that thows an error working code
v2_3 of 3_a function that try-catches an error ; function that try-catches an error working code
v2_A_Cursor ; Report cursor type when you click the mouse working code
v2_ByRef_and_Deref.ahk ; Referencing and Dereferencing a variable working code
v2_Command_line_parameter ; use Win-R or a cmd window to pass command line params to the script working code
v2_Continuation lines working code ; how to make multiple line variables working code
v2_Chrome_winmove ; demo of winmaximise, winminimize, winmove and winrestore on a chrome window working code
v2_FileGetShortcut ; Demo of getting parameters from filegetshortcut working code
v2_format ; Format working code
v2_iF.ahk ; IF working code
v2_iF - Winexist and !.ahk ; If with Winexist and !Winexist working code
v2_inline_ini.ahk ; save ini values inside the script working code
v2_inputhook.ahk ; inputhook working code
v2_is functions.ahk : "is a variable this..." working code
v2_Keyboard history ; keyhistory working code
v2_Loop_parse_text.ahk ; use loop parse on a sample text working code
v2_Macropad.ahk ; turn an external 10key pad into a macropad working code
v2_Msgbox errors when using an array.ahk ; Msgbox errors when using an array working code
v2_msgbox for object keys values and properties ; msgbox for object keys, values and properties working code
v2_msgbox_timeout.ahk ; msgbox closes in 2 seconds working code
v2_notify.ahk ; a notification function demonstrating variables as comments
v2_one-liner-simple.ahk ; sometimes you just one run command. It's also a good way to practice AHK
v2_ord to see character codes of a string.ahk ; see character codes. Usefull to tell non printing characters apear like tabs and spaces working code
v2_regexmatch as an object.ahk ; regexmatch object working code
v2_run_notepad_with_ComObject.ahk ; open notepad with a ComObject and a function
v2_simple_log_file.ahk ; create a simple log file for your script
v2_simple regexreplace working code ; replace characters working code
v2_sort.ahk ; sort working code
v2_square array.ahk ; put a variable into an array and read it out working code
v2_store_notes_in_your_script.ahk ; store notes in your script you can look at it while it is running working code
v2_store_variables_as_comments.ah ; using variables to store comments so you can look at it while it is running working code
v2_tabbing_for_acceleration_keys.ahk ; TIC + Numpad Number to tab that number of times working code
v2_type for string function array and object.ahk ; use type to see what class name is working code
v2_variadic_function_concatenate_words.ahk ; function without a fixed number of parameters working code
v2_vercompare_two strings.ahk ; compare two strings to see if they match. 0 = match, -1 = no match
v2_winmove resizing and moving folders ; working code