Hello.
Is it possible to force some script to run always as U32? By default I use U64 but I also use once of my older script that is U32 compatile only because of some DLL functions and I want to force somehow this script to run always as U32 independently of my current settings. Any tips?
force run script as unicode 32 Topic is solved
Re: force run script as unicode 32
Either compile your script with the unicode 32 bit base file and run the the exe-file - you can choose it in the options when you run the ahk2exe compiler (included with AHK) - or use this, if you want, for example, to change the ahk-file from time to time without the need to re-compile:
MyScript.ahk --> rename AutoHotkeyU32.exe to MyScript.exe --> run Myscript.exe (which will run MyScript.ahk automatically without further parameters
(Or perhaps use a specific file extension for unicode 32 bit files that you then register with AutoHotkeyU32.exe)
That means, make a copy of AutoHotkeyU32.exe from the AutoHotkey folder, copy it to your script's folder and rename it, so that it will run your ahk-script, when you run the exe:https://www.autohotkey.com/docs/Scripts.htm#cmd wrote: if you rename AutoHotkey.exe to MyScript.exe, it will attempt to find MyScript.ahk
MyScript.ahk --> rename AutoHotkeyU32.exe to MyScript.exe --> run Myscript.exe (which will run MyScript.ahk automatically without further parameters
(Or perhaps use a specific file extension for unicode 32 bit files that you then register with AutoHotkeyU32.exe)
Re: force run script as unicode 32 Topic is solved
I use this method when I need to run in 32bit mode, putting the following to the top of the script:
Please note then A_Args require at least the version v1.1.27.
Code: Select all
if (A_Args.Length() = 0) {
Run, "C:\Program Files\AutoHotkey\AutoHotkeyU32.exe" %A_ScriptFullPath% 1
ExitApp
}
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Re: force run script as unicode 32
@Odlanir
Brilliant
thanks
PS i just mod this to that for own purposes
if(A_IsUnicode!=1 || A_PtrSize!=4)
Brilliant
thanks
PS i just mod this to that for own purposes
if(A_IsUnicode!=1 || A_PtrSize!=4)
Who is online
Users browsing this forum: TschiepTschiep, ymnaren and 137 guests