by HinkerLoden » 09 Apr 2016, 11:02
Not thought that something like that stands in the OFFTOPIC
:SCRATCHINGBALLS: ( ! tHATS OFFTOPIC ! )
Nevermind. I am in progress to create 3 different Templates .
1.) General - Save Settings - description to some settings - Beginner Friendly.
2.) Performance - Speed Settings - possible unstable but fast setting and more AHK specific Commands are listed and explained
3.) Gui Variant - Save SEttings but some Gui Elements are integreated - This is more a Root-DataSheet for the Upcoming Tutorials i want to write.
First additional. OS and Versionsinfo. Not thought it is so important.
Code: Select all
;************************************************
; AHK _ SCRIPT STRUCTURE TEMPLATE v1.0
; by HinkerLoden
; 25/03/2016
; OS --> Win 10 / etc.
;AHK Version --> 1.1.23.05
;************************************************
;************************************************
;Script Global Settings
;************************************************
#NoEnv ; Clear All Systemvariables
#Persistent ;Keeps a script permanently running until ExitApp execute
#SingleInstance force ;The word FORCE skips the dialog box and replaces the old instance automatically, which is similar in effect to the Reload command.
;************************************************
;Performance PARAMETERS - if you need speed
;************************************************
;SetBatchLines, -1
;Process, Priority, , L ;A - Max Speed
;************************************************
; Input PARAMETERS
;************************************************
SendMode Input ;Default = Event , Play - for Speed -> Set Keydelay to -1 & Setmousedely to -1
;----
SetKeyDelay, 10, 10 ; for speed -1, -1,
SetMouseDelay, 25 ;0 recommend / -1 for max speed
SetDefaultMouseSpeed, 0 ;0-100
;************************************************
;History Protocols
;Switch setting for more Speed
;************************************************
#KeyHistory 1 ; 0 - No Keyhistory
ListLines On ; Off - for more speed
;************************************************
;Window detection
;************************************************
SetTitleMatchMode, 2
SetTitleMatchMode Fast ;slow detect hidden windows
SetWinDelay, 200 ;0 - for more speed
;DetectHiddenWindows, On ; | Off
;i double the standard settings to be on the save side
;####################### #######################
; Script Parameter
;####################### #######################
SetWorkingDir %A_ScriptDir% ;Ensures a consistent starting directory.
;#Include %A_ScriptDir%\YourLibrarys2integrate.ahk
CoordMode, Pixel, Screen ;relative/Window - active Window
CoordMode, Mouse, Screen
;WinMinimizeAll ;Optional
;####################### #######################
; Try to avoid pure numbers inside the code - adress all Vars here
;=============================================================
; Variable Section
;=============================================================
;####################### #######################
;global / static
;EnvUpdate ; --> Notifies the OS and all running applications that environment variable(s) have changed.
;####################### #######################
;=============================== TimerVars
Variable_01 =
Variable_02 =
Variable_03 =
Variable_04 =
Variable_05 =
Variable_06 =
Variable_07 =
Variable_08 =
Variable_09 =
Variable_10 =
;####################### #######################
;=============================================================
; CODE
;=============================================================
;####################### #######################
;=============================================================
; GUI
;=============================================================
;=============================================================
;####################### #######################
;=============================================================
;=============================================================
; gLabel
;=============================================================
;ButtonX
;=============================================================
;EditX
;=============================================================
;
;=============================================================
;=============================================================
; TIMER
;=============================================================
;TimerX
;=============================================================
return
; Timer2
;=============================================================
Timer2:
return
;=============================================================
; HOTKEYS
;=============================================================
; Hotkey1
;=============================================================
; Hotkey2
;=============================================================
; Exit
;=============================================================
Exit:
^!x:: ; Hotkey ALT+x.
GuiEscape:
GuiClose:
ExitApp
;####################### #######################
;=============================================================
; FUNCTIONS
;=============================================================
;####################### #######################
Code: Select all
;************************************************
; AHK _ SCRIPT PERFORMANCE TEMPLATE v1.0
; by HinkerLoden
; 25/03/2016
; OS --> Win 10 / etc.
;AHK Version --> 1.1.23.05
;************************************************
;************************************************
;Script Global Settings
;************************************************
#NoEnv ; Clear All Systemvariables
#Persistent ;Keeps a script permanently running until ExitApp execute
#SingleInstance force ;The word FORCE skips the dialog box and replaces the old instance automatically, which is similar in effect to the Reload command.
;************************************************
;Performance PARAMETERS
;************************************************
SetBatchLines, -1 ; look up long descriptions
Process, Priority, , A ;H - Max Speed but maybe unstable
;************************************************
; Input PARAMETERS
;************************************************
SendMode Input ;Default = Event , Play - for Speed -> Set Keydelay to -1 & Setmousedely to -1
SetKeyDelay, -1, -1, Play ; for speed -1, -1,
SetMouseDelay, -1 ;0 recommend / -1 for max speed
SetDefaultMouseSpeed, 0 ;0-100
;************************************************
;History Protocols
;************************************************
#KeyHistory 0 ; 0 - No Keyhistory
ListLines Off ; Off - for more speed
;************************************************
;Window detection
;************************************************
SetTitleMatchMode 2
SetTitleMatchMode Fast
SetWinDelay, 0
SetControlDelay, 0
;####################### #######################
; Script Parameter
;####################### #######################
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
;####################### #######################
; Prepare Start
;####################### #######################
WinMinimizeAll
;************************************************
;PERFORMANCE PARAMETERS DESCRIPTION
;************************************************
/*
;************************************************
;Performance PARAMETERS
;************************************************
SetBatchLines, -1
;default = 10ms
;SetBatchLines is set to 10 ms (the default), a task that uses 20 ms of CPU time will run for ~10 ms, sleep to allow other processes to run, and then run for the final 10 ms. If SetBatchLines is set to 2 ms, a task that uses 20 ms of CPU will sleep ~10 times before completing.
My advice... Leave SetBatchLines at the default of 10 ms. 10 ms is a good default. Most scripts run fine with this setting. If needed, increase SetBatchLines to a higher value (20ms, 50ms, -1, etc.) if one or more of your tasks needs more priority.
As Lower the Value as Slower the Script runs !!!
SetBatchLines, 20ms
SetBatchLines, LineCount
Process, Priority, , A
;L (or Low)
;B (or BelowNormal), N (or Normal), A (or AboveNormal), H (or High), R (or Realtime).
;Note: Any process not designed to run at Realtime priority might reduce system stability if set to that level.
Process, Priority, , L ;if unstable, comment or remove this line
;************************************************
; Input PARAMETERS
;************************************************
SendMode Input
;Keysettings ***********************
SetKeyDelay, -1, -1 ; Delay, PressDuration
; default = 10
;Sets the delay that will occur after each keystroke sent by Send and ControlSend. -1
;Use -1 for no delay at all and 0 for the smallest possible delay
;Mousesettings ***********************
SetMouseDelay, -1
;Sets the delay that will occur after each mouse movement or click.
;default = 10 - Sets the delay that will occur after each mouse movement or click.
SetDefaultMouseSpeed, 0
;default = 2 , Min = 0 , Max = 100
;Hotkeysettings ***********************
#MaxHotkeysPerInterval 99000000 :default = 70 - prevent creating endless loops
#HotkeyInterval 99000000 ;default = 2000 - Hoy much hotkeys can activate per ms
#MaxThreads 255 ;default 10 - How many Hotkeys + Timers .. can run simultanously
#MaxThreadsBuffer On ;default Off - This is the default behavior. A hotkey press will be ignored whenever that hotkey is already running its maximum number of threads (usually 1, but this can be changed with #MaxThreadsPerHotkey).
;************************************************
;History Protocols
;************************************************
#KeyHistory 0 ;disable KeyHistory log
ListLines, Off
;ListLines Off/On can be used to selectively omit some lines from the history, which can help prevent the history from filling up too quickly (such as in a loop with many fast iterations). ListLines Off may also improve performance by a few percent.
;************************************************
;Window detection
;************************************************
SetTitleMatchMode fast
;Fast: This is the default behavior. Performance may be substantially better than Slow, but certain WinText elements for some types of windows may not be "seen" by the various window commands.
;The built-in variables A_TitleMatchMode and A_TitleMatchModeSpeed contain the current settings.
SetWinDelay, 0 ;default = 100, no delay = -1
;Sets the delay that will occur after each windowing command, such as WinActivate.
SetControlDelay, 0 ; default = 20 , fastest = -1
;Sets the delay that will occur after each control-modifying command.
SendMode Input
; Recommended for new scripts due to its superior speed and reliability.
;Input: Switches to the SendInput method for Send, SendRaw, Click, and MouseMove/Click/Drag. Known limitations:Windows Explorer ignores SendInput's simulation of certain navigational hotkeys such as Alt+LeftArrow. To work around this, use either SendEvent !{Left} or SendInput {Backspace}.
;************************************************
;Other
;************************************************
#MaxMem 4095 ;default 64MB - Max 4095 set the Memory use for each Variable
*/
Code: Select all
;************************************************
; AHK _ SCRIPT STRUCTURE TEMPLATE v1.0
; by HinkerLoden
; 09/04/2016
; OS --> Win 10 / etc.
;AHK Version --> 1.1.23.05
;************************************************
;************************************************
;Script Global Settings
;************************************************
#NoEnv ; Clear All Systemvariables
#Persistent ;Keeps a script permanently running until ExitApp execute
#SingleInstance force ;The word FORCE skips the dialog box and replaces the old instance automatically, which is similar in effect to the Reload command.
;************************************************
;Performance PARAMETERS - if you need speed
;************************************************
;SetBatchLines, -1
;Process, Priority, , L ;A - Max Speed
;************************************************
; Input PARAMETERS
;************************************************
SendMode Input ;Default = Event , Play - for Speed -> Set Keydelay to -1 & Setmousedely to -1
;----
SetKeyDelay, 10, 10 ; for speed -1, -1,
SetMouseDelay, 25 ;0 recommend / -1 for max speed
SetDefaultMouseSpeed, 0 ;0-100
;************************************************
;History Protocols
;Switch setting for more Speed
;************************************************
#KeyHistory 1 ; 0 - No Keyhistory
ListLines On ; Off - for more speed
;************************************************
;Window detection
;************************************************
SetTitleMatchMode, 2
SetTitleMatchMode Fast ;slow detect hidden windows
SetWinDelay, 200 ;0 - for more speed
DetectHiddenWindows, On ; | Off
;i double the standard settings to be on the save side
;####################### #######################
; Script Parameter
;####################### #######################
SetWorkingDir %A_ScriptDir% ;Ensures a consistent starting directory.
;#Include %A_ScriptDir%\YourLibrarys2integrate.ahk
CoordMode, Pixel, Screen ;relative/Window - active Window
CoordMode, Mouse, Screen
;WinMinimizeAll ;optional
;####################### #######################
; Try to avoid pure numbers inside the code - adress all Vars here
;=============================================================
; Variable Section
;=============================================================
;####################### #######################
;global / static
;EnvUpdate ; --> Notifies the OS and all running applications that environment variable(s) have changed.
;####################### #######################
;=============================== TimerVars
CycleTimer1=500
CycleTimer2=500
Timer1Status=0
Timer2Status=0
;####################### #######################
;=============================================================
; CODE
;=============================================================
;####################### #######################
;=============================================================
; GUI
;=============================================================
;####################### #######################
; GUI Template
;=============================================================
Gui, Tutorial: New , -ToolWindow +AlwaysOnTop, test
gui, font, s14, Verdana
Gui Add, Text, vText x40 y24 w350 h40 +0x200, Text
Gui Add, Edit, vEdit gEdit x40 y72 w350 h40, Edit
;----------
Gui Add, Button, vButton1 gButton1 x40 y152 w132 h44, Button1
Gui Add, Button, vButton2 gButton2 x272 y152 w132 h44, Button2
;----------
Gui Add, Button, gExit x72 y272 w352 h76 cRed , -- E X I T --
Gui Show, w480 h380, Window
Return
/* Used Vars
Text =
Edit =
Button1 =
Button2 =
*/
;=============================================================
; gLabel
;=============================================================
; Button1 - Start-Stop-Timer
;=============================================================
Button1:
If Timer1Status=1
{
SetTimer, Timer1, Off
Timer1Status=0
}
SetTimer, Timer1, %CycleTimer1%
Timer1Status=1
Return
; Button2 - Start-Stop-Timer
;=============================================================
Button2:
If Timer2Status=1
{
SetTimer, Timer2, Off
Timer2Status=0
}
SetTimer, Timer2, %CycleTimer2%
Timer2Status=1
Return
; gEdit
;=============================================================
Edit:
return
;=============================================================
; TIMER
;=============================================================
; Timer1
;=============================================================
Timer1:
Return
return
; Timer2
;=============================================================
Timer2:
return
;=============================================================
; HOTKEYS
;=============================================================
; Hotkey1
;=============================================================
; Hotkey2
;=============================================================
; Exit
;=============================================================
Exit:
^!x:: ; Hotkey ALT+x.
GuiEscape:
GuiClose:
ExitApp
;####################### #######################
;=============================================================
; FUNCTIONS
;=============================================================
;####################### #######################
Not thought that something like that stands in the OFFTOPIC :shock:
:SCRATCHINGBALLS: ( ! tHATS OFFTOPIC ! ) :mrgreen:
Nevermind. I am in progress to create 3 different Templates .
1.) General - Save Settings - description to some settings - Beginner Friendly.
2.) Performance - Speed Settings - possible unstable but fast setting and more AHK specific Commands are listed and explained
3.) Gui Variant - Save SEttings but some Gui Elements are integreated - This is more a Root-DataSheet for the Upcoming Tutorials i want to write.
First additional. OS and Versionsinfo. Not thought it is so important.
[code=autohotkey file=General.ahk]
;************************************************
; AHK _ SCRIPT STRUCTURE TEMPLATE v1.0
; by HinkerLoden
; 25/03/2016
; OS --> Win 10 / etc.
;AHK Version --> 1.1.23.05
;************************************************
;************************************************
;Script Global Settings
;************************************************
#NoEnv ; Clear All Systemvariables
#Persistent ;Keeps a script permanently running until ExitApp execute
#SingleInstance force ;The word FORCE skips the dialog box and replaces the old instance automatically, which is similar in effect to the Reload command.
;************************************************
;Performance PARAMETERS - if you need speed
;************************************************
;SetBatchLines, -1
;Process, Priority, , L ;A - Max Speed
;************************************************
; Input PARAMETERS
;************************************************
SendMode Input ;Default = Event , Play - for Speed -> Set Keydelay to -1 & Setmousedely to -1
;----
SetKeyDelay, 10, 10 ; for speed -1, -1,
SetMouseDelay, 25 ;0 recommend / -1 for max speed
SetDefaultMouseSpeed, 0 ;0-100
;************************************************
;History Protocols
;Switch setting for more Speed
;************************************************
#KeyHistory 1 ; 0 - No Keyhistory
ListLines On ; Off - for more speed
;************************************************
;Window detection
;************************************************
SetTitleMatchMode, 2
SetTitleMatchMode Fast ;slow detect hidden windows
SetWinDelay, 200 ;0 - for more speed
;DetectHiddenWindows, On ; | Off
;i double the standard settings to be on the save side
;####################### #######################
; Script Parameter
;####################### #######################
SetWorkingDir %A_ScriptDir% ;Ensures a consistent starting directory.
;#Include %A_ScriptDir%\YourLibrarys2integrate.ahk
CoordMode, Pixel, Screen ;relative/Window - active Window
CoordMode, Mouse, Screen
;WinMinimizeAll ;Optional
;####################### #######################
; Try to avoid pure numbers inside the code - adress all Vars here
;=============================================================
; Variable Section
;=============================================================
;####################### #######################
;global / static
;EnvUpdate ; --> Notifies the OS and all running applications that environment variable(s) have changed.
;####################### #######################
;=============================== TimerVars
Variable_01 =
Variable_02 =
Variable_03 =
Variable_04 =
Variable_05 =
Variable_06 =
Variable_07 =
Variable_08 =
Variable_09 =
Variable_10 =
;####################### #######################
;=============================================================
; CODE
;=============================================================
;####################### #######################
;=============================================================
; GUI
;=============================================================
;=============================================================
;####################### #######################
;=============================================================
;=============================================================
; gLabel
;=============================================================
;ButtonX
;=============================================================
;EditX
;=============================================================
;
;=============================================================
;=============================================================
; TIMER
;=============================================================
;TimerX
;=============================================================
return
; Timer2
;=============================================================
Timer2:
return
;=============================================================
; HOTKEYS
;=============================================================
; Hotkey1
;=============================================================
; Hotkey2
;=============================================================
; Exit
;=============================================================
Exit:
^!x:: ; Hotkey ALT+x.
GuiEscape:
GuiClose:
ExitApp
;####################### #######################
;=============================================================
; FUNCTIONS
;=============================================================
;####################### #######################
[/code]
[code=autohotkey file=Performance-1.1.ahk]
;************************************************
; AHK _ SCRIPT PERFORMANCE TEMPLATE v1.0
; by HinkerLoden
; 25/03/2016
; OS --> Win 10 / etc.
;AHK Version --> 1.1.23.05
;************************************************
;************************************************
;Script Global Settings
;************************************************
#NoEnv ; Clear All Systemvariables
#Persistent ;Keeps a script permanently running until ExitApp execute
#SingleInstance force ;The word FORCE skips the dialog box and replaces the old instance automatically, which is similar in effect to the Reload command.
;************************************************
;Performance PARAMETERS
;************************************************
SetBatchLines, -1 ; look up long descriptions
Process, Priority, , A ;H - Max Speed but maybe unstable
;************************************************
; Input PARAMETERS
;************************************************
SendMode Input ;Default = Event , Play - for Speed -> Set Keydelay to -1 & Setmousedely to -1
SetKeyDelay, -1, -1, Play ; for speed -1, -1,
SetMouseDelay, -1 ;0 recommend / -1 for max speed
SetDefaultMouseSpeed, 0 ;0-100
;************************************************
;History Protocols
;************************************************
#KeyHistory 0 ; 0 - No Keyhistory
ListLines Off ; Off - for more speed
;************************************************
;Window detection
;************************************************
SetTitleMatchMode 2
SetTitleMatchMode Fast
SetWinDelay, 0
SetControlDelay, 0
;####################### #######################
; Script Parameter
;####################### #######################
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
;####################### #######################
; Prepare Start
;####################### #######################
WinMinimizeAll
;************************************************
;PERFORMANCE PARAMETERS DESCRIPTION
;************************************************
/*
;************************************************
;Performance PARAMETERS
;************************************************
SetBatchLines, -1
;default = 10ms
;SetBatchLines is set to 10 ms (the default), a task that uses 20 ms of CPU time will run for ~10 ms, sleep to allow other processes to run, and then run for the final 10 ms. If SetBatchLines is set to 2 ms, a task that uses 20 ms of CPU will sleep ~10 times before completing.
My advice... Leave SetBatchLines at the default of 10 ms. 10 ms is a good default. Most scripts run fine with this setting. If needed, increase SetBatchLines to a higher value (20ms, 50ms, -1, etc.) if one or more of your tasks needs more priority.
As Lower the Value as Slower the Script runs !!!
SetBatchLines, 20ms
SetBatchLines, LineCount
Process, Priority, , A
;L (or Low)
;B (or BelowNormal), N (or Normal), A (or AboveNormal), H (or High), R (or Realtime).
;Note: Any process not designed to run at Realtime priority might reduce system stability if set to that level.
Process, Priority, , L ;if unstable, comment or remove this line
;************************************************
; Input PARAMETERS
;************************************************
SendMode Input
;Keysettings ***********************
SetKeyDelay, -1, -1 ; Delay, PressDuration
; default = 10
;Sets the delay that will occur after each keystroke sent by Send and ControlSend. -1
;Use -1 for no delay at all and 0 for the smallest possible delay
;Mousesettings ***********************
SetMouseDelay, -1
;Sets the delay that will occur after each mouse movement or click.
;default = 10 - Sets the delay that will occur after each mouse movement or click.
SetDefaultMouseSpeed, 0
;default = 2 , Min = 0 , Max = 100
;Hotkeysettings ***********************
#MaxHotkeysPerInterval 99000000 :default = 70 - prevent creating endless loops
#HotkeyInterval 99000000 ;default = 2000 - Hoy much hotkeys can activate per ms
#MaxThreads 255 ;default 10 - How many Hotkeys + Timers .. can run simultanously
#MaxThreadsBuffer On ;default Off - This is the default behavior. A hotkey press will be ignored whenever that hotkey is already running its maximum number of threads (usually 1, but this can be changed with #MaxThreadsPerHotkey).
;************************************************
;History Protocols
;************************************************
#KeyHistory 0 ;disable KeyHistory log
ListLines, Off
;ListLines Off/On can be used to selectively omit some lines from the history, which can help prevent the history from filling up too quickly (such as in a loop with many fast iterations). ListLines Off may also improve performance by a few percent.
;************************************************
;Window detection
;************************************************
SetTitleMatchMode fast
;Fast: This is the default behavior. Performance may be substantially better than Slow, but certain WinText elements for some types of windows may not be "seen" by the various window commands.
;The built-in variables A_TitleMatchMode and A_TitleMatchModeSpeed contain the current settings.
SetWinDelay, 0 ;default = 100, no delay = -1
;Sets the delay that will occur after each windowing command, such as WinActivate.
SetControlDelay, 0 ; default = 20 , fastest = -1
;Sets the delay that will occur after each control-modifying command.
SendMode Input
; Recommended for new scripts due to its superior speed and reliability.
;Input: Switches to the SendInput method for Send, SendRaw, Click, and MouseMove/Click/Drag. Known limitations:Windows Explorer ignores SendInput's simulation of certain navigational hotkeys such as Alt+LeftArrow. To work around this, use either SendEvent !{Left} or SendInput {Backspace}.
;************************************************
;Other
;************************************************
#MaxMem 4095 ;default 64MB - Max 4095 set the Memory use for each Variable
*/
[/code]
[code=autohotkey file=GUI-Template.ahk]
;************************************************
; AHK _ SCRIPT STRUCTURE TEMPLATE v1.0
; by HinkerLoden
; 09/04/2016
; OS --> Win 10 / etc.
;AHK Version --> 1.1.23.05
;************************************************
;************************************************
;Script Global Settings
;************************************************
#NoEnv ; Clear All Systemvariables
#Persistent ;Keeps a script permanently running until ExitApp execute
#SingleInstance force ;The word FORCE skips the dialog box and replaces the old instance automatically, which is similar in effect to the Reload command.
;************************************************
;Performance PARAMETERS - if you need speed
;************************************************
;SetBatchLines, -1
;Process, Priority, , L ;A - Max Speed
;************************************************
; Input PARAMETERS
;************************************************
SendMode Input ;Default = Event , Play - for Speed -> Set Keydelay to -1 & Setmousedely to -1
;----
SetKeyDelay, 10, 10 ; for speed -1, -1,
SetMouseDelay, 25 ;0 recommend / -1 for max speed
SetDefaultMouseSpeed, 0 ;0-100
;************************************************
;History Protocols
;Switch setting for more Speed
;************************************************
#KeyHistory 1 ; 0 - No Keyhistory
ListLines On ; Off - for more speed
;************************************************
;Window detection
;************************************************
SetTitleMatchMode, 2
SetTitleMatchMode Fast ;slow detect hidden windows
SetWinDelay, 200 ;0 - for more speed
DetectHiddenWindows, On ; | Off
;i double the standard settings to be on the save side
;####################### #######################
; Script Parameter
;####################### #######################
SetWorkingDir %A_ScriptDir% ;Ensures a consistent starting directory.
;#Include %A_ScriptDir%\YourLibrarys2integrate.ahk
CoordMode, Pixel, Screen ;relative/Window - active Window
CoordMode, Mouse, Screen
;WinMinimizeAll ;optional
;####################### #######################
; Try to avoid pure numbers inside the code - adress all Vars here
;=============================================================
; Variable Section
;=============================================================
;####################### #######################
;global / static
;EnvUpdate ; --> Notifies the OS and all running applications that environment variable(s) have changed.
;####################### #######################
;=============================== TimerVars
CycleTimer1=500
CycleTimer2=500
Timer1Status=0
Timer2Status=0
;####################### #######################
;=============================================================
; CODE
;=============================================================
;####################### #######################
;=============================================================
; GUI
;=============================================================
;####################### #######################
; GUI Template
;=============================================================
Gui, Tutorial: New , -ToolWindow +AlwaysOnTop, test
gui, font, s14, Verdana
Gui Add, Text, vText x40 y24 w350 h40 +0x200, Text
Gui Add, Edit, vEdit gEdit x40 y72 w350 h40, Edit
;----------
Gui Add, Button, vButton1 gButton1 x40 y152 w132 h44, Button1
Gui Add, Button, vButton2 gButton2 x272 y152 w132 h44, Button2
;----------
Gui Add, Button, gExit x72 y272 w352 h76 cRed , -- E X I T --
Gui Show, w480 h380, Window
Return
/* Used Vars
Text =
Edit =
Button1 =
Button2 =
*/
;=============================================================
; gLabel
;=============================================================
; Button1 - Start-Stop-Timer
;=============================================================
Button1:
If Timer1Status=1
{
SetTimer, Timer1, Off
Timer1Status=0
}
SetTimer, Timer1, %CycleTimer1%
Timer1Status=1
Return
; Button2 - Start-Stop-Timer
;=============================================================
Button2:
If Timer2Status=1
{
SetTimer, Timer2, Off
Timer2Status=0
}
SetTimer, Timer2, %CycleTimer2%
Timer2Status=1
Return
; gEdit
;=============================================================
Edit:
return
;=============================================================
; TIMER
;=============================================================
; Timer1
;=============================================================
Timer1:
Return
return
; Timer2
;=============================================================
Timer2:
return
;=============================================================
; HOTKEYS
;=============================================================
; Hotkey1
;=============================================================
; Hotkey2
;=============================================================
; Exit
;=============================================================
Exit:
^!x:: ; Hotkey ALT+x.
GuiEscape:
GuiClose:
ExitApp
;####################### #######################
;=============================================================
; FUNCTIONS
;=============================================================
;####################### #######################
[/code]