Xenobiologist Posted November 27, 2018 Posted November 27, 2018 Is there already a 64bit version of this code out there? Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
trancexx Posted November 27, 2018 Author Posted November 27, 2018 8 hours ago, Xenobiologist said: Is there already a 64bit version of this code out there? Not until few moments ago. First post edited. uncommon, FrancescoDiMuro, argumentum and 1 other 4 ♡♡♡ . eMyvnE
Xenobiologist Posted November 28, 2018 Posted November 28, 2018 Thanks! I'll replace the code in my script :-) Hopefully it also has a positive effect on the flickering effect. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
argumentum Posted November 28, 2018 Posted November 28, 2018 6 hours ago, Xenobiologist said: Hopefully it also has a positive effect on the flickering effect. Should not flicker, but, you could change where it say "491" to "1000", and that I found, is ok. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Xenobiologist Posted December 3, 2018 Posted December 3, 2018 One more thing. Could somebody please explain how to force the output to 24h-format in 64-bit mode? Thanks! Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
argumentum Posted December 3, 2018 Posted December 3, 2018 (edited) 3 hours ago, Xenobiologist said: Could somebody please explain how to force the output to 24h-format in 64-bit mode? On 10/16/2009 at 7:38 AM, trancexx said: Regarding code I posted, there is the wrong value for TIME_FORCE24HOURFORMAT constant used. The correct value is 8. =) PS: "49B9" & SwapEndian(DllStructGetPtr($tSpace, "Format")) & _ "49C7C0" & SwapEndian(0, 4) & _ "BA" & SwapEndian( 8 , 4) & _ ; TIME_FORCE24HOURFORMAT "B9" & SwapEndian(0, 4) & _ PS2: @trancexx, I'm in the USA and here the am/pm is what is expected. Presenting someone with 18 hours is like what ???, what time is that ?. Could you make the output to show am/pm ? Thanks Edited December 3, 2018 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
trancexx Posted December 3, 2018 Author Posted December 3, 2018 1 hour ago, argumentum said: =) PS: "49B9" & SwapEndian(DllStructGetPtr($tSpace, "Format")) & _ "49C7C0" & SwapEndian(0, 4) & _ "BA" & SwapEndian( 8 , 4) & _ ; TIME_FORCE24HOURFORMAT "B9" & SwapEndian(0, 4) & _ PS2: @trancexx, I'm in the USA and here the am/pm is what is expected. Presenting someone with 18 hours is like what ???, what time is that ?. Could you make the output to show am/pm ? Thanks You would need to change that 8 to 0 and Format string to "hh:mm:ss tt" after making it larger , set Locale to 1033 (en-us), adjust "output size" parameter and "Result" buffer accordingly, and obviously make strings buffer larger to start with. If you'd be having problems with that I'll spoon-feed you, no worries :D. ♡♡♡ . eMyvnE
argumentum Posted December 3, 2018 Posted December 3, 2018 (edited) 29 minutes ago, trancexx said: change that 8 to 0 and Format string to "hh:mm:ss tt" after making it larger , set Locale to 1033 (en-us), ..... If you'd be having problems with that I'll spoon-feed you lol, please do !. All I got to muster is where the 8 goes PS: "hh:mm tt" works. Can't find how to expand the string size I guess. PS2: my mods: Spoiler Local $pSendMessageW = $aSendMessageW[0], $n = 20 ; <<<<< expanding the string from 9 to ... more, much more ; Allocate enough memory with PAGE_EXECUTE_READWRITE for code to run $aCall = DllCall("kernel32.dll", "ptr", "VirtualAlloc", _ "ptr", 0, _ "dword", ($n * 4) + 256, _ ; 36 bytes for strings + 256 bytes for code "dword", 4096, _ ; MEM_COMMIT "dword", 64) ; PAGE_EXECUTE_READWRITE If @error Or Not $aCall[0] Then Return SetError(6, 0, 0) Local $pRemoteCode = $aCall[0] ; Make structure in reserved space Local $CodeBuffer = DllStructCreate("byte[256]", $pRemoteCode) ; Arrange strings in reserved space Local $tSpace = DllStructCreate("wchar Format["& $n &"];wchar Result[" & $n & "]", $pRemoteCode + DllStructGetSize($CodeBuffer)) ;~ DllStructSetData($tSpace, "Format", "hh:mm:ss tt") ; <<<< does not work DllStructSetData($tSpace, "Format", "mm:ss tt") ; <<<< does work Edited December 3, 2018 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
trancexx Posted December 3, 2018 Author Posted December 3, 2018 I would go this way: expandcollapse popup;... Global $hLabel = GUICtrlCreateLabel("", 245, 245, 100, 20) ;... Local Const $sFormat = "hh:mm:ss tt" Local $iLenStr = StringLen($sFormat) + 1 ; Allocate enough memory with PAGE_EXECUTE_READWRITE for code to run $aCall = DllCall("kernel32.dll", "ptr", "VirtualAlloc", _ "ptr", 0, _ "dword", 2 * $iLenStr + 512, _ "dword", 4096, _ ; MEM_COMMIT "dword", 64) ; PAGE_EXECUTE_READWRITE If @error Or Not $aCall[0] Then Return SetError(6, 0, 0) EndIf Local $pRemoteCode = $aCall[0] ; Make structure in reserved space Local $CodeBuffer = DllStructCreate("byte[512]", $pRemoteCode) ; Arrange strings in reserved space Local $tSpace = DllStructCreate("wchar Format[" & $iLenStr & "];wchar Result[" & $iLenStr & "]", $pRemoteCode + 512) DllStructSetData($tSpace, "Format", $sFormat) ; Write assembly If @AutoItX64 Then DllStructSetData($CodeBuffer, 1, _ "0x" & _ "4883EC" & SwapEndian(72, 1) & _ "C7442428" & SwapEndian($iLenStr, 4) & _ "48BF" & SwapEndian(DllStructGetPtr($tSpace, "Result")) & _ "48897C2420" & _ "49B9" & SwapEndian(DllStructGetPtr($tSpace, "Format")) & _ "49C7C0" & SwapEndian(0, 4) & _ "BA" & SwapEndian(0, 4) & _ "B9" & SwapEndian(1033, 4) & _ "48B8" & SwapEndian($pGetTimeFormatW) & _ "FFD0" & _ "49B9" & SwapEndian(DllStructGetPtr($tSpace, "Result")) & _ "49C7C0" & SwapEndian(0, 4) & _ "BA" & SwapEndian(12, 4) & _ "48B9" & SwapEndian(GUICtrlGetHandle($hControl)) & _ "48B8" & SwapEndian($pSendMessageW) & _ "FFD0" & _ "B9" & SwapEndian(491, 4) & _ "48B8" & SwapEndian($pSleep) & _ "FFD0" & _ "4883C4" & SwapEndian(72, 1) & _ "E9" & SwapEndian(-136) & _ "C3" _ ) Else DllStructSetData($CodeBuffer, 1, _ "0x" & _ "68" & SwapEndian($iLenStr) & _ ; push output size "68" & SwapEndian(DllStructGetPtr($tSpace, "Result")) & _ ; push pointer to output container "68" & SwapEndian(DllStructGetPtr($tSpace, "Format")) & _ ; push pointer to format string "68" & SwapEndian(0) & _ ; push NULL "68" & SwapEndian(0) & _ ; push 0 "68" & SwapEndian(1033) & _ ; push en-us Locale "B8" & SwapEndian($pGetTimeFormatW) & _ ; mov eax, [$pGetTimeFormatW] "FFD0" & _ ; call eax "68" & SwapEndian(DllStructGetPtr($tSpace, "Result")) & _ ; push pointer to the result "68" & SwapEndian(0) & _ ; push wParam "68" & SwapEndian(12) & _ ; push WM_SETTEXT "68" & SwapEndian(GUICtrlGetHandle($hControl)) & _ ; push HANDLE "B8" & SwapEndian($pSendMessageW) & _ ; mov eax, [$pSendMessageW] "FFD0" & _ ; call eax "68" & SwapEndian(491) & _ ; push Milliseconds "B8" & SwapEndian($pSleep) & _ ; mov eax, [$pSleep] "FFD0" & _ ; call eax "E9" & SwapEndian(-81) & _ ; jump back 81 bytes (start address) "C3" _ ; Ret ) EndIf ;... uncommon and argumentum 1 1 ♡♡♡ . eMyvnE
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now