huh, didnt see its documented now https://www.autohotkey.com/docs/v2/Concepts.htm#uninitialized-variables
although not in the place id expect to look when searching for it, thats for sure...
nevermind
Search found 6220 matches
- 12 Apr 2023, 17:46
- Forum: Ask for Help (v2)
- Topic: [V2] Gui in class
- Replies: 7
- Views: 865
- 12 Apr 2023, 17:26
- Forum: Ask for Help (v2)
- Topic: Variables
- Replies: 5
- Views: 272
Re: Variables
Code: Select all
#Requires AutoHotkey v1.1.36.02
q::doSomethingWithMyPhoto(1)
w::doSomethingWithMyPhoto(2)
e::doSomethingWithMyPhoto(3)
r::doSomethingWithMyPhoto(4)
doSomethingWithMyPhoto(numberOfMyPhoto) {
MsgBox % numberOfMyPhoto
}
- 12 Apr 2023, 17:01
- Forum: Ask for Help (v2)
- Topic: [V2] Gui in class
- Replies: 7
- Views: 865
Re: [V2] Gui in class
althrough I would almost expect an error. u cant expect an error, because the behavior is not erroneous. everything uve written so far is valid in the context of the reference semantics/object lifetime ruleset that ahk(and most other garbage collecting systems based on reference counting, for that ...
- 12 Apr 2023, 16:26
- Forum: Ask for Help (v1)
- Topic: WinEvents: why delete old hook before generate a new hook?
- Replies: 2
- Views: 199
Re: WinEvents: why delete old hook before generate a new hook?
because whoever wrote this function thought it would be a good idea to delete old, existing hooks that target the same event constant
u can register as many hooks as ur process's current, remaining USER Handles count would permit, up to a limit of 10'000
u can register as many hooks as ur process's current, remaining USER Handles count would permit, up to a limit of 10'000
- 12 Apr 2023, 10:09
- Forum: Ask for Help (v2)
- Topic: Hide or Destroy the previous Instance of a Gui Window Created Through a Function Topic is solved
- Replies: 6
- Views: 449
Re: Hide or Destroy the previous Instance of a Gui Window Created Through a Function Topic is solved
u can keep the existing reference around in a static variable #Requires AutoHotkey v2.0.2 QuickCopyLaunch(QuickCopyContents) { static qc if IsSet(qc) qc.Destroy() qc:=Gui() qc.Add("Edit","xm y+0" " w500 r10" " vQuickCopyContents",QuickCopyContents) qc.show() }
- 12 Apr 2023, 09:48
- Forum: Suggestions on Documentation Improvements
- Topic: [v2.0.2] can't display the character '&' on the 'A_IconTip'
- Replies: 2
- Views: 764
Re: [v2.0.2] can't display the character '&' on the 'A_IconTip'
because u apparently need to escape it twice
https://stackoverflow.com/a/10279419
there, fixed in docs https://github.com/AutoHotkey/AutoHotkeyDocs/pull/642
https://stackoverflow.com/a/10279419
there, fixed in docs https://github.com/AutoHotkey/AutoHotkeyDocs/pull/642
- 12 Apr 2023, 09:37
- Forum: Ask for Help (v2)
- Topic: Help with DLLCall and getting information
- Replies: 2
- Views: 250
Re: Help with DLLCall and getting information
the MSDN code rewritten: #Requires AutoHotkey v2.0.2 rc := DllCall('GetCurrentApplicationUserModelId', 'UInt*', &length := 0, 'Ptr', 0) ERROR_INSUFFICIENT_BUFFER := 122 APPMODEL_ERROR_NO_APPLICATION := 15703 if (rc != ERROR_INSUFFICIENT_BUFFER) { if (rc = APPMODEL_ERROR_NO_APPLICATION) MsgBox("Deskt...
- 12 Apr 2023, 07:48
- Forum: Ask for Help (v1)
- Topic: Convert cURL to AHK for TVDB API Topic is solved
- Replies: 13
- Views: 1475
Re: Convert cURL to AHK for TVDB API Topic is solved
i dont know what ure trying to change man... uve changed the Content-Type header - OK. uve also changed the Accept header to multipart/form-data - why? the api isnt sending its response as multipart/form-data ure still sending a json-like string in the request's body ure not sending multipart/form-d...
- 11 Apr 2023, 10:33
- Forum: Ask for Help (v2)
- Topic: Change background color of statusbar not working Topic is solved
- Replies: 6
- Views: 663
Re: Change background color of statusbar not working Topic is solved
on windows10 (at least, probably other versions too), u need to disable the statusbar's theming for colors set using SB_SETBKCOLOR to show up
this probably wasnt needed in earlier versions
Code: Select all
DllCall('UxTheme\SetWindowTheme', 'Ptr', SB.Hwnd, 'WStr', '', 'WStr', '', 'HRESULT')
- 11 Apr 2023, 04:35
- Forum: Ask for Help (v1)
- Topic: Help with regexmatch
- Replies: 6
- Views: 352
Re: Help with regexmatch
Code: Select all
MsgBox % RegExReplace("aaaaa_bbbb_CCCC_dddd_eeee.mp4", "_[^_]+(?=_)", , , 1) ; aaaaa_CCCC_dddd_eeee.mp4
- 11 Apr 2023, 04:14
- Forum: Ask for Help (v1)
- Topic: Help with regexmatch
- Replies: 6
- Views: 352
Re: Help with regexmatch
Code: Select all
MsgBox % RegExReplace("aaaaa_bbbb_CCCC_dddd_eeee.mp4", "_[^_]+_", , , 1) ; aaaaaCCCC_dddd_eeee.mp4
- 11 Apr 2023, 03:28
- Forum: Ask for Help (v2)
- Topic: Need to move files from removable drive to pc location Topic is solved
- Replies: 17
- Views: 1074
Re: Need to move files from removable drive to pc location Topic is solved
clearly its trying to run the script as though it were an ahkv1 script
put #Requires AutoHotkey v2.0 to dispel any ambiguity
put #Requires AutoHotkey v2.0 to dispel any ambiguity
- 11 Apr 2023, 03:18
- Forum: Ask for Help (v1)
- Topic: Disable keyboard hook?
- Replies: 2
- Views: 245
Re: Disable keyboard hook?
I'm not using hotstrings, * , $, or anything else requiring the hook. ...even for a one line script like a::b yeah, u are using * . a remapping expands to https://www.autohotkey.com/docs/v1/misc/Remap.htm#actually if u want to be able to turn off the hook on demand, start using ahkv2 and pass the c...
- 11 Apr 2023, 03:08
- Forum: Ask for Help (v1)
- Topic: sort paragraph
- Replies: 4
- Views: 307
Re: sort paragraph
to me these look like lines, not paragraphs, so i guess step 1 is for u to define what a paragraph is and what delimits one anyway, here is some sample code #Requires AutoHotkey v2.0.2 input := ' ( Paragraph 1 Paragraph 1 Paragraph 2 Paragraph 2 Paragraph 3 Paragraph 3 Paragraph 4 Paragraph 4 Paragr...
- 11 Apr 2023, 03:05
- Forum: Ask for Help (v1)
- Topic: Help with regexmatch
- Replies: 6
- Views: 352
Re: Help with regexmatch
Code: Select all
#Requires AutoHotkey v1.1.36.02
MsgBox % RegExReplace("aaaaa_bbbb_CCCC", "_[^_]+_") ; aaaaaCCCC
- 11 Apr 2023, 02:28
- Forum: Ask for Help (v2)
- Topic: V2 doc example results in an error
- Replies: 9
- Views: 569
Re: V2 doc example results in an error
yeah, i suggest u stay away from #1 and fancy closures, unless u already know very well what ure about to do or like fancifully leaking memory and handles every time u press the hotkey for whatever reason
- 10 Apr 2023, 12:45
- Forum: Ask for Help (v2)
- Topic: Webview2 variable is duplicated GUI TAB autohotkey
- Replies: 1
- Views: 210
Re: Webview2 variable is duplicated GUI TAB autohotkey
top code is written for ahkv2 bottom code is written for... who even knows what version, really i suggest u first learn some ahk basics (for whichever ahkversion u intend to use), before graduating to copypasting bigboi scripts. otherwise, it will be a hard and arduous journey for u (and whomever el...
- 10 Apr 2023, 11:12
- Forum: Ask for Help (v2)
- Topic: V2 doc example results in an error
- Replies: 9
- Views: 569
Re: V2 doc example results in an error
first off, the v2 doc example does not result in an error the code that you have written that happens to be based upon the example results in an error to understand why ure getting this error, read the sections on local and global variables: https://www.autohotkey.com/docs/v2/Functions.htm#Local the...
- 10 Apr 2023, 10:10
- Forum: Ask for Help (v1)
- Topic: How can I get the memory usage of a process? Topic is solved
- Replies: 12
- Views: 3492
Re: How can I get the memory usage of a process? Topic is solved
Code: Select all
for Process in ComObjGet("winmgmts:").ExecQuery("select * from Win32_Process where name = 'vivaldi.exe'")
sum += GetProcessMemoryUsage(Process.ProcessId)
- 10 Apr 2023, 09:46
- Forum: Ask for Help (v2)
- Topic: Simple AHK wrapper for SDL2 joystick Topic is solved
- Replies: 11
- Views: 720
Re: Simple AHK wrapper for SDL2 joystick Topic is solved
the function returns a large(ie larger than ptrsize) struct by value. the x86 and x64 calling conventions dictate that u should pass a pointer to a caller allocated piece of memory as the first parameter