Search found 44 matches

by ludamo
20 Oct 2023, 03:10
Forum: Wish List
Topic: Hotstring option to only replace right-most needed characters.
Replies: 4
Views: 1161

Re: Hotstring option to only replace right-most needed characters.

Wouldn't the following do much the same thing?

Code: Select all

:*b0:because of it's::{bs 2}s
by ludamo
24 Sep 2023, 17:22
Forum: Ask for Help (v2)
Topic: Best way to trigger hotkey when over a window, and not the desktop? Topic is solved
Replies: 5
Views: 621

Re: Best way to trigger hotkey when over a window, and not the desktop? Topic is solved

One way to do it is to form a group of Desktop windows and then use #HotIf not WinActive. GroupAdd("gDesktop", "ahk_class Progman") ; Desktop GroupAdd("gDesktop", "ahk_class WorkerW") ; Explorer Thread. WorkerW comes to the foreground when you press Win + D (minimize all windows) GroupAdd("gDesktop"...
by ludamo
14 Sep 2023, 20:08
Forum: Ask for Help (v2)
Topic: Gaps in Windows....
Replies: 10
Views: 805

Re: Gaps in Windows....

Depending on whether you want to change a registry value, you might also look at a program called Winaero Tweaker and the Customize Window Borders section where you can reduce the Border padding at will (for Win 10 at least).
by ludamo
01 Sep 2023, 17:55
Forum: Bug Reports
Topic: AutoHotkey64.exe v2.0.6 heap corruption with GroupAdd & WinWaitActive( ahk_group ) Topic is solved
Replies: 2
Views: 765

AutoHotkey64.exe v2.0.6 heap corruption with GroupAdd & WinWaitActive( ahk_group ) Topic is solved

I have a long v2 AHK script that has been running fine for a long time but with version 2.0.6 has started silently exiting after startup with no MsgBox error. I have debugged in VS 2022 and come up with the following Debug Error and stack trace. HEAP CORRUPTION DETECTED: after normal block... CRT de...
by ludamo
21 Aug 2023, 03:31
Forum: Ask for Help (v2)
Topic: Keyboard key symbols - display in Gui ListView (hotkey cheatsheet)
Replies: 3
Views: 433

Re: Keyboard key symbols - display in Gui ListView (hotkey cheatsheet)

Just a suggestion. You could look at a font called SWGamekeys MT which has the keys displayed similar to that in your 2nd image. I think the font is included in the MS® intellimouse software download.
by ludamo
12 Jul 2023, 02:03
Forum: Ask for Help (v2)
Topic: window snapping doesn't work with modifiers
Replies: 2
Views: 409

Re: window snapping doesn't work with modifiers

I guess holding down Win & Alt keys which are heavily used by the system can be a bit tricky. This code seems to work.

Code: Select all

#!h:: {
KeyWait "LWin"
KeyWait "Alt"
KeyWait "h"
Send "#{Left}"
}
by ludamo
22 Jan 2023, 23:04
Forum: Ask for Help (v2)
Topic: MouseGetPos: Why do I only get "ApplicationFrameHost.exe" when the mouse is over "uwp app"? Topic is solved
Replies: 13
Views: 1946

Re: MouseGetPos: Why do I only get "ApplicationFrameHost.exe" when the mouse is over "uwp app"? Topic is solved

Perhaps another solution.

Code: Select all

#Requires AutoHotkey v2.0+

#y:: {
DllCall("GetCursorPos", "int64P", &pt64 := 0)
hWndP := DllCall("WindowFromPoint","int64", pt64)
MsgBox(WinGetProcessName(hWndP))
}
by ludamo
13 Jan 2023, 18:28
Forum: Scripts and Functions (v1)
Topic: UIAutomation with a focus on Chrome
Replies: 551
Views: 117546

Re: UIAutomation with a focus on Chrome

Thanks swagfag, I have added that to my code.
by ludamo
12 Jan 2023, 03:45
Forum: Scripts and Functions (v1)
Topic: UIAutomation with a focus on Chrome
Replies: 551
Views: 117546

Re: UIAutomation with a focus on Chrome

It works! Many thanks again. Would you care to comment if I need to do ObjRelease or something like that in the code? #Requires AutoHotkey v2.0+ 64-bit #SingleInstance Force IUIA := ComObject("{E22AD333-B25F-460C-83D0-0581107395C9}", "{34723AFF-0C9D-49D0-9896-7AB52DF8CD8A}") VT_I4 := 3 ; identifies ...
by ludamo
12 Jan 2023, 01:32
Forum: Scripts and Functions (v1)
Topic: UIAutomation with a focus on Chrome
Replies: 551
Views: 117546

Re: UIAutomation with a focus on Chrome

Thanks for the reply and that link. That example works in Notepad (doesn't work in Notepad++ or Word 2010) so I shall try and adapt the code to my goal and hopefully report back.
by ludamo
11 Jan 2023, 23:02
Forum: Bug Reports
Topic: ControlGetClassNN error with Win10 Win+v Clipboard
Replies: 6
Views: 1064

Re: ControlGetClassNN error with Win10 Win+v Clipboard

Thanks for looking into this further. I have had a look at the source code since but still can't quite understand where the failure is. MouseGetPos with option 2 can get the hWnd of the Win10 clipboard child window 'Windows.UI.Core.CoreWindow' OK and then if I use the Windows function 'GetClassName'...
by ludamo
11 Jan 2023, 18:03
Forum: Scripts and Functions (v1)
Topic: UIAutomation with a focus on Chrome
Replies: 551
Views: 117546

Re: UIAutomation with a focus on Chrome

I have read with interest this whole thread (thank you so much Descolada and others) and checked out other topics in V1 (e.g. https://www.autohotkey.com/boards/viewtopic.php?p=391568 - getting the URL from Firefox, and also another one getting the video links from a Youtube page) to try and solve th...
by ludamo
06 Jan 2023, 19:37
Forum: Bug Reports
Topic: ControlGetClassNN error with Win10 Win+v Clipboard
Replies: 6
Views: 1064

Re: ControlGetClassNN error with Win10 Win+v Clipboard

Well, for the Clipboard I can get the class name OK with WinGetClass but ControlGetClassNN throws the error, whereas for Calculator both work OK. That is MouseGetPos gets the control handle OK (Option 2 Stores the control's HWND in OutputVarControl rather than the control's ClassNN) but throws an er...
by ludamo
06 Jan 2023, 17:39
Forum: Bug Reports
Topic: ControlGetClassNN error with Win10 Win+v Clipboard
Replies: 6
Views: 1064

ControlGetClassNN error with Win10 Win+v Clipboard

When trying to detect the Class name of the Win10 (Win+v) clipboard AHK v 2.0.2.0 throws an error. Using the same procedure on Win 10 Calculator works OK. OS Name : Windows 10 Pro (64-bit) OS Version : 22H2 OS Build : 19045.2364. #Requires AutoHotkey v2.0 WheelDown:: WheelUp:: { MouseGetPos(,,&hWndM...
by ludamo
12 Dec 2022, 04:46
Forum: Ask for Help (v2)
Topic: Problems related to v2 docs compile_chm.ahk
Replies: 4
Views: 715

Re: Problems related to v2 docs compile_chm.ahk

I have been compiling v2 docs with v2 AHK now for a while with the following script adapted from the original CreateFiles4Help.ahk and including ActiveScript by Lexikos from https://github.com/Lexikos/ActiveScript.ahk/blob/master/ActiveScript.ahk . #Requires AutoHotkey v2.0-a #Warn VarUnset ;, Outpu...
by ludamo
11 Sep 2022, 03:48
Forum: Bug Reports
Topic: [v2-beta.8] FileSelect - Critical Error: Invalid memory read/write Topic is solved
Replies: 8
Views: 1351

Re: [v2-beta.8] FileSelect - Critical Error: Invalid memory read/write Topic is solved

Thanks for the feedback & correction. My C++ is very rudimentary (basically just copy what I see and put it somewhere else - trial & error). I was using TrayTip without parameters as part of my code to dismiss all sorts of notifications. I mean it is also used in the v2 help file without parameters ...
by ludamo
10 Sep 2022, 02:04
Forum: Bug Reports
Topic: [v2-beta.8] FileSelect - Critical Error: Invalid memory read/write Topic is solved
Replies: 8
Views: 1351

Re: [v2-beta.8] FileSelect - Critical Error: Invalid memory read/write Topic is solved

I just tried again with beta9 with

Code: Select all

TrayTip ""
but get the same result i.e. frequent "New notification" Toasts. Commenting out TrayTip "" fixes the issue.
by ludamo
10 Sep 2022, 01:59
Forum: Bug Reports
Topic: [v2-beta.8] FileSelect - Critical Error: Invalid memory read/write Topic is solved
Replies: 8
Views: 1351

Re: [v2-beta.8] FileSelect - Critical Error: Invalid memory read/write Topic is solved

I am getting toast notifications "New notification" when ever I start or reload AHK v2-beta8 and v2-beta9 and whenever a coded TrayTip (Toast) appears. This never happened before beta8. It seems that this is happening because I have a line in my script as follows: TrayTip ; with no parameters I thin...
by ludamo
17 Jul 2022, 05:27
Forum: Scripts and Functions (v2)
Topic: Change active Win 10 Power Plan
Replies: 3
Views: 1007

Re: Change active Win 10 Power Plan

Searching in Winnt.h for GUID*_POWER_ shows some of the power plans. Perhaps the ultimate one you refer to is:
GUID_MAX_POWER_SAVINGS, 0xA1841308, 0x3541, 0x4FAB, 0xBC, 0x81, 0xF7, 0x15, 0x56, 0xF2, 0x0B, 0x4A
a1841308-3541-4fab-bc81-f71556f20b4a

Go to advanced search