Search found 8785 matches

by gregster
02 Apr 2024, 05:55
Forum: Ask for Help (v2)
Topic: Why has my drag & drop code stopped working after PC restart
Replies: 17
Views: 462

Re: Why has my drag & drop code stopped working after PC restart

ok so I did experiment a bit more on my own and the main issue seems to have been the SendMode, including SendMode "Event" in my code before any of the mouse movement code fixed the issue, even though the documentation says it should be the default mode and I never changed it to anything else. I do...
by gregster
01 Apr 2024, 15:26
Forum: Ask for Help (v1)
Topic: Why does script 1::Send, !{Tab} *sometimes* fails
Replies: 3
Views: 50

Re: Why does script 1::Send, !{Tab} *sometimes* fails

I see, so your question is specifically about AltTab, not generally about sending keys. Afaik, AHK tries to deal with the special implications of AltTab : https://www.autohotkey.com/docs/v1/Hotkeys.htm#alttab I never tried these solutions (nor ever tried to remap AltTab), so others probably have mor...
by gregster
01 Apr 2024, 14:53
Forum: Ask for Help (v1)
Topic: Why does script 1::Send, !{Tab} *sometimes* fails
Replies: 3
Views: 50

Re: Why does script 1::Send, !{Tab} *sometimes* fails

In some cases, it could be insufficient rights (you are trying to send to an active window with admin rights while your script is not elevated), but generally programs are not optimized to react to artificial key presses and any program might react differently to them. That's why AHK offers a number...
by gregster
01 Apr 2024, 10:07
Forum: Ask for Help (v1)
Topic: how to switch a window from one screen to another Topic is solved
Replies: 4
Views: 67

Re: how to switch a window from one screen to another Topic is solved

Aaqil wrote:
01 Apr 2024, 09:55
I am using AutoHotInterception in one of my scripts and unfortunately, It isn't available for v2
Actually, it is available in both v1 and v2: https://github.com/evilC/AutoHotInterception#ahk-v2
The v2 forum topic is here: viewtopic.php?f=83&t=115282
by gregster
31 Mar 2024, 09:58
Forum: Ask for Help (v1)
Topic: How to read monitor refresh rate? Topic is solved
Replies: 7
Views: 100

Re: How to read monitor refresh rate? Topic is solved

The topic was moved to AHK v1 help.
by gregster
31 Mar 2024, 09:46
Forum: Ask for Help (v1)
Topic: Find color closest to cursor and click Topic is solved
Replies: 24
Views: 437

Re: Find color closest to cursor and click Topic is solved

@mamo691, please use code tags when posting code, so that the moderators don't have to edit your posts. Thank you!

ctags.png
ctags.png (14.18 KiB) Viewed 398 times
by gregster
31 Mar 2024, 08:35
Forum: Ask for Help (v1)
Topic: Throw a warning if running 2.0 ? Topic is solved
Replies: 3
Views: 120

Re: Throw a warning if running 2.0 ? Topic is solved

No, not in the same subdirectory - I guess that would mess things up. just let the installer do its thing. The folder structure seems to depend on which version was installed first: Installing with v1 There are two methods of installing v1 and v2 together: 1. Install v1 first, and then v2. In that c...
by gregster
31 Mar 2024, 01:18
Forum: SciTE4AutoHotkey
Topic: Hebrew language Topic is solved
Replies: 2
Views: 39

Re: Hebrew language Topic is solved

Use UTF-8 with BOM (in v1 or v2) or UTF-8 (only v2) encoding to work with Unicode characters.
File menu > Encoding > ...
by gregster
30 Mar 2024, 11:18
Forum: Gaming Help (v1)
Topic: Left click loop
Replies: 8
Views: 250

Re: Left click loop

There seems to be some confusion about the used version. Just try to run the code above with v2 (eg, if you add #Requires AutoHotkey v2.0 - and it will error out and never run.
If you are actually using the code above, you are running it with v1. Add msgbox %A_AHKversion% at the top to confirm.
by gregster
30 Mar 2024, 01:44
Forum: Gaming Help (v1)
Topic: Send keys to inactive window
Replies: 1
Views: 103

Re: Send keys to inactive window

There is also a v2 version of this question: viewtopic.php?f=94&t=128031
by gregster
30 Mar 2024, 01:38
Forum: Gaming Help (v1)
Topic: Left click loop
Replies: 8
Views: 250

Re: Left click loop

Should we assume that this is an AHK v2 question because it has been posted in AHK v2 help? This looks much more like AHK v1 code.
We can move the topic, if it's a v1 question.
by gregster
30 Mar 2024, 01:15
Forum: Gaming
Topic: Send keys to inactive window
Replies: 4
Views: 118

Re: Send keys to inactive window

Of course, it can make sense to post what you have used so far, even if it's v1 code. I assume, it's the code from this post: https://www.autohotkey.com/boards/viewtopic.php?f=18&t=128005&p=565516#p565516 That post was originally in v2 help. Was it already meant as a v2 question back then? If you ar...
by gregster
29 Mar 2024, 21:06
Forum: Ask for Help (v2)
Topic: How NOT to display AHK icon on the taskbar when script is running?
Replies: 4
Views: 161

Re: How NOT to display AHK icon on the taskbar when script is running?

The taskbar button can be hidden by using the ToolWindow option for GUIs: MyGui.Opt("+ToolWindow") ToolWindow: Provides a narrower title bar but the window will have no taskbar button. This always hides the maximize and minimize buttons, regardless of whether the WS_MAXIMIZEBOX and WS_MINIMIZEBOX st...
by gregster
29 Mar 2024, 20:18
Forum: Ask for Help (v2)
Topic: Why am I getting this error executing DateDiff function?
Replies: 2
Views: 52

Re: Why am I getting this error executing DateDiff function?

btw, it is recommended to post code in a codebox instead of a picture. That way, people can easily test your code.
by gregster
29 Mar 2024, 20:16
Forum: Ask for Help (v2)
Topic: Why am I getting this error executing DateDiff function?
Replies: 2
Views: 52

Re: Why am I getting this error executing DateDiff function?

Datediff needs date-time stamps in the YYYYMMDDHH24MISS format. Your picture of the error message shows what you got instead. Format Type: String If blank or omitted, it defaults to the time followed by the long date, both of which will be formatted according to the current user's locale. For examp...
by gregster
29 Mar 2024, 16:35
Forum: Scripts and Functions (v2)
Topic: HotGestures - Customize and recognize mouse gestures
Replies: 11
Views: 1727

Re: HotGestures - Customize and recognize mouse gestures

@GollyJer, I didn't test it, but I would have tried AHK hotkey syntax: "^Rbutton"; it looks like this built-in function is also used in the source code.
by gregster
29 Mar 2024, 11:24
Forum: Ask for Help (v1)
Topic: Throw a warning if running 2.0 ? Topic is solved
Replies: 3
Views: 120

Re: Throw a warning if running 2.0 ? Topic is solved

Afaik, this specific error message was caused by a bug in the v2 Launcher (including v2.0.11) - and should be fixed in the newest version (lexikos stated: " v2.0.12 fixes this, and/or at least handles PCRE execution errors better. ") Otherwise, the AHK v2 Launcher already takes care of choosing or s...
by gregster
29 Mar 2024, 10:20
Forum: Ask for Help (v2)
Topic: After calling ExitApp, key within rebind script stops working.
Replies: 2
Views: 62

Re: After calling ExitApp, key within rebind script stops working.

It would be nice to understand how an AHK remap script can affect a key after ExitApp is called... It can't. It's simply not capable of doing that. Especially, it does nothing to change anything in your keyboard - so another keyboard would not change anything (if the keyboard is not actually broken...
by gregster
28 Mar 2024, 14:58
Forum: Ask for Help (v1)
Topic: ControlClicking on a window hidden by 'winHide'? Topic is solved
Replies: 3
Views: 87

Re: ControlClicking on a window hidden by 'winHide'? Topic is solved

This can be found in the ControlClick docs which seems to support that hidden windows are supported in principle: To operate upon a control's HWND (window handle), leave this parameter blank and specify ahk_id %ControlHwnd% for the WinTitle parameter (this also works on hidden controls even when Det...
by gregster
28 Mar 2024, 14:48
Forum: Ask for Help (v1)
Topic: ControlClicking on a window hidden by 'winHide'? Topic is solved
Replies: 3
Views: 87

Re: ControlClicking on a window hidden by 'winHide'? Topic is solved

Don't know the answer - but at least your ControlClick syntax is currently incorrect and your code above can't work as expected: Mode 1 (Position): Specify the X and Y coordinates relative to the target window's upper left corner. The X coordinate must precede the Y coordinate and there must be at l...

Go to advanced search