take a look nnnik
http://ahkscript.org/boards/viewtopic.php?f=5&t=2125
A_TickCount to use GetTickCount64 instead of GetTickCount
Re: A_TickCount to use GetTickCount64 instead of GetTickCoun
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: A_TickCount to use GetTickCount64 instead of GetTickCoun
Oh sorry I should have clarified that a bit more:
1st exampledont forget the right end-type in ahk
Tick := ((A_Is64bitOS) ? DllCall("Kernel32.dll\GetTickCount64", "UInt64") : DllCall("Kernel32.dll\GetTickCount", "UInt"))
2nd exampleCode: Select all
var1 := A_TickCount var2 := DllCall("kernel32.dll\GetTickCount", "UInt") var3 := DllCall("kernel32.dll\GetTickCount64", "UInt64") var4 := DllCall("winmm.dll\timeGetTime", "UInt") MsgBox, % var1 "`n" var2 "`n" var3 "`n" var4 "`n"
Code: Select all
Tick := ((A_Is64bitOS) ? DllCall("Kernel32.dll\GetTickCount64", "Int64") : DllCall("Kernel32.dll\GetTickCount", "UInt"))
;Is the same as:
If A_Is64bitOS
Tick := DllCall("Kernel32.dll\GetTickCount64", "Int64") ;(A_PtrSize=64 bit&&Ptr=Int64)
Else
Tick := DllCall("Kernel32.dll\GetTickCount", "Int") ;(A_PtrSize=32 bit&&Ptr=Int)
;Is the same as
If A_Is64bitOS
Tick := DllCall("Kernel32.dll\GetTickCount64","Ptr")
Else
Tick := DllCall("Kernel32.dll\GetTickCount","Ptr")
;Is the same as
If A_Is64bitOS
Tick := DllCall("Kernel32.dll\GetTickCount64")
Else
Tick := DllCall("Kernel32.dll\GetTickCount")
;Is the same as
Tick := ((A_Is64bitOS) ? DllCall("Kernel32.dll\GetTickCount64") : DllCall("Kernel32.dll\GetTickCount"))
Recommends AHK Studio
Re: A_TickCount to use GetTickCount64 instead of GetTickCoun
Int64? ULONGLONG = A 64-bit unsigned integer = UInt64
or not?
or not?
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: A_TickCount to use GetTickCount64 instead of GetTickCoun
ULONGLONG is UInt64 : http://msdn.microsoft.com/library/cc230393
Whatever works, works...
Whatever works, works...
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: A_TickCount to use GetTickCount64 instead of GetTickCoun
There is no 64 bit Unsigned Integer in ahk.
I always thought that the standard return type is UPtr however it seems that it isn't.
But there is something else that's wrong with my post.Unsigned 64-bit integers produced by a function are not supported. Therefore, to work with numbers greater or equal to 0x8000000000000000, omit the U prefix and interpret any negative values received from the function as large integers. For example, a function that yields -1 as an Int64 is really yielding 0xFFFFFFFFFFFFFFFF if it is designed to yield a UInt64.
I always thought that the standard return type is UPtr however it seems that it isn't.
Recommends AHK Studio
Re: A_TickCount to use GetTickCount64 instead of GetTickCoun
@nnnik hahahahah
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: A_TickCount to use GetTickCount64 instead of GetTickCoun
Code: Select all
;Is the same as
If A_Is64bitOS
Tick := DllCall("Kernel32.dll\GetTickCount64")
Else
Tick := DllCall("Kernel32.dll\GetTickCount")
Also, there are 64-bit versions of Server 2003 and actually Win XP.ReturnType: If the function returns a 32-bit signed integer (Int), BOOL, or nothing at all, ReturnType may be omitted. Otherwise, specify one of the argument types from the types table below. The asterisk suffix is also supported.
Who is online
Users browsing this forum: No registered users and 28 guests