Search found 6906 matches

by lexikos
26 Oct 2020, 04:41
Forum: Ask For Help
Topic: Remapping problem: Shift+NumpadEnd only works once!?
Replies: 16
Views: 332

Re: Remapping problem: Shift+NumpadEnd only works once!?

For the "shift overrides Numlock" issue, maybe this helps? #if GetKeyState("NumLock", "T") NumpadEnd::MsgBox Shift + Numpad1 ; <== #if Numpad1::MsgBox Numpad1 NumpadEnd::MsgBox NumpadEnd +NumpadEnd::MsgBox Shift + NumpadEnd I'm wondering if REAPER supports key codes on PC for other characters that a...
by lexikos
09 Oct 2020, 04:12
Forum: Ask For Help
Topic: Run-only-once timer gets recycled while its function object still exists Topic is solved
Replies: 7
Views: 190

Re: Run-only-once timer gets recycled while its function object still exists Topic is solved

swagfag Even if you think that "an object created by the script" should include a "func reference", it is clearly excluded with "not an actual function". A "func reference" is not an object. It is a reference to an object. The object itself is created by the preparser before the script executes. A ...
by lexikos
09 Oct 2020, 03:45
Forum: Bug Reports
Topic: Why this Critical Error on DropFiles ?
Replies: 2
Views: 228

Re: Why this Critical Error on DropFiles ?

To whoever marked the topic as solved: best not to do that yet, if you want the bug to be fixed. ;)
by lexikos
09 Oct 2020, 03:42
Forum: Suggestions on documentation improvements
Topic: Undocumented behaviour of Critical state in #If Expressions
Replies: 1
Views: 229

Re: Undocumented behaviour of Critical state in #If Expressions

That is correct; the #If expression is evaluated as a new thread, with Critical in effect.

I have moved the topic to the documentation subforum.
by lexikos
09 Oct 2020, 03:31
Forum: Bug Reports
Topic: ahk sees different PATH than command prompt
Replies: 2
Views: 137

Re: ahk sees different PATH than command prompt

Every program has its own copy of the environment (a block of environment variables), generally inherited from the process which launched it. If you modify PATH for the system or current user (whether you do it yourself or it is done by an installer program), it will generally only apply to explorer...
by lexikos
09 Oct 2020, 03:25
Forum: Bug Reports
Topic: Silently fails to open file for editing when already open in VSCode
Replies: 3
Views: 138

Re: Silently fails to open file for editing when already open in VSCode

It is impossible for this to be a bug of AutoHotkey. "Edit This Script" just executes the "edit" shell verb by calling ShellExecuteEx (a system function), or failing that, executes notepad.exe directly. ShellExecuteEx is responsible for looking up the appropriate command line and executing it. The p...
by lexikos
06 Oct 2020, 03:18
Forum: Wish List
Topic: Stop modifier keys from getting stuck down
Replies: 9
Views: 310

Re: Stop modifier keys from getting stuck down

It appears that "ActiveHotkeys" only tells you which hotkeys are 'active', not which program registered them. It most likely works by attempting to register every possible combination with RegisterHotkey. If a combination succeeds, that hotkey wasn't already registered by some other program. This is...
by lexikos
03 Oct 2020, 23:05
Forum: Wish List
Topic: Stop modifier keys from getting stuck down
Replies: 9
Views: 310

Re: Stop modifier keys from getting stuck down

For example, is there any way that AHK or some other program can show a list of programs that are running with keyboard hooks? Not as far as I know. However, some antivirus software can detect and block the use of keyboard hooks, somehow. SetWindowsHookEx with WH_DEBUG might detect when a hook is c...
by lexikos
03 Oct 2020, 22:19
Forum: Ask For Help
Topic: String parsing peeking at the next character.
Replies: 9
Views: 167

Re: String parsing peeking at the next character.

You could just use a normal Loop and "index" the string with SubStr.
by lexikos
03 Oct 2020, 21:50
Forum: Wish List
Topic: Stop modifier keys from getting stuck down
Replies: 9
Views: 310

Re: Stop modifier keys from getting stuck down

It is my opinion that the majority of the remaining reliability problems with hotkeys or Send are inherent to the underlying systems/processes, or have causes that cannot be fixed by changes to AutoHotkey (but can generally be worked around by utilizing methods appropriate to the situation, from wha...
by lexikos
03 Oct 2020, 21:03
Forum: Ask For Help
Topic: How does AHK handle wrong function arguments?
Replies: 9
Views: 303

Re: How does AHK handle wrong function arguments?

Error: Parameter #3 invalid. Line# ---> 001: MsgBox(InStr("aaa_XY_bbb", "xy", "1WrongArg")) ... is what you'd get with AutoHotkey v2. InStr in AutoHotkey v1 (but not v2) expects an integer for the CaseSensitive parameter. It does not interpret the parameter directly as boolean. Otherwise, "WrongArg...
by lexikos
03 Oct 2020, 20:39
Forum: Wish List
Topic: Stop modifier keys from getting stuck down
Replies: 9
Views: 310

Re: Stop modifier keys from getting stuck down

Well, what's the cause of the problems?

There is a great deal of complexity involved in keyboard input processing, most of it existing outside of AutoHotkey. AutoHotkey provides multiple send modes, key delay settings, and other options because there is no single perfect tool for every job.
by lexikos
03 Oct 2020, 20:14
Forum: Ask For Help
Topic: Sound volume down to zero?
Replies: 7
Views: 87

Re: Sound volume down to zero?

I thought that vol/vol would throw an error when vol=0 AutoHotkey v2 does that. It has a stricter, more consistent and (IMO) more sensible error handling policy than v1, which yields an empty string in this case, but in other cases aborts the expression, sets ErrorLevel or throws an exception, depe...
by lexikos
03 Oct 2020, 20:08
Forum: Ask For Help
Topic: "This Variable has not been assigned a value"
Replies: 5
Views: 124

Re: "This Variable has not been assigned a value"

There's a reason for the last line in the dialog: For more details, read the documentation for #Warn. The documentation contains explanations of the warning, how to avoid it, and what error it is meant to detect. But it's probably not clear that this is the LocalSameAsGlobal warning; see that sectio...
by lexikos
02 Oct 2020, 05:07
Forum: Ask For Help
Topic: "This Variable has not been assigned a value"
Replies: 5
Views: 124

Re: "This Variable has not been assigned a value"

I can simply remove #Warn :thumbup: :thumbdown: tatagi What does ime_check return? It most likely is not intended to return a variable name , so ret most likely should not be enclosed in percent signs in that context. In that case, #Warn is doing exactly what it is intended for: alerting you to a m...
by lexikos
02 Oct 2020, 04:53
Forum: Ask For Help
Topic: Need Help Creating Accents (Shift Stuck)
Replies: 3
Views: 53

Re: Need Help Creating Accents (Shift Stuck)

SendInput {Blind}{Text}Ű is guaranteed to not mess with Shift at all, and will produce the character Ű regardless of whether Shift is pressed. (Text mode generally produces either exactly what you pass it, or nothing at all.) SendInput {Text}Ű will release Shift temporarily if you are holding it, (...
by lexikos
02 Oct 2020, 04:14
Forum: Ask For Help
Topic: Error The system cannot find the path specified. Topic is solved
Replies: 4
Views: 78

Re: Error The system cannot find the path specified. Topic is solved

gregster That is clearly the output format of SciTE. It is the result of executing a tool in SciTE; e.g. "running" the script by pressing F5. I am not running SciTE4AHK300601_Portable that is on my E:\ USB drive Did you mean to say the opposite? It looks very much like you are running SciTE4AHK3006...
by lexikos
02 Oct 2020, 03:53
Forum: Ask For Help
Topic: Sound volume down to zero?
Replies: 7
Views: 87

Re: Sound volume down to zero?

I assume your issue is not that the volume level does not go down to zero, as originally described, but that zero != silent. The volume level ranges from "0" to "100", but "0" is not silent ; it just corresponds to the minimum value supported by the audio driver. The scalar values 0 - 100 are intern...
by lexikos
30 Sep 2020, 23:22
Forum: AutoHotkey v2 Help
Topic: super-global access from class static __new()
Replies: 4
Views: 171

Re: super-global access from class static __new()

Declarations are processed before the script executes. Variable initializers are just assignments, so are subject to control flow. The two parts are processed at different stages.

You can declare the variable outside the function, then assign it inside.
by lexikos
28 Sep 2020, 03:41
Forum: Ask For Help
Topic: Notepad++ Skewing IfWinExist Results
Replies: 5
Views: 137

Re: Notepad++ Skewing IfWinExist Results

Note that compiled scripts do not include the " - AutoHotkey v version " suffix. I usually use a combination of filename and ahk_class AutoHotkey to identify scripts. Only a script's main window has this window class. In general (for all kinds of windows), using the window class in combination with ...

Go to advanced search