Search found 9394 matches

by lexikos
Today, 04:12
Forum: Ask for Help (v2)
Topic: Run "i_view64.exe" and other programs moving the mouse cursor?!
Replies: 7
Views: 130

Re: Run "i_view64.exe" and other programs moving the mouse cursor?!

Run doesn't wait for the program to start up. MouseMove may execute before the program finishes initializes and shows its window. A mouse movement is not a gradual process, but a series of instant changes in mouse coordinates, with a delay between each change. In other words, this is as much "in par...
by lexikos
Today, 04:00
Forum: Ask for Help (v2)
Topic: How I can call my DLL? (C# net8)
Replies: 5
Views: 141

Re: How I can call my DLL? (C# net8)

Recent versions of .NET have their own hosting API which differs too much from the old one for the old scripts to work. If you can create a .dll which can be called from C (i.e. a dll with unmanaged exports), you can call it with DllCall. C++ can mix managed and unmanaged code in older .NET Framewor...
by lexikos
Today, 03:57
Forum: Bug Reports
Topic: COM: Table Manipulation in MS Word broken in recent AHK versions
Replies: 10
Views: 348

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

Descolada Most of the language's syntax is documented on one page, creatively titled "Scripting Language". You need only search through occurrences of "parentheses", or read through the "Function Calls" section. You may have observed that oWord...item 1 does work, but my point is that you can only ...
by lexikos
Yesterday, 05:24
Forum: AutoHotkey Development
Topic: What to do when "A" getting the current active window misses?
Replies: 11
Views: 1059

Re: What to do when "A" getting the current active window misses?

There isn't any real code to bring a window of type "A" into existence, There absolutely is. WinActivate. Run. Anything else that activates a window. :roll: In addition, it seems to be a type mismatch 99% of the time as when "A" is not found, I can clearly see the window I intend to target, it just...
by lexikos
Yesterday, 05:04
Forum: Ask for Help (v2)
Topic: Run "i_view64.exe" and other programs moving the mouse cursor?!
Replies: 7
Views: 130

Re: Run "i_view64.exe" and other programs moving the mouse cursor?!

Found this strange effect -> Run starts the program and moves the mouse cursor to the just opened window , which I don't like! This has nothing to do with Run. Run just starts the program. I'll bet it happens when any new window opens, not just when a program starts, or when AutoHotkey starts a pro...
by lexikos
20 Apr 2024, 08:43
Forum: Bug Reports
Topic: COM: Table Manipulation in MS Word broken in recent AHK versions
Replies: 10
Views: 348

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

Descolada I presume you are thinking that oWord.application.documents.item(1).activate should behave as though there was () at the end. Which part of the documentation tells you that it should work that way? I assume the thrown error is due to activate being a method, while you are getting a proper...
by lexikos
20 Apr 2024, 08:34
Forum: Bug Reports
Topic: inputOpj.EndKey
Replies: 3
Views: 97

Re: inputOpj.EndKey

GetKeyName is most definitely entirely dependent on the keyboard layout for single-character key names. If the VK is not between A (vk41) and Z (vk5A), it uses MapVirtualKeyEx to retrieve the corresponding character, according to the keyboard layout. For the A - Z keys (which MapVirtualKeyEx always ...
by lexikos
20 Apr 2024, 08:09
Forum: AutoHotkey Development
Topic: What to do when "A" getting the current active window misses?
Replies: 11
Views: 1059

Re: What to do when "A" getting the current active window misses?

Everything you do with window, keyboard or mouse automation is prone to race conditions and conflicts, since forces outside the script, like the user himself, can affect the state of the window. "A" is no different to any other window specification in that respect. NOTE: "A" intentionally does not m...
by lexikos
20 Apr 2024, 06:54
Forum: Announcements
Topic: v2.0.13
Replies: 13
Views: 25476

v2.0.13

Changed Hotkey function to throw ValueError if Options contains an invalid option. Fixed InputHook to respect the +S option for Backspace when acting as undo. Fixed debugger to safely handle property deletion during enumeration. Fixed OLE clipboard content (e.g. error dialog text) being lost on exit...
by lexikos
12 Apr 2024, 04:11
Forum: Bug Reports
Topic: InputHook does not exclude suppression for ENTER key
Replies: 2
Views: 85

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: 301

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: 89

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: 301

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: 77

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: 123

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: 131

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: 269

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: 3
Views: 97

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: 118

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: 269

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).

Go to advanced search