Search found 5231 matches

by lexikos
Yesterday, 21:31
Forum: AutoHotkey v2 Development
Topic: App Crash for digit function
Replies: 6
Views: 219

Re: App Crash for digit function

It has nothing at all to do with having a digit. An invalid pointer is dereferenced within the error-text generating code because the line has neither a pre-resolved function nor a parameter (i.e. because pre-resolution of the function failed; i.e. the function doesn't exist ). As with any invalid d...
by lexikos
Yesterday, 20:15
Forum: Ask For Help
Topic: Input needed from Korean/Thai/other keyboard users
Replies: 3
Views: 309

Re: Input needed from Korean/Thai/other keyboard users

Thanks. Are you saying that: ⋅ the hanja key has a different scan code depending on the input language? ⋅ neither vk19:: nor vke9:: work for the hanji key when the input language is not Korean, even though ListHotkeys shows e9 ? I did not think it was possible for input language ...
by lexikos
21 Jul 2017, 22:46
Forum: Ask For Help
Topic: AutoHotkey GUI Tab controls: Adding GUIs to tab pages
Replies: 1
Views: 49

Re: AutoHotkey GUI Tab controls: Adding GUIs to tab pages

Tab pages don't have handles. Tab pages aren't windows, controls or any other kind of object; they are make-believe.

AutoHotkey merely manages the visibility of controls when the tab index is changed.
by lexikos
21 Jul 2017, 22:19
Forum: Ask For Help
Topic: My script is actioned with #l, but Win-7 also reacts
Replies: 2
Views: 43

Re: My script is actioned with #l, but Win-7 also reacts

You are misreading (and misquoting) the documentation. By cutting off the second half of the sentence, you have changed its meaning. You can disable all built-in Windows hotkeys except Win+L and Win+U by making the following change to the registry Meaning: Making the following change to the registry...
by lexikos
21 Jul 2017, 22:03
Forum: Ask For Help
Topic: StringReplace sets Errorlevel - why? Topic is solved
Replies: 3
Views: 65

Re: StringReplace sets Errorlevel - why? Topic is solved

In answer to the original question: StringReplace sets ErrorLevel to indicate whether the operation was successful. The documentation is quite clear: StringReplace: When the last parameter is UseErrorLevel, ErrorLevel is given the number occurrences replaced (0 if none). Otherwise, ErrorLevel is set...
by lexikos
21 Jul 2017, 21:56
Forum: Ask For Help
Topic: remap windows task switcher windows 10?
Replies: 3
Views: 55

Re: remap windows task switcher windows 10?

Naturally, if you swap the keys, you will have to push Ctrl + Tab to activate the task switcher. This appears to work well: LCtrl::Alt LAlt::Ctrl ; Restore Alt-Tab #if GetKeyState("LAlt", "P") *Tab:: if GetKeyState("LCtrl", "P") ; Restore Ctrl+Alt+Tab { Send {...
by lexikos
21 Jul 2017, 20:16
Forum: Ask For Help
Topic: Windows installer built in AHK
Replies: 2
Views: 66

Re: Windows installer built in AHK

You've installed AutoHotkey, right... ? ;)
by lexikos
21 Jul 2017, 18:33
Forum: Ask For Help
Topic: Loop Parse, - What happens?
Replies: 4
Views: 67

Re: Loop Parse, - What happens?

Loop, Parse wrote:In addition, if InputVar's contents change during the execution of the loop, the loop will not "see" the changes because it is operating on a temporary copy of the original contents.

Does that answer your question?
by lexikos
21 Jul 2017, 18:26
Forum: Ask For Help
Topic: Sleep Function [HELP]
Replies: 8
Views: 69

Re: Sleep Function [HELP]

FYI, send {sleep 10000} does not sleep for 10 seconds. It sends the "Sleep" key 10,000 times. Also, send {A} does not send "the A key". It sends the capital letter "A", by sending Shift (if necessary) and the A key. By contrast, send {a} or send a sends just the A key, ...
by lexikos
21 Jul 2017, 18:01
Forum: AutoHotkey v2 Development
Topic: GuiControl Type inconsistent
Replies: 1
Views: 50

Re: GuiControl Type inconsistent

What's " the string to Gui.Add a control"? "Checkbox", "CheckBox", "CHECKBOX", "checkbox", "cHeCkBoX", etc. are all valid strings for Gui.Add. Gui.Add isn't case sensitive. Neither is = / < / > /etc. or InStr (by default). I fail to see how...
by lexikos
20 Jul 2017, 20:27
Forum: Ask For Help
Topic: SingleInstance Force issue Topic is solved
Replies: 10
Views: 143

Re: SingleInstance Force issue Topic is solved

WinExist must find the window.

SendMessage must find the window and be able to send a specific message to it.

It should be clear which one would be more reliable.

In general, a process cannot automate windows belonging to a process of a higher integrity level. See "UIPI".
by lexikos
19 Jul 2017, 04:09
Forum: Bug Reports
Topic: Beginner Tutorials examples bug
Replies: 1
Views: 77

Re: Beginner Tutorials examples bug

No. Wrapping + in {} is only appropriate if you are passing it to Send. That part of the tutorial does not use Send.
by lexikos
19 Jul 2017, 04:04
Forum: Ask For Help
Topic: SingleInstance Force issue Topic is solved
Replies: 10
Views: 143

Re: SingleInstance Force issue Topic is solved

I was going to go the easy route and just ExitApp if there was already another instance running, but I think it would result in a race condition [...] I think what you're saying is that the new (admin) instance may exit because it sees the old instance still running. That's easily solved by telling...
by lexikos
19 Jul 2017, 03:54
Forum: AutoHotkey v2 Development
Topic: !x() ? y : z treated as an error
Replies: 5
Views: 169

Re: !x() ? y : z treated as an error

If you use that second example and wrap msgbox as a function, the ! in the next line does not get appended to the string, but kind of like to the msgbox function call and the next call below continues normally. Why would something outside the parentheses get appended to one of the function's parame...
by lexikos
17 Jul 2017, 04:23
Forum: Bug Reports
Topic: GetKeySC() incorrect values returned with "Escape" & "Esc"
Replies: 17
Views: 791

Re: GetKeySC() incorrect values returned with "Escape" & "Esc"

The PrintScreen key is sometimes labeled "PrtScn | SysReq", with PrintScreen being E0 37 (sc137) and System Request being 54 (sc054). It's explained here (though I think some of the details don't apply to modern systems): The Print Screen key with Set 1 scan code shown as 37/54+ sends E0 3...
by lexikos
17 Jul 2017, 03:23
Forum: Ask For Help
Topic: SingleInstance Force issue Topic is solved
Replies: 10
Views: 143

Re: SingleInstance Force issue Topic is solved

You can handle it in the new instance by using #SingleInstance Off and manually checking for other instances (e.g. with WinGet List). You can identify scripts by %FullPath% ahk_class AutoHotkey with DetectHiddenWindows On . A_ScriptHwnd is the local instance. #SingleInstance sends a message using th...
by lexikos
17 Jul 2017, 02:53
Forum: AutoHotkey v2 Development
Topic: !x() ? y : z treated as an error
Replies: 5
Views: 169

Re: !x() ? y : z treated as an error

It is not treated as a syntax because of the "!", or at all. The code you posted works just fine as its own script in v2.0-a081. Starting the line with ! is only possible if it is the very first line in the script, because ! is a continuation-line character in both v1 and v2. It has been t...
by lexikos
17 Jul 2017, 02:34
Forum: Wish List
Topic: if(...).... in ohne line
Replies: 2
Views: 105

Re: if(...).... in ohne line

(false) lll is a legitimate expression which concatenates the variables false (containing 0) and lll . The condition of an IF statement is not required to be enclosed in parentheses. It is just a convenient way of disambiguating between IF-expression and the other types of IF statement, sin...

Go to advanced search