|
/* [program name] v[#].[#] by [author name]
[short description] */
/* To Do: ¡¥¡¥¡¥¡¥¡¥¡¥ - [...] */
/* Revision History ¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥¡¥ # v[#].[#] ([yyyy]-[mm]-[dd]) * initial release */
/* ********** Settings, Variable Declarations ********** */
#SingleInstance Force #NoEnv OnExit, quit
programName = [program name] ; DEBUG: to do programVersion = [#].[#] ; DEBUG: to do programFullName = %programName% v%programVersion% programAuthor = [author name] ; DEBUG: to do
/* ********** Auto-Execute Section ********** */
; backup clipboard contents -- DEBUG: optional clipboardBak := ClipboardAll ; process command line parameters -- DEBUG: optional GoSub, getParams ; construct tray menu -- DEBUG: optional GoSub, trayMenu ; end of auto-execute section Return
/* ********** Hotkeys ********** */
; DEBUG - note: hotkeys make the script persistent!
; [ALT]+[ESC]: terminate script !ESC:: Suspend ; exempt from suspension -- DEBUG: optional GoSub, quit Return
/* ********** Subroutines ********** */
; process command line parameters -- DEBUG: optional (see above) getParams: If 0 > 0 { Loop, %0% ; for each parameter { param := %A_Index% ; check for switches StringLeft, paramType, param, 1 If paramType = - ; switch indicator { ; determine type of switch StringMid, switch, param, 2, 1 ; switch If switch = x ; DEBUG: template (replace "x") { ; access value (= next parameter) param = % A_Index + 1 var_x := %param% ; DEBUG: template (replace "var_x") } } } } Return
; construct tray menu -- DEBUG: optional trayMenu: ; set tray tip Menu, Tray, Tip, %programFullName% ; disable standard menu items Menu, Tray, NoStandard ; show info message Menu, Tray, Add, &About, about ; separator Menu, Tray, Add ; terminate script Menu, Tray, Add, &Quit, quit Return
; show info message -- DEBUG: to do, optional about: MsgBox, 64, %programFullName%, ( LTrim %programFullName% %A_Space%by %programAuthor%
[short description]
Use [ALT]+[ESC] to terminate the program. ) Return
; terminate script quit: ; restore clipboard contents -- DEBUG: optional (see above) Clipboard := clipboardBak ; terminate script ExitApp Return
/* ********** Functions ********** */
|