Search found 9401 matches

by lexikos
Yesterday, 22:09
Forum: Bug Reports
Topic: MonthCal Week Number is incorrect on Windows 11
Replies: 1
Views: 328

Re: MonthCal Week Number is incorrect on Windows 11

#1: As far as I am aware, AutoHotkey contains no direct support for "week numbers". Numeric options (style numbers) are just accumulated and then passed to the control via CreateWindowEx or SetWindowLong. The option is documented for your convenience, and the phrase "Week 1 is defined as the first ...
by lexikos
Yesterday, 21:28
Forum: Ask for Help (v2)
Topic: Interruption by another thread
Replies: 4
Views: 275

Re: Interruption by another thread

If you need to guarantee that it will not be interrupted, you must rely on documented behaviour, not just practical observations or knowledge of undocumented behaviour. Critical gives the clearest guarantee, and shows your intent. You should use it. The code at the top is exactly equivalent to: iTes...
by lexikos
Yesterday, 21:19
Forum: Suggestions on Documentation Improvements
Topic: Document for comma is wrong. Topic is solved
Replies: 3
Views: 619

Re: Document for comma is wrong. Topic is solved

The documentation for comma uses the example x:=1, y+=2, ++index, MyFunc() . A simple benchmark of this example vs. putting the expressions on multiple lines shows that separate lines take 23% longer . So the "fix" is no more correct than the original document. The linked topic compares a sequence o...
by lexikos
Yesterday, 20:47
Forum: Ask for Help (v2)
Topic: nested functions with assume-global
Replies: 3
Views: 270

Re: nested functions with assume-global

One answer is directly stated in the documentation. Assume-global mode: If a function needs to access or create a large number of global variables, it can be defined to assume that all its variables are global (except its parameters) Source: Functions - Definition & Usage | AutoHotkey v2 The meaning...
by lexikos
Yesterday, 20:34
Forum: Wish List
Topic: Notify if not UTF-8? -- [Update: Not possible, me thinks]
Replies: 6
Views: 348

Re: Notify if not UTF-8?

A warning in the case of UTF-8 decoding errors might be possible, but in some cases a byte sequence is valid in both UTF-8 and the system ANSI code page. I think the result of the user using the wrong encoding is often a valid sequence of characters which doesn't match what they intend. In such case...
by lexikos
27 Apr 2024, 21:15
Forum: Bug Reports
Topic: Weird critical error Topic is solved
Replies: 5
Views: 497

Re: Weird critical error Topic is solved

The debug server (within AutoHotkey) is supposed to buffer any commands which are received while a previous command is being processed, because the command processor isn't designed to support re-entry. However, the flood of commands from the extension is causing re-entry, which I realized shouldn't ...
by lexikos
23 Apr 2024, 04:12
Forum: Ask for Help (v2)
Topic: Run "i_view64.exe" and other programs moving the mouse cursor?!
Replies: 7
Views: 191

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
23 Apr 2024, 04:00
Forum: Ask for Help (v2)
Topic: How I can call my DLL? (C# net8)
Replies: 5
Views: 203

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
23 Apr 2024, 03:57
Forum: Bug Reports
Topic: COM: Table Manipulation in MS Word broken in recent AHK versions
Replies: 10
Views: 519

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
22 Apr 2024, 05:24
Forum: AutoHotkey Development
Topic: What to do when "A" getting the current active window misses?
Replies: 11
Views: 1504

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
22 Apr 2024, 05:04
Forum: Ask for Help (v2)
Topic: Run "i_view64.exe" and other programs moving the mouse cursor?!
Replies: 7
Views: 191

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

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

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

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

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

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

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

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

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

Go to advanced search