Obviously notI voted yes, but, er.. was the poll here before or was just introduced ?

BTW, I acctually can't imagine why would somebody vote negative here.... :roll:
Obviously notI voted yes, but, er.. was the poll here before or was just introduced ?
BTW, I acctually can't imagine why would somebody vote negative here.... :roll:
Damn, this hurts...Just trying to be imaginative
Not even that big. The buffer AutoHotkey uses is 65534 bytes. It's based on the limit of an Edit control on Win9x.Not that big - 16,350.
In my environment(Windows 7 64bit), the script crashes with those lines. I had to change it to "str" but if I do so, the AutoHotkey main window gets activated.Edit @ 2010-10-21 - Unicode builds of AutoHotkey_L require the additions shown in green (optional for the ANSI build):
pSFW := DllCall("GetProcAddress", "uint", hmod, "[color=green]a[/color]str", "SetForegroundWindow") pSW := DllCall("GetProcAddress", "uint", hmod, "[color=green]a[/color]str", "ShowWindow")
build := A_PtrSize*8 Msgbox AHK Version: %A_AhkVersion% Build: %build% Unicode: %A_IsUnicode%The result of the above code:
AHK Version: 1.0.48.05.L61 Build: 64 Unicode: 1
Hmm, I haven't been successful doing it. Thanks for the info. However, I seem to have found a workaround. Do you think this slows down the script or causes any side effects?You could try replacing "uint" with "ptr" for the pointer/handle parameters.
Loop { tick := A_TickCount ToolTip % ListGlobalVars() sleep 100 } ~Esc::ExitApp ListGlobalVars() { static hwndEdit, hwnd_owner, hwnd_hidden, hwnd_tray dhw := A_DetectHiddenWindows DetectHiddenWindows, On if !hwndEdit { PID := DllCall("GetCurrentProcessId") ControlGet, hwndEdit, Hwnd,, Edit1, ahk_class AutoHotkey ahk_pid %PID% WinGet, hwnd_tray, ID, ahk_pid %PID% hwnd_owner := DllCall("GetWindow", "uint", hwnd_tray, "uint", "4" ) Gui, 99:+LastFound hwnd_hidden := WinExist() } DllCall("SetParent", "uint", hwnd_tray, "uint", hwnd_hidden) ListVars ControlGetText, text,, ahk_id %hwndEdit% RegExMatch(text, "sm)(?<=^Global Variables \(alphabetical\)`r`n-{50}`r`n).*", text) WinSet, Style, +0x40000000, ahk_id %hwnd_tray% WinHide, ahk_id %hwnd_tray% DllCall("SetParent", "uint", hwnd_tray, "uint", hwnd_owner) WinSet, Style, -0x40000000, ahk_id %hwnd_tray% DetectHiddenWindows, %dhw% return text }
ok,See my reply to his post.
If you set the parent to "int", -3 (HWND_MESSAGE) instead of UInt,WinExist("ahk_class Shell_TrayWnd"), AutoHotkey becomes a message-only window. This prevents it from stealing the focus, so getting variables,etc. doesn't interrupt the user.
So I triedIt does still cause the active window to flicker, though...
DllCall("SetParent", "uint", hwnd_tray, "int", -3)instead of
DllCall("SetParent", "uint", hwnd_tray, "uint", hwnd_hidden)I'm not seeing any window flickering but indeed it steals the focus. hmm.
Works perfectly, thanks.See my updated post. It should work on all current builds of AutoHotkey Basic and AutoHotkey_L.
had becomeRegExMatch(text, "sm)(?<=^Global Variables \(alphabetical\)`r`n-{50}`r`n).*", text)
Frustrating!RegExMatch(text, "sm)(?<=^global Variables \(Alphabetical\)`r`n-{50}`r`n).*", text)
Since this doesn't happen often, I'd totally understand if Lexikos doesn't want to add it to his code, but I thought I'd share it anyway (and perhaps if I paste Lexikos' code in again, I'll have this to remind me if things go wrong.)RegExMatch(text, "ism)(?<=^Global Variables \(alphabetical\)`r`n-{50}`r`n).*", text)