Search found 178 matches
- 24 May 2024, 08:08
- Forum: AutoHotkey Development
- Topic: Modules
- Replies: 12
- Views: 1136
Re: Modules
Python's import syntax is nicer since all module names are in the same column at the start, so easier to read, and also allows (in principle) auto-completion since by the type you type specific imports it's already known what module they'll be imported from
- 24 May 2024, 04:28
- Forum: Bug Reports
- Topic: v2.1-alpha.11 breaks #Warn
- Replies: 1
- Views: 301
v2.1-alpha.11 breaks #Warn
Tried v2.1-alpha.11 and couldn't launch my script, turns out there is something wrong with Warn? #Warn All +1::msgbox(1) test() { En := 'A' } when commenting out #Warn All it works Event viewer shows Exception code: 0xc0000005 Fault offset: 0x00000000000585c6 Tried launching with/without UIA via Dash
- 19 May 2024, 05:57
- Forum: Ask for Help (v1)
- Topic: How to have AHK be active / running at Windows 10 Login Screen?
- Replies: 6
- Views: 4782
Re: How to have AHK be active / running at Windows 10 Login Screen?
If you have admin rights on the machine it's possible, but I also can't think of a reason as to why anyone would do this other than to keylog somebody. One reason would be to be able to type in your own password on the login screen using various typing conveniences you've setup via AutoHotkey (e.g....
- 26 Apr 2024, 13:15
- Forum: Ask for Help (v2)
- Topic: Adding GUI child to another window breaks Ctrl modifiers (temporarily)
- Replies: 0
- Views: 238
Adding GUI child to another window breaks Ctrl modifiers (temporarily)
When holding Ctrl (try in a WordPad) first press C you get regular "Copy" action second press C you get C printed instead Releasing Ctrl and pressing it again seems to correct the situation How to avoid breaking it in the first place? (I'm using this trick to later hide a mouse pointer in the window...
- 16 Apr 2024, 05:50
- Forum: AutoHotkey Development
- Topic: What to do when "A" getting the current active window misses?
- Replies: 11
- Views: 1851
Re: What to do when "A" getting the current active window misses?
Suggestions It could just wait for the next active window with a timeout making it more robust I think this might be a better default since I think most of the time you don't care about those temporary activation misses and would be fine using whatever activates in the next moment (and only failing...
- 16 Apr 2024, 05:45
- Forum: AutoHotkey Development
- Topic: What to do when "A" getting the current active window misses?
- Replies: 11
- Views: 1851
Re: What to do when "A" getting the current active window misses?
@kczx3 that is true, which is why my example isn't using "A" as WinTitle but instead Last Found Window, which should mean that it is guaranteed that the message is sent to an actual window. Oh, thanks, I think I've had the exact same bug and was wondering why it existed, "but I've just checked that...
- 30 Mar 2024, 03:50
- Forum: Ask for Help (v2)
- Topic: Stop auto sort in Map ? Topic is solved
- Replies: 11
- Views: 2015
Re: Stop auto sort in Map ? Topic is solved
FYI there are a couple of issues that prevent the Map iterator from working in the later AHK versions, see the fixed version https://github.com/mmikeww/AHK-v2-script-converter/blob/master/lib/ClassOrderedMap.ahk
- 28 Mar 2024, 08:16
- Forum: Ask for Help (v2)
- Topic: A script which detects Text Area irrespective of editor/type of window?
- Replies: 1
- Views: 284
Re: A script which detects Text Area irrespective of editor/type of window?
You could try the static get⎀(&⎀←,&⎀↑,&⎀↔:=0,&⎀↕:=0) { ; true if caret is visible and text is editable function that I'm using in my mouse pointer hiding script using this Win.ahk library that relies among other thigs on UIA automation library (all libraries are part of the linked repo)
- 27 Mar 2024, 10:18
- Forum: Ask for Help (v2)
- Topic: How to call an address from CallbackCreate in another script?
- Replies: 0
- Views: 268
How to call an address from CallbackCreate in another script?
Can I call a function created in one AHK script from another AHK script via a simple DllCall(fnAddress) that I've shared between these scripts? Or do I need to translate the address somehow? (ultimately, this callback would be called from a non-ahk program, so I can't just #include it as I would in ...
- 24 Mar 2024, 06:37
- Forum: Scripts and Functions (v2)
- Topic: [alpha] WinEvent - easily detect window open, close, move, and more
- Replies: 56
- Views: 4261
- 23 Mar 2024, 07:37
- Forum: Scripts and Functions (v2)
- Topic: [alpha] WinEvent - easily detect window open, close, move, and more
- Replies: 56
- Views: 4261
Re: [alpha] WinEvent - easily detect window open, close, move, and more
Well, you described the reasons why callbacks can't be stopped the same way you stop other script activity. My point was that it might be unexpected: if I stop all hotkeys and hotstrings/pause, which is mentally "stop AHK without exiting", it's unexpected that callbacks continue to work (couldn't ma...
- 23 Mar 2024, 02:33
- Forum: Scripts and Functions (v2)
- Topic: [alpha] WinEvent - easily detect window open, close, move, and more
- Replies: 56
- Views: 4261
Re: [alpha] WinEvent - easily detect window open, close, move, and more
As far as I understand, suspending hotkeys/pausing the script has no effect on the WinEven lib callbacks. There is an easy workaround - check for A_IsSuspended and do nothing in your callback, but I was wondering whether you think it might make sense for the library to have this option at the time o...
- 14 Mar 2024, 03:14
- Forum: Ask for Help (v2)
- Topic: Overriding other app's window style without a flash
- Replies: 3
- Views: 178
Re: Overriding other app's window style without a flash
I see, then I guess I'd also need to implement all the logic inside that DLL file. Do you know whether it's actually possible, though, not to only apply styles, but update window size/position, and, crucially, do all that before a window is shown?
- 12 Mar 2024, 14:19
- Forum: Tutorials (v2)
- Topic: Detect window open and close
- Replies: 15
- Views: 5990
Re: Detect window open and close
@valuex, sometimes the window title doesn't update immediately after creation to the actual title (I don't know why this is for some windows yet not others). It can be worked around by adding the info into gOpenWindows with a slight delay (eg 40ms or 100ms). Since for all the windows that get the t...
- 12 Mar 2024, 13:33
- Forum: Ask for Help (v2)
- Topic: Overriding other app's window style without a flash
- Replies: 3
- Views: 178
Overriding other app's window style without a flash
I have code that removes various window elements like title that I apply to an app's window on launch via Run an app, WinWait until it's window appears, then applying WinSetStyle (and then adjusting window size, position to match the old one) However, this "flashes": you first see the window with th...
- 12 Mar 2024, 12:46
- Forum: KeySharp
- Topic: Keysharp - C# port of AHK
- Replies: 18
- Views: 2442
Re: Keysharp - C# port of AHK
I've noticed that your parser doesn't accept unicode in function/var names unlike AutoHotkey, so can't transition my beautifully named :) vars like move← := ...
- 12 Mar 2024, 08:14
- Forum: Ask for Help (v2)
- Topic: Unreliable GetKeyState physical state detection (false positives) Topic is solved
- Replies: 14
- Views: 716
Re: Unreliable GetKeyState physical state detection (false positives) Topic is solved
Nice tip about faking the real input! I think I'm fine with checking the logical state for now, but will keep this in mind in case this logical state check causes trouble.
Also updated my answer to reflect that all events are processed by inputhooks
Also updated my answer to reflect that all events are processed by inputhooks
- 12 Mar 2024, 06:02
- Forum: Tutorials (v2)
- Topic: Understanding SendInput and keyboard hooks
- Replies: 15
- Views: 1953
- 12 Mar 2024, 02:22
- Forum: Tutorials (v2)
- Topic: Understanding SendInput and keyboard hooks
- Replies: 15
- Views: 1953
Re: Understanding SendInput and keyboard hooks
By the way, is it possible to block SendInput reverting (when two AHK scripts use hooks)? This caused a hard-to-track bug in my scripts recently, so I'm wondering whether it'd be possible to avoid such silent conversions so that an explicit SendInput always sends Input even though it might not get t...
- 12 Mar 2024, 02:16
- Forum: Ask for Help (v2)
- Topic: Unreliable GetKeyState physical state detection (false positives) Topic is solved
- Replies: 14
- Views: 716
Re: Unreliable GetKeyState physical state detection (false positives) Topic is solved
I think I finally understand the cause (though might still be wrong on some subtle detail of how multiple scripts interact with each other) the "physical" state is derived only from unflagged (see next comment) key events hitting the inputhook of a given script (real physical input is unflagged, AHK...