Search found 5956 matches

by lexikos
21 Sep 2018, 19:53
Forum: Bug Reports
Topic: IniRead (AHK v2): spaces as default value
Replies: 2
Views: 75

Re: IniRead (AHK v2): spaces as default value

This is standard Windows behaviour. IniRead when specifying a key is literally just a call to GetFullPathName and a call to GetPrivateProfileString. Everything is handled by the latter function, including returning a default value if the key wasn't found.
by lexikos
19 Sep 2018, 05:38
Forum: Ask For Help
Topic: Attempting to use WinGet with multiple criteria for WinTitle
Replies: 1
Views: 43

Re: Attempting to use WinGet with multiple criteria for WinTitle

The second WinGet PID is retrieving the PID of the main window, which is of course the same as the PID of the Find window. They belong to the same process. The second WinGetTitle gets the title of the Find window because you did not specify any criteria other than the PID, and the Find window is the...
by lexikos
18 Sep 2018, 17:16
Forum: Ask For Help
Topic: Static initializers do not initialize anything Topic is solved
Replies: 7
Views: 169

Re: Static initializers do not initialize anything Topic is solved

In this order, warn always points to the var oauth in lib_clientID, When I run the excerpt you posted, it warns about clientID . The warning dialog points at the line that was executing when the uninitialized variable was accessed, and is usually correct. It prints the name of the uninitialized var...
by lexikos
17 Sep 2018, 22:07
Forum: Wish List
Topic: [Request]: Official Library & Wrapper
Replies: 55
Views: 1112

Re: [Request]: Official Library & Wrapper

If the download or update of the "standard Lib" can be easily automated and "the community" wants it included with the installer, that is fine with me. I just want no part in maintaining it.
by lexikos
17 Sep 2018, 16:43
Forum: Ask For Help
Topic: WindowPadX stopped working after reboot (Windows 10) - help!
Replies: 3
Views: 63

Re: WindowPadX stopped working after reboot (Windows 10) - help!

The script doesn't use m directly, so m returning an env var is not the issue. Anyway, I would add #NoEnv to the script. My question is: how can RegExMatch succeed (return 1) but give an empty match for the input "LAlt" and pattern "^(?:.* & )?[#!^+&<>*~$]*(.+)...
by lexikos
16 Sep 2018, 22:20
Forum: Ask For Help
Topic: Static initializers do not initialize anything Topic is solved
Replies: 7
Views: 169

Re: Static initializers do not initialize anything Topic is solved

If you are calling the function (directly or indirectly) from a static initialiser, check the order of the static initialisers in your script.
by lexikos
16 Sep 2018, 00:13
Forum: Ask For Help
Topic: Gui, Show first time bigger than screen size?
Replies: 6
Views: 104

Re: Gui, Show first time bigger than screen size?

Yes, AutoHotkey limits the automatic size to the width and height determined via SystemParametersInfo(SPI_GETWORKAREA, 0, &work_rect, 0); , but... // Seems best to restrict window size to the size of the desktop whenever explicit sizes // weren't given, since most users would probably wa...
by lexikos
15 Sep 2018, 23:54
Forum: AutoHotkey v2 Development
Topic: Binary Data | VarSetCapacity | VarSetLength | Heap Object
Replies: 32
Views: 1042

Re: Binary Data | VarSetCapacity | VarSetLength | Heap Object

A simple binary buffer object would be much easier to implement, and serves some different purposes than a struct (which has a specific structure ). It serves as an immediate replacement for VarSetCapacity, SetCapacity and GetAddress, while still having its place after struct support is added. Struc...
by lexikos
15 Sep 2018, 23:36
Forum: Ask For Help
Topic: What is the most correct way to run a program? It's not so obvious!
Replies: 9
Views: 221

Re: What is the most correct way to run a program? It's not so obvious!

Isn't it a best practice to always use KeyWait before last Return? I realize I may have misinterpreted the question; that the emphasis may have been on always using KeyWait, and not on where to place it (" before last Return"). It is not best practice to block key-repeat. However, if you ...
by lexikos
15 Sep 2018, 18:45
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 441
Views: 79235

Re: Suggestions on documentation improvements

v1.0.91 says "Added: ComObjType(co) and ComObjValue(co)." ComObjValue was new, but it seems only the single-parameter mode of ComObjType was added in v1.0.91. Before that it had only the "Name" and "IID" modes.
by lexikos
15 Sep 2018, 18:35
Forum: Ask For Help
Topic: Why use "hotkey, If"?
Replies: 4
Views: 122

Re: Why use "hotkey, If"?

Another important difference I forgot to mention before is that "Hotkey If" allows the creation of an unlimited number of hotkey variants, whereas using a global hotkey which checks its own condition for action requires that the one hotkey handles every "variant". That means re-i...
by lexikos
15 Sep 2018, 18:16
Forum: Ask For Help
Topic: An unsatisfactory behavior of the Run command? Topic is solved
Replies: 13
Views: 337

Re: An unsatisfactory behavior of the Run command? Topic is solved

You've already found one limitation that makes it unsuitable as a replacement for the Run command. Here are a few more: ⋅ It cannot elevate processes (*RunAs). ⋅ It cannot execute other verbs , such as print or edit. ⋅ It changes the interpretation of some special symbo...
by lexikos
15 Sep 2018, 17:56
Forum: Ask For Help
Topic: What is the most correct way to run a program? It's not so obvious!
Replies: 9
Views: 221

Re: What is the most correct way to run a program? It's not so obvious!

Isn't it a best practice to always use KeyWait before last Return? It isn't "best practice". It is common sense. If you put a command after return , the command will not execute, because the subroutine has already returned. Otherwise, you put KeyWait at whatever point you want the script ...
by lexikos
14 Sep 2018, 21:56
Forum: Ask For Help
Topic: What is the most correct way to run a program? It's not so obvious!
Replies: 9
Views: 221

Re: What is the most correct way to run a program? It's not so obvious!

The correct way to run a program is to run the program, as you've done at the end of your post. Your problem has very little to do with running the program. Your problem is that you expect the hotkey's action to execute only once each time you press and release the key, which does not align with how...
by lexikos
14 Sep 2018, 17:54
Forum: Ask For Help
Topic: Why use "hotkey, If"?
Replies: 4
Views: 122

Re: Why use "hotkey, If"?

I think you mean "latter" rather than "former", and If !(WinActive...) rather than If (WinActive...) . Why would you ever use #If or #IfWinActive when you could use a normal If or If WinActive()? The answer is the same here. Disabling a hotkey is not the same as s...
by lexikos
14 Sep 2018, 17:17
Forum: Bug Reports
Topic: Self-remapping with #Inputlevel
Replies: 1
Views: 59

Re: Self-remapping with #Inputlevel

Normally "ignored" events are unconditionally marked as such by having one of a few different special values attached to the event. The keyboard hook returns early for these events, allowing them to pass through regardless of what hotkeys are defined, since they never trigger hotkeys. Send...
by lexikos
13 Sep 2018, 16:42
Forum: Ask For Help
Topic: An unsatisfactory behavior of the Run command? Topic is solved
Replies: 13
Views: 337

Re: An unsatisfactory behavior of the Run command? Topic is solved

You are not doing the same thing in both languages. ⋅ Remove START and AHKwithoutGUI.exe will appear as a child of Run_FB.exe. ⋅ Use Run %comspec% /c START "" "%A_ScriptDir%\AHKwithoutGUI.exe", , Hide and AHKwithoutGUI.exe will not appear as a child of Run_AHK...
by lexikos
12 Sep 2018, 20:57
Forum: AutoHotkey v2 Development
Topic: Exceptions (for unknown properties, more)
Replies: 6
Views: 189

Re: Exceptions (for unknown properties, more)

There's also the possibility that the property is implemented while it is executing, What? The property can't begin to execute if it hasn't been implemented yet. I don't like this, I feel that it's more important to ask if it has a value rather than check for the existence of a key. What's the diff...
by lexikos
12 Sep 2018, 20:43
Forum: AutoHotkey v2 Development
Topic: Nothing.
Replies: 21
Views: 450

Re: Nothing.

I don't see what you're getting at. What type checking? Why wouldn't it be possible to call fn("something", nothing) ? Are you using nothing as a synonym of unset , meaning missing as already discussed above? I think that the idea of a value that gets replaced with the parameter's ...

Go to advanced search