Search found 9385 matches

by lexikos
12 Apr 2024, 04:11
Forum: Bug Reports
Topic: InputHook does not exclude suppression for ENTER key
Replies: 2
Views: 75

Re: InputHook does not exclude suppression for ENTER key

Strictly speaking, it may be behaving as documented. Specify the string {All} (case-insensitive) on its own to apply KeyOptions to all VK and all SC ... When a key is specified by name, the options are set either by VK or by SC. Where two physical keys share the same VK but differ by SC (such as Up ...
by lexikos
12 Apr 2024, 02:39
Forum: Ask for Help (v2)
Topic: How to call nested function? Topic is solved
Replies: 15
Views: 276

Re: How to call nested function? Topic is solved

jsong55 Do you want us to guess at the structure of your script, like we had to guess at what you were trying to do? Don't use SendMessage to call your own function. If you want your function to be callable from outside the function, either just don't put it inside the function, or pass it out some...
by lexikos
11 Apr 2024, 23:37
Forum: Ask for Help (v2)
Topic: Need help fixing script to disable only the built-in keyboard
Replies: 2
Views: 82

Re: Need help fixing script to disable only the built-in keyboard

It is apparently possible by combining a keyboard hook with Raw Input (HID). Confirming whether it can be done within the context of AutoHotkey has been on my TODO list for years.
viewtopic.php?f=13&t=9651
by lexikos
11 Apr 2024, 23:32
Forum: Ask for Help (v2)
Topic: How to call nested function? Topic is solved
Replies: 15
Views: 276

Re: How to call nested function? Topic is solved

The simplest answer to "How to call nested function?" is literally fn2() within f1 . What niCode demonstrated is not something I would ever suggest doing in a real script. A more typical use of a nested function would be to return it , as in the first closure example . The caller can then assign the...
by lexikos
11 Apr 2024, 22:48
Forum: Ask for Help (v2)
Topic: Fill edit field in GUI using functions
Replies: 3
Views: 73

Re: Fill edit field in GUI using functions

But MyMainWindow is a global variable... You could do this: LogToWindow := MainWindow() Sleep(1000) LogToWindow('hello') Sleep(1000) LogToWindow('hey') class MainWindow extends Gui { __new() { super.__new(,"WIM AutoUpdate") this.SetFont("s9","Segoe UI") this.Add("Edit", "x8 y56 w736 h312 +ReadOnly +...
by lexikos
11 Apr 2024, 22:16
Forum: Ask for Help (v2)
Topic: "Expected a string, but got a function..."
Replies: 2
Views: 115

Re: "Expected a string, but got a function..."

Even in cases where it is valid to omit the parentheses, it is not valid to write a comma immediately after the function/method name. Comma is used only between parameters or to separate sub-expressions, as in x := 1, y := 2 . MsgBox, "Invalid" Global variables being directly assigned by a function ...
by lexikos
11 Apr 2024, 22:04
Forum: Ask for Help (v2)
Topic: Substitute of v. 1 SetBatchLines
Replies: 5
Views: 126

Re: Substitute of v. 1 SetBatchLines

SetTimer batchLines, 10 can be replaced with SetTimer Sleep.Bind(15), 10, which has the benefit of not logged the Sleep call into ListLines. However, you will not be able to turn it off unless you retain a reference (SetTimer batchLines := Sleep.Bind(15), 10 ... SetTimer batchLines, 0).
by lexikos
11 Apr 2024, 21:57
Forum: Ask for Help (v2)
Topic: why v2 script trigger popup menu in onenote?
Replies: 17
Views: 243

Re: why v2 script trigger popup menu in onenote?

Try SendEvent "^c" or $#v:: . When you test with Send/SendInput, ensure that there are no other running scripts which have keyboard hooks installed. Other programs which install global keyboard hooks may also affect the result. Just wondering why the difference between v1 and v2 scripts considering ...
by lexikos
11 Apr 2024, 21:34
Forum: Bug Reports
Topic: inputOpj.EndKey
Replies: 2
Views: 63

Re: inputOpj.EndKey

If I'm understanding you correctly, you are getting Farsi letters from EndKey but you are not expecting Farsi letters. So what are you expecting? Keys which correspond to individual characters are "named" by the character that they produce, which depends on keyboard layout. If I'm understanding you ...
by lexikos
11 Apr 2024, 21:30
Forum: Bug Reports
Topic: an issue on "~!= Up::Ctrl"
Replies: 2
Views: 106

Re: an issue on "~!= Up::Ctrl"

The only bug here is that ~!= Up::Ctrl is not flagged as an error. The purpose of a remapping is to remap one key to another, not the release of a key to another key.

This is probably what you want:

Code: Select all

*~!= Up::Send "{Blind}{Ctrl}"
by lexikos
11 Apr 2024, 21:22
Forum: Ask for Help (v2)
Topic: why v2 script trigger popup menu in onenote?
Replies: 17
Views: 243

Re: why v2 script trigger popup menu in onenote?

Please confirm that you are using the latest version of v2; i.e. v2.0.12 at this time (or v2.1-alpha.9 if you are using v2.1).
by lexikos
11 Apr 2024, 21:19
Forum: Bug Reports
Topic: SetTitleMatchMode Regex + i) option failing
Replies: 11
Views: 204

Re: SetTitleMatchMode Regex + i) option failing

each part of the title match (ahk_class, ahk_exe) will have its own options so to speak, which is a bit strange as this would be an invalid i)testing ahk_class i)AutoHotkey.* Regex string in any other circumstance. Personally I think your perspective is a bit strange. WinTitle is clearly not a rege...
by lexikos
11 Apr 2024, 21:06
Forum: Bug Reports
Topic: COM: Table Manipulation in MS Word broken in recent AHK versions
Replies: 7
Views: 229

Re: COM: Table Manipulation in MS Word broken in recent AHK versions

Tables is a property with no parameters. Item is a method. document.Tables[1] is property retrieval. It is a single operation where a property Tables is invoked with parameter 1. How it is dispatched depends on the implementation of the object. I can offer some conjecture based on "Item" is not a pr...
by lexikos
11 Apr 2024, 19:31
Forum: Ask for Help (v2)
Topic: how could I get a script to automatically reload upon waking up my computer?
Replies: 6
Views: 215

Re: how could I get a script to automatically reload upon waking up my computer?

It is also of some concern that message processing in the application must return True to the operating system. "An application should return TRUE if it processes this message." It doesn't specify what constitutes "processing", or that it should ever return FALSE, or that the return value is used i...
by lexikos
31 Mar 2024, 21:55
Forum: General Discussion
Topic: How many have Spinning HDs vs SSDs?
Replies: 12
Views: 225

Re: How many have Spinning HDs vs SSDs?

If the OS is installed on a HDD and it spins down, it will inevitably cause delays. No one wants that to happen while the computer is in use. And even if the computer is idle, I suppose that you shouldn't buffer your log data indefinitely. If the computer is so idle that the OS drive can be put to s...
by lexikos
31 Mar 2024, 21:18
Forum: SciTE4AutoHotkey
Topic: How to run a lua script in scite?
Replies: 1
Views: 137

Re: How to run a lua script in scite?

These are defined by various command. xxx .$(file.patterns.lua) properties. https://www.scintilla.org/SciTEDoc.html#property-command.compile I have this set in SciTEUser.properties so Run executes the current file with SciTE's Lua interpreter: command.go.$(file.patterns.lua)=dofile $(FilePath) comma...
by lexikos
31 Mar 2024, 21:08
Forum: SciTE4AutoHotkey
Topic: Can Scite's tab page not display file extensions?
Replies: 1
Views: 566

Re: Can Scite's tab page not display file extensions?

No, there is no property for this. It might be possible to rename the tab via tab control messages, but it would be overridden every time something happens that might affect a tab name. (SciTE recalculates all of the tab names whenever it updates the Tabs/Buffers menu, which happens due to various e...
by lexikos
31 Mar 2024, 20:17
Forum: Ask for Help (v2)
Topic: Which is better in Hotstring, scancode and direct typing? Topic is solved
Replies: 3
Views: 84

Re: Which is better in Hotstring, scancode and direct typing? Topic is solved

{U+nnnn} SendInput() or WM_CHAR is used to send the character and the current Send mode has no effect. Characters sent this way usually do not trigger shortcut keys or hotkeys. Source: Send - Syntax & Usage | AutoHotkey v2 Characters vs. keys: By default, characters are sent by first translating th...
by lexikos
31 Mar 2024, 20:10
Forum: Ask for Help (v2)
Topic: Is there a way to copy-on-select without sending ^c ?
Replies: 5
Views: 171

Re: Is there a way to copy-on-select without sending ^c ?

Console windows have a menu which can be invoked via MenuSelect. There's an example in the documentation for pasting, which should be simple to modify for copying. This is only for ahk_class ConsoleWindowClass , not custom console windows or Windows Terminal. mikeyww "without sending ^c"; "Both of t...
by lexikos
31 Mar 2024, 20:05
Forum: Ask for Help (v2)
Topic: how could I get a script to automatically reload upon waking up my computer?
Replies: 6
Views: 215

Re: how could I get a script to automatically reload upon waking up my computer?

I use OnMessage(WM_POWERBROADCAST := 0x218, OnPowerBroadcast) OnPowerBroadcast(wParam, *) { if (wParam = 7) { ; PBT_APMRESUMESUSPEND: resume triggered by user input ;... } } but be aware that your network adapter might not be ready at that time. You would probably also need to wait for Google Drive ...

Go to advanced search