Page 1 of 1
ClipWait fails with A_Clipboard in v1
Posted: 19 Jan 2024, 08:04
by mikeyww
Code: Select all
#Requires AutoHotkey v1.1.35
Clipboard := "" ; Use Clipboard
Clipboard := 1 + 2
ClipWait 1
MsgBox % ErrorLevel
A_Clipboard := "" ; Use A_Clipboard
A_Clipboard := 1 + 2
ClipWait 1
MsgBox % ErrorLevel
The second ClipWait generates an error.
AHK v1.1.37.01 on Win 11 Pro.
[v1.1.35+]: A_Clipboard is an alias of Clipboard.
Re: ClipWait fails with A_Clipboard in v1
Posted: 19 Jan 2024, 20:46
by lexikos
The clipboard variable(s) are incompatible with the binary number cache. Caching is disabled for "Clipboard" but not "A_Clipboard". Assigning a string instead of a binary number will work.
Re: ClipWait fails with A_Clipboard in v1
Posted: 19 Jan 2024, 21:27
by mikeyww
OK. Aside from
Clipboard, a solution for others is below, in case needed.
Code: Select all
#Requires AutoHotkey v1.1.35
A_Clipboard := "" ; Use A_Clipboard
A_Clipboard := Format("{}", 1 + 2)
ClipWait 1
MsgBox % ErrorLevel "`n" A_Clipboard
Re: ClipWait fails with A_Clipboard in v1 Topic is solved
Posted: 22 Mar 2024, 19:57
by lexikos
Fixed by v1.1.37.02.