Переставил скрипт на unicode. Использую такой дебаггер:
DebugMessage(tag, str)
{
global h_stdout, DebugFile, DebugShow, debug
DebugConsoleInitialize() ; start console window if not yet started
if instr(DebugShow, tag) && debug
{
str .= "`n" ; add line feed
FileAppend, %str%, debug.txt
;FileAppend, %line%`n, debug.txt
DllCall("WriteFile", "uint", h_Stdout, "uint", &str, "uint", StrLen(str), "uint*", BytesWritten, "uint", NULL) ; write into the console
}
WinSet, Bottom,, ahk_id %h_stout% ; keep console on bottom
}
DebugConsoleInitialize()
{
global h_Stdout ; Handle for console
static is_open = 0 ; toogle whether opened before
if (is_open = 1) ; yes, so don't open again
return
is_open := 1
; two calls to open, no error check (it's debug, so you know what you are doing)
DllCall("AttachConsole", int, -1, int)
DllCall("AllocConsole", int)
dllcall("SetConsoleTitle", "str","Paddy Debug Console") ; Set the name. Example. Probably could use a_scriptname here
h_Stdout := DllCall("GetStdHandle", "int", -11) ; get the handle
WinSet, Bottom,, ahk_id %h_stout% ; make sure it's on the bottom
WinMove, ahk_id %h_stout% , , , , -800, 800
WinActivate,Lightroom ; Application specific; I need to make sure this application is running in the foreground. YMMV
return
}
Стал выводить каждый символ через пробел... Как можно исправить?