Get window size while resizing

Get help with using AutoHotkey and its commands and hotkeys
vsub
Posts: 470
Joined: 29 Sep 2015, 03:39

Get window size while resizing

15 Apr 2016, 23:20

This is what I've been using

Code: Select all

~LButton::
If StrLen(A_Cursor) = 8 ; diagonal resizing cursor
{
while GetKeyState("LButton")
{
WinGetPos,,,W,H,A
ToolTip,% W " x " H
Sleep, 50
}
Return
But since I disable the windows option "Show window contents while dragging",the code stop working.
Is there is a way to get the same result from the code above while that option is disabled
User avatar
HinkerLoden
Posts: 93
Joined: 23 Mar 2016, 07:50
GitHub: HinkerLoden

Re: Get window size while resizing

16 Apr 2016, 07:25

A_GuiWidth
A_GuiHeight
These contain the GUI window's width and height when referenced in a GuiSize subroutine. They apply to the window's client area, which is the area excluding title bar, menu bar, and borders. [v1.1.11+]: These values are affected by DPI scaling.



WinGet = Retrieves the specified window's unique ID, process ID, process name, or a list of its controls. It can also retrieve a list of all windows matching the specified criteria.

WinGetActiveStats = Combines the functions of WinGetActiveTitle and WinGetPos into one command.
WinGetActiveTitle = Retrieves the title of the active window.
WinGetClass = Retrieves the specified window's class name.
WinGetTitle = Retrieves the title of the specified window.
WinGetText = Retrieves the text from the specified window.
WinGetPos = Retrieves the position and size of the specified window.

DetectHiddenText = Determines whether invisible text in a window is "seen" for the purpose of finding the window. This affects commands such as IfWinExist and WinActivate.
DetectHiddenWindows = Determines whether invisible windows are "seen" by the script.



part of a tutorial coming up soon. Maybe a bit weird but maybe get more ideas here.

Code: Select all

;************************************************
; AHK _ SCRIPT STRUCTURE TEMPLATE v1.0
; by HinkerLoden
; 25/03/2016 
;************************************************

;************************************************
;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   
;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

DetectHiddenWindows, On			; | Off 

;WinMinimizeAll



;=============================================================
;#######################				######################
;		Window Information
;=============================================================
/*
WinGet = Retrieves the specified window's unique ID, process ID, process name, or a list of its controls. It can also retrieve a list of all windows matching the specified criteria. 
WinGetActiveStats = Combines the functions of WinGetActiveTitle and WinGetPos into one command.
WinGetActiveTitle = Retrieves the title of the active window.
WinGetClass = Retrieves the specified window's class name. 
WinGetTitle = Retrieves the title of the specified window.
WinGetText = Retrieves the text from the specified window. 
WinGetPos = Retrieves the position and size of the specified window.
DetectHiddenText = Determines whether invisible text in a window is "seen" for the purpose of finding the window. This affects commands such as IfWinExist and WinActivate. 
DetectHiddenWindows Determines whether invisible windows are "seen" by the script. 
*/

;=============================================================
;#######################				######################
;=============================================================






;#######################				######################
; 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

Cycletime = 100

Timer1Status = 0
Timer2Status = 0



Skippy:="`n`n"
Tabby :="`t" 


;#######################				#######################
;=============================================================
; 						CODE 
;=============================================================
;#######################				#######################

 
 
;=============================================================
; 						GUI 
;=============================================================
; Template
;=============================================================

;#######################				#######################
; GUI Template
;=============================================================

Gui, Tutorial: New , -ToolWindow , 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, Checkbox,  				x40 y240 , Checkbox 
;----------
Gui Add, Button, gExit x72 y272 w352 h76 cRed , -- E X I T --

Gui Show, w480 h380, Window
Return





;=============================================================
; 						gLabel 
;=============================================================
; Button1 - Start-Stop-Timer
;=============================================================
Button1:

TimerState := SetGetTimer (A_ThisLabel,"t")

If not (TimerState = Cycletime)
	{
	SetGetTimer(A_ThisLabel, Cycletime) 
	MsgBox, % "Timer Starts" A_GuiControl "_"  A_ThisLabel "_" TimerState
	return
	}
	

If (A_GuiControl =  A_ThisLabel) AND (TimerState = Cycletime)
	{
	TimeActive := SetGetTimer(A_ThisLabel,"Off")
	
	MsgBox, Timer Stops `n`n Timeactive - %TimeActive%
	return
	}
	

MouseGetPos, OutputVarX, OutputVarY,OutputVarWin, OutputVarControl, 	;1|2|3]


/*
OutputVarWin
This optional parameter is the name of the variable in which to store the unique ID number of the window 

OutputVarControl
This optional parameter is the name of the variable in which to store the name (ClassNN) of the control under the mouse cursor.
*/


/*
WinGet = Retrieves the specified window's unique ID, process ID, process name, or a list of its controls. It can also retrieve a list of all windows matching the specified criteria.
 
WinGetActiveStats = Combines the functions of WinGetActiveTitle and WinGetPos into one command.
WinGetActiveTitle = Retrieves the title of the active window.
WinGetClass = Retrieves the specified window's class name. 
WinGetTitle = Retrieves the title of the specified window.
WinGetText = Retrieves the text from the specified window. 
WinGetPos = Retrieves the position and size of the specified window.

DetectHiddenText = Determines whether invisible text in a window is "seen" for the purpose of finding the window. This affects commands such as IfWinExist and WinActivate. 
DetectHiddenWindows = Determines whether invisible windows are "seen" by the script. 
*/

WinGet, active_id, ID, A

WinGetClass, this_class, ahk_id %active_id%
WinGetTitle, this_title, ahk_id %active_id%
WinGetText, OutputVar  ;[, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinGetActiveStats, Window_Title, Window_Width, Window_Height, Window_X, Window_Y

ToolTip , % "X - "OutputVarX  Tabby "Y - "OutputVarY Skippy  Skippy "active_id - " active_id Skippy "this_class - " this_class Skippy  "this_title - " this_title Skippy "OutputVarWin - "  OutputVarWin Skippy  "OutputVarControl - " OutputVarControl Skippy "Window_Title - "  OutputVarWin Skippy "Window_Width - "  Window_Width Skippy "Window_Height - "  Window_Height Skippy  "Window_X - "  Window_X Skippy  "Window_Y - "  Window_Y Skippy


	

Return 


/*
GetTimer, OutputVar,TimerLabel [, Mode]
TimerState := GetTimer("TimerLabel" [, "Mode"])
 
---------------------------------
OutputVar:
if TimerLabel Exists, OutputVar is returned a Positive value based on Mode.
If TimerLabel does not exist, OutputVar will receive the value -1.
See SetTimer, for help on setting up timers.
---------------------------------
TimerLabel:
This is the source timers name.
Note Using a non-existant timer name will cause this command to return -1. See SetTimer, for help on setting up timers.
---------------------------------
Mode: [e|r|t]
e = Returns the time Elapsed, to the OutputVar.
r = Returns the time Remaining, to the OutputVar.
(If Mode is left blank, r will be the default mode.)
t = Returns the Total time TimerLabel was last set for, to the OutputVar.
---------------------------------



 SetGetTimer( SetGetTimer(Timer2))

 while A_GuiControl = A_Label
 
If Timer1Status=1
	{
	SetTimer, Timer1, Off
	Timer1Status=0
	}
SetTimer, Timer1, %CycleTimer1%
Timer1Status=1

*/


; Button2 - Start-Stop-Timer
;=============================================================
Button2:

TimerToggle("100",A_GuiControl,A_ThisLabel)


	

;CoordMode, ToolTip|Pixel|Mouse|Caret|Menu [, Screen|Window|Client]

CoordMode, Mouse ,Window
MouseGetPos, WindowX, WindowY
CoordMode, Mouse ,Client
MouseGetPos, ClientX, ClientY

CoordMode, Mouse ,Screen
MouseGetPos, ScreenX, ScreenY,OutputVarWin, OutputVarControl, 

ToolTip , % "SCREEN -->" Tabby "X - "ScreenX  Tabby "Y - "ScreenY Skippy  "WINDOW -->" Tabby "X - "WindowX  Tabby "Y - "WindowY Skippy  "CLIENT -->" Tabby "X - "ClientX  Tabby "Y - "ClientY Skippy Skippy "OutputVarWin - "  OutputVarWin Skippy  "OutputVarControl - " OutputVarControl Skippy  "Active Control Coord - "  "X - "A_CaretX Tabby "Y - "A_CaretY Skippy

	


return



; --------------------------------------------------------------
; --------------------------------------------------------------
;Lable2TimerToggle
; --------------------------------------------------------------

	
TimerToggle(Cycletime,GuiControl,ThisLabel)

{
TimerState:=SetGetTimer(ThisLabel,"t")

;MsgBox, 	"Control" %GuiControl% `n Skip "Active Label" %ThisLabel% `n "State" %TimerState%

If not (TimerState = Cycletime)
	{
	SetGetTimer(ThisLabel, Cycletime) 
	;MsgBox, A_GuiControl" "%GuiControl%"  `n 
	return
	}
	

If (GuiControl =  ThisLabel) AND (TimerState = Cycletime)
	{
	TimeActive := SetGetTimer(ThisLabel,"Off")
	
	MsgBox, Timer Stops `n`n Timeactive - %TimeActive%
	return
	}
	
	
Return

}



















; gEdit
;=============================================================
Edit:


return
;=============================================================
; 						TIMER 
;=============================================================





; Timer2
;=============================================================
Timer2:
 
return
 
;=============================================================
; 						HOTKEYS 
;=============================================================




; 	---->	F9	<----
;=============================================================



F9::

WinGet, ControlList, ControlList, A
ToolTip, %ControlList%


Loop, Parse, ControlList, `n  ; Rows are delimited by linefeeds (`n).
{
    RowNumber := A_Index
    Loop, Parse, A_LoopField, %A_Tab%  ; Fields (columns) in each row are delimited by tabs (A_Tab).
	
	;ControlGet, ControlVar, CurrentLine,, A_LoopField
    
	ControlGet, OutputVar, Hwnd,, Edit1, A
	
	MsgBox Row #%RowNumber% Col #%A_Index% is %A_LoopField%. #Control - %ControlVar%
}

Return


F10::
WinGet, ControlList, ControlList, A

Loop, Parse, ControlList, `n  ; Rows are delimited by linefeeds (`n).
{
	Loop, Parse, A_LoopField, %A_Tab%
	
	ControlGet, ControlStatus_Checked	,Checked,, %A_LoopField%, A	
	;Checked: Sets OutputVar to be 1 if the checkbox or radio button is checked or 0 if not.
	
	ControlGet, ControlStatus_Enabled	,Enabled,, %A_LoopField%, A
	;Enabled: Sets OutputVar to be 1 if Control is enabled, or 0 if disabled.

	ControlGet, ControlStatus_Visible	,Visible,, %A_LoopField%, A
	;Visible: Sets OutputVar to be 1 if Control is visible, or 0 if hidden.
	
	ControlGet, ControlStatus_Tab		,Tab,, %A_LoopField%, A
	;Tab: Sets OutputVar to the tab number of a SysTabControl32 control. The first tab is 1, the second is 2, etc. To instead discover how many tabs (pages) exist in a tab control, follow this example:
	
	ControlGet, ControlStatus_FindString,FindString, THIS IS A TEST,, %A_LoopField%, A
	;FindString, String: Sets OutputVar to the entry number of a ListBox or ComboBox that is an exact match for String. The first entry in the control is 1, the second 2, and so on. If no match is found, OutputVar is made blank and ErrorLevel is set to 1.
	
	ControlGet, ControlStatus_LineCount	,LineCount,, %A_LoopField%, A
	;LineCount: Sets OutputVar to be the number of lines in an Edit control. All Edit controls have at least 1 line, even if the control is empty.
	
	ControlGet, ControlStatus_CurrentLine,CurrentLine,, %A_LoopField%, A
	;CurrentLine: Sets OutputVar to be the line number in an Edit control where the caret (insert point) resides. The first line is 1. If there is text selected in the control, OutputVar is set to the line number where the selection begins.
	
	
	ControlGet, ControlStatus_CurrentCol,CurrentCol	,, %A_LoopField%, A
	;CurrentCol: Sets OutputVar to be the column number in an Edit control where the caret (text insertion point) resides. The first column is 1. If there is text selected in the control, OutputVar is set to the column number where the selection begins.
	
	ControlGet, ControlStatus_LineN,Line, 1,, %A_LoopField%, A
	;Line, N: Sets OutputVar to be the text of line N in an Edit control. Line 1 is the first line. Depending on the nature of the control, OutputVar might end in a carriage return (`r) or a carriage return + linefeed (`r`n). If the specified line number is blank or does not exist, ErrorLevel is set to 1 and OutputVar is made blank.
	
	ControlGet, ControlStatus_Selected,Selected	,, %A_LoopField%, A
	;Selected: Sets OutputVar to be the selected text in an Edit control. If no text is selected, OutputVar will be made blank and ErrorLevel will be set to 0 (i.e. no error). Certain types of controls, such as RichEdit20A, might not produce the correct text in some cases (e.g. Metapad).
	
	ControlGet, ControlStatus_Style	,Style,, %A_LoopField%, A
	;Style: Retrieves an 8-digit hexadecimal number representing the style of the control. See the styles table for a listing of some styles.
		
	ControlGet, ControlStatus_ExStyle ,ExStyle,, %A_LoopField%, A
	;ExStyle: Retrieves an 8-digit hexadecimal number representing the extended style of the control.
	
	ControlGet, ControlStatus_Hwnd,Hwnd,, %A_LoopField%, A
	;Hwnd [v1.0.43.06+]: Retrieves the window handle (HWND) of the specified control. For example: ControlGet, OutputVar, Hwnd,, Edit1, WinTitle. A control's HWND is often used with PostMessage, SendMessage, and DllCall. On a related note, a control's HWND can also be retrieved via MouseGetPos. Finally, a control's HWND can be used directly as an ahk_id WinTitle (this also works on hidden controls even when DetectHiddenWindows is Off).
	
		
	MsgBox,  Item number %A_Index% is %A_LoopField%. #%ControlStatus_Checked%
}

SplashTextOff
return


;		###################			####################


; 		####	https://autohotkey.com/docs/commands/ControlGet.htm		####

/*
ControlGet, OutputVar, List, Options, SysListView321, WinTitle, WinText

ControlGet, OutputVar, Cmd [, Value, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]



;		###################			####################



Cmd, Value

ListBox, ComboBox, DropDownList: All the text is retrieved from the control (that is, the ListView options above such as Count and Selected are not supported).

Each row except the last will be terminated by a linefeed character (`n). To access the items individually, use a parsing loop as in this example:

ControlGet, List, List,, ComboBox1, WinTitle
Loop, Parse, List, `n
    MsgBox Item number %A_Index% is %A_LoopField%.
Select | Download
Checked: Sets OutputVar to be 1 if the checkbox or radio button is checked or 0 if not.

;		############	
Enabled: Sets OutputVar to be 1 if Control is enabled, or 0 if disabled.

;		############	
Visible: Sets OutputVar to be 1 if Control is visible, or 0 if hidden.

;		############	
Tab: Sets OutputVar to the tab number of a SysTabControl32 control. The first tab is 1, the second is 2, etc. To instead discover how many tabs (pages) exist in a tab control, follow this example:

;		############	
SendMessage, 0x1304,,, SysTabControl321, WinTitle  ; 0x1304 is TCM_GETITEMCOUNT.
TabCount = %ErrorLevel%
Select | Download
FindString, String: Sets OutputVar to the entry number of a ListBox or ComboBox that is an exact match for String. The first entry in the control is 1, the second 2, and so on. If no match is found, OutputVar is made blank and ErrorLevel is set to 1.

;		############	
Choice: Sets OutputVar to be the name of the currently selected entry in a ListBox or ComboBox. To instead retrieve the position of the selected item, follow this example (use only one of the first two lines):

SendMessage, 0x188, 0, 0, ListBox1, WinTitle  ; 0x188 is LB_GETCURSEL (for a ListBox).
SendMessage, 0x147, 0, 0, ComboBox1, WinTitle  ; 0x147 is CB_GETCURSEL (for a DropDownList or ComboBox).
ChoicePos = %ErrorLevel%  ; It will be -1 if there is no item selected.
ChoicePos += 1  ; Convert from 0-based to 1-based, i.e. so that the first item is known as 1, not 0.
Select | Download
LineCount: Sets OutputVar to be the number of lines in an Edit control. All Edit controls have at least 1 line, even if the control is empty.

;		############	
CurrentLine: Sets OutputVar to be the line number in an Edit control where the caret (insert point) resides. The first line is 1. If there is text selected in the control, OutputVar is set to the line number where the selection begins.

;		############	
CurrentCol: Sets OutputVar to be the column number in an Edit control where the caret (text insertion point) resides. The first column is 1. If there is text selected in the control, OutputVar is set to the column number where the selection begins.

Line, N: Sets OutputVar to be the text of line N in an Edit control. Line 1 is the first line. Depending on the nature of the control, OutputVar might end in a carriage return (`r) or a carriage return + linefeed (`r`n). If the specified line number is blank or does not exist, ErrorLevel is set to 1 and OutputVar is made blank.

;		############	
Selected: Sets OutputVar to be the selected text in an Edit control. If no text is selected, OutputVar will be made blank and ErrorLevel will be set to 0 (i.e. no error). Certain types of controls, such as RichEdit20A, might not produce the correct text in some cases (e.g. Metapad).

;		############	
Style: Retrieves an 8-digit hexadecimal number representing the style of the control. See the styles table for a listing of some styles.

;		############	
ExStyle: Retrieves an 8-digit hexadecimal number representing the extended style of the control.

;		############	
Hwnd [v1.0.43.06+]: Retrieves the window handle (HWND) of the specified control. For example: ControlGet, OutputVar, Hwnd,, Edit1, WinTitle. A control's HWND is often used with PostMessage, SendMessage, and DllCall. On a related note, a control's HWND can also be retrieved via MouseGetPos. Finally, a control's HWND can be used directly as an ahk_id WinTitle (this also works on hidden controls even when DetectHiddenWindows is Off).



*/


/*
SetTimer, WatchActiveWindow, 200
WatchActiveWindow:




WinGet = Retrieves the specified window's unique ID, process ID, process name, or a list of its controls. It can also retrieve a list of all windows matching the specified criteria.
 
WinGetActiveStats = Combines the functions of WinGetActiveTitle and WinGetPos into one command.
WinGetActiveTitle = Retrieves the title of the active window.
WinGetClass = Retrieves the specified window's class name. 
WinGetTitle = Retrieves the title of the specified window.
WinGetText = Retrieves the text from the specified window. 
WinGetPos = Retrieves the position and size of the specified window.
DetectHiddenText = Determines whether invisible text in a window is "seen" for the purpose of finding the window. This affects commands such as IfWinExist and WinActivate. 
DetectHiddenWindows Determines whether invisible windows are "seen" by the script. 

*/




Return





; Hotkey2
;=============================================================




; Exit 
;=============================================================
Exit:
!x::  ; Hotkey ALT+x.
GuiEscape:
GuiClose:
 ExitApp


 
;#######################				#######################
;=============================================================
; 						FUNCTIONS 
;=============================================================
;#######################				#######################



SetGetTimer(label, Period = "remain", Priority = 0)
{
   static timers
   If period is digit
   {
      If RegExMatch(timers,"i)(" . Chr(2) label Chr(3) "\d+" Chr(4) "\d+" Chr(2) . ")",found)
         StringReplace,timers,timers,%found%,
      timers .= Chr(2) label Chr(3) A_TickCount Chr(4) Period Chr(2)
      SetTimer, %Label%, %Period%, %Priority%
   } Else If Period in total,remain,elapsed,off,e,t,r
   {
      If !RegExMatch(timers,"i)" Chr(2) label Chr(3) "(\d+)" Chr(4) "(\d+)" Chr(2),f)
         Return
      x:=Round((A_TickCount-f1)/f2)
      neg:=(f1 + f2*x - A_TickCount < 0)
      If (Period = "off"){
         SetTimer,%label%,Off
         StringReplace,timers,timers,%f%
      } Else If Period in total,t
         Return f2
      Else If Period in elapsed,e
      {
         If neg
            Return A_TickCount-f1 - f2*x
         Else
            Return A_TickCount-f1 - ((x-1)*f2)
      } Else If ((Period="remain" || Period="r" || Period="")){
         If neg
            Return f1+((x+1)*f2)-A_TickCount
         Else
            Return f1+f2*x-A_TickCount
      }
   }
}
 
/*
;###########   https://autohotkey.com/board/topic/55329-setgettimer/  by Hotkeyit ######
 
I'd like to propose, if one does not presently exist, a command to acquire the time left on a timer, the time elapsed 
 
time, & the total time the timer was sent for. I've gone ahead and outlined this theoretical function, using a format 
 
which resembles the help documentation included with AutoHotkey. I would like to hope, that if no such function 
 
presently exists, that it be included in the future, with a similar functionality to that outlined below. Corrections 
 
are welcome.
 
GetTimer, OutputVar,TimerLabel [, Mode]
TimerState := GetTimer("TimerLabel" [, "Mode"])
 
---------------------------------
OutputVar:
if TimerLabel Exists, OutputVar is returned a Positive value based on Mode.
If TimerLabel does not exist, OutputVar will receive the value -1.
See SetTimer, for help on setting up timers.
---------------------------------
TimerLabel:
This is the source timers name.
Note Using a non-existant timer name will cause this command to return -1. See SetTimer, for help on setting up timers.
---------------------------------
Mode: [e|r|t]
e = Returns the time Elapsed, to the OutputVar.
r = Returns the time Remaining, to the OutputVar.
(If Mode is left blank, r will be the default mode.)
t = Returns the Total time TimerLabel was last set for, to the OutputVar.
---------------------------------
 
;Examples of GetTimer proposed functionality:
 
luke: msgbox, I like Swords!
setTimer, luke, 10000
 
Msgbox % "Timer Luke, set for: " . GetTimer("luke", "t") . " Millisecond(s)."
 
;------5 seconds have elapsed------
Msgbox % "Timer Luke, has been running for: " . GetTimer("luke", "e") . " Millisecond(s).`nTimer Luke, has " .  
 
GetTimer("luke", "e") . " Milliseconds remaining!"
 
countTo5Secs = 0
loop
{
countTo5Secs++
if GetTimer("luke", "e") > 5000
 break
sleep 1000
}
 
;-----8 seconds have elapsed------
 
GetTimer, int, luke, r
  ;int = 2000
GetTimer, int, luke, e
  ;int = 8000
GetTimer, int, luke, t
  ;int = 10000
 
;------14 seconds have elapsed------
 
;NOTE
;The following assumes finished timers remain in memory, 
;but are nolonger processed.
 
GetTimer, result, luke, r
  ;result = 0
GetTimer, e, luke, e
  ;e = 10000  ;Note the timer stops counting after it reaches it's total.
GetTimer, setFor, luke, t
  ;setFor = 10000
 
;------14 seconds have elapsed------
 
;NOTE
;The following assumes finished timers DO NOT remain in memory, 
GetTimer, ping, luke, r
  ;ping = -1  timer "luke" does not exist. 
GetTimer, tick, luke, e
  ;tick = -1  timer "luke" does not exist. 
GetTimer, bong, luke, t
  ;bong = -1  timer "luke" does not exist. 
*/

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Chunjee, Google [Bot], guivho, Raymond888, Slapx, teadrinker and 82 guests