Search found 4365 matches
- Yesterday, 20:13
- Forum: Ask for Help (v2)
- Topic: Reopen Last closed window script (v1 -> v2) Topic is solved
- Replies: 8
- Views: 372
Re: Reopen Last closed window script (v1 -> v2) Topic is solved
But somehow the script throws no error and works regardless? If you run your variant, open any folder with other folders inside it, and in the same window go to another folder, then close that window, then try to open the last closed one by hotkey - you will see what the problem is. My attempt I'd ...
- 17 May 2024, 18:52
- Forum: Ask for Help (v2)
- Topic: Clear Win10 notification alert history from v1 to v2.
- Replies: 7
- Views: 420
Re: Clear Win10 notification alert history from v1 to v2.
f := {Close:10, get_Count:7, get_Current:6, get_Id:8, get_Item:6, get_Status:7, GetNotificationsAsync:10, GetResults:8, RemoveNotification:13, RequestAccessAsync:6} This approach won't always work because code may use interfaces whose some methods have the same names but different offsets, for exam...
- 17 May 2024, 18:35
- Forum: Ask for Help (v1)
- Topic: How to save image in clipboard.
- Replies: 82
- Views: 12544
Re: How to save image in clipboard.
Whether "Ptr" or "Int" is used depends on the size of the data that is specified after it. DllCall("DeleteObject","uint",hbm) Here hbm refers to the "handle" data type. In 32-bit processes this type occupies 32 bits and in 64-bit processes it occupies 64 bits. That's why it is always better to speci...
- 17 May 2024, 03:52
- Forum: Ask for Help (v2)
- Topic: ComObjectArray how to Topic is solved
- Replies: 2
- Views: 146
Re: ComObjectArray how to Topic is solved
The object returned by the ResponseBody method is not what you are assuming. It is a SafeArray , which is an array of bytes. However, if the site returns a JSON string, you may well be able to turn it into an AHK object using libraries, of which there are several on our site. #Requires AutoHotkey v2...
- 17 May 2024, 03:45
- Forum: Ask for Help (v2)
- Topic: Tray app to change power plans
- Replies: 10
- Views: 369
Re: Tray app to change power plans
Solving this task, it is quite possible to do without external applications and libraries. :) #Requires AutoHotkey v2 class PowerSchemeSwitch { /* This class modifies the script's tray icon menu so that you can switch the computer's power scheme through it. */ static __New() { Persistent this.knownP...
- 16 May 2024, 14:39
- Forum: Ask for Help (v1)
- Topic: How to save image in clipboard.
- Replies: 82
- Views: 12544
Re: How to save image in clipboard.
So regarding BOTH the above TWO codes, CODE 1 & CODE 2, the DeleteObject() is correctly used in BOTH CODES, so i must not worry for any memory leak, please? Correct. Now, the reason you answer that the variable name does not matter, it is because the (i) is the ONLY one variable in the "MAIN" code ...
- 16 May 2024, 14:23
- Forum: Ask for Help (v2)
- Topic: Clear Win10 notification alert history from v1 to v2.
- Replies: 7
- Views: 420
Re: Clear Win10 notification alert history from v1 to v2.
It looks like you are defining a meta-function that gets called when a ComValue is called in order to implement a ComCall. Yeah, that's right. When we use the ComCall() function, we need to specify the method offset in the vtable in the first parameter. To avoid using "magic numbers", I wrote the c...
- 14 May 2024, 12:55
- Forum: Ask for Help (v2)
- Topic: Clear Win10 notification alert history from v1 to v2.
- Replies: 7
- Views: 420
Re: Clear Win10 notification alert history from v1 to v2.
#Requires AutoHotkey v2 ClearNotifications() ClearNotifications() { static COMClass := 'Windows.UI.Notifications.Management.UserNotificationListener' , IID_IUserNotificationListenerStatics := '{FF6123CF-4386-4AA3-B73D-B804E5B63B23}' , UserNotificationListenerAccessStatus := ['Unspecified', 'Allowed...
- 13 May 2024, 14:44
- Forum: Ask for Help (v2)
- Topic: String Manipulation between ^ and /
- Replies: 22
- Views: 1188
Re: String Manipulation between ^ and /
@sofista
You have extra parentheses: RegExMatch(str, "=(?<year>..)(?<month>..)", &m)
You have extra parentheses: RegExMatch(str, "=(?<year>..)(?<month>..)", &m)
- 13 May 2024, 14:38
- Forum: Ask for Help (v1)
- Topic: How to save image in clipboard.
- Replies: 82
- Views: 12544
Re: How to save image in clipboard.
If we decide to not use it, does it will cause any problems to anywhere (memory problems etc or any other problems)? The DeleteObject() function should be used by hBitmap when hBitmap has been created and is no longer needed. Failure to use DeleteObject() in this case will result in a memory leak. ...
- 13 May 2024, 12:19
- Forum: Ask for Help (v2)
- Topic: Make ListView selection toggle individual selection Topic is solved
- Replies: 2
- Views: 180
Re: Make ListView selection toggle individual selection Topic is solved
#Requires AutoHotkey v2 wnd := Gui() lv := wnd.Add('ListView', 'r10 w400', ['Name','Size (KB)']) Loop Files, A_MyDocuments . '\*.*' { lv.Add(, A_LoopFileName, A_LoopFileSizeKB) } lv.ModifyCol(1, 'AutoHdr') lv.ModifyCol(2, 'AutoHdr Integer') wnd.Show() OnMessage(0x201, WM_LBUTTONDOWN) WM_LBUTTONDOWN...
- 10 May 2024, 14:04
- Forum: Ask for Help (v2)
- Topic: Any way to determine which control of a webform has focus? Topic is solved
- Replies: 8
- Views: 515
Re: Any way to determine which control of a webform has focus? Topic is solved
The title of the browser window corresponds to the name of the active tab, you can see this if you enable the title bar display in the settings.
- 09 May 2024, 19:30
- Forum: Ask for Help (v1)
- Topic: Break chained Scripts' tray icon - UngruppingTrayIcon doesn't work consistently.
- Replies: 2
- Views: 413
Re: Break chained Scripts' tray icon - UngruppingTrayIcon doesn't work consistently.
This approach only separates the icons of such scripts from the rest of the scripts where this method is not applied. However, the icons of scripts where this method is used remain linked. There is currently no known way to separate them other than renaming the exe file.
- 09 May 2024, 18:26
- Forum: Ask for Help (v1)
- Topic: How to save image in clipboard.
- Replies: 82
- Views: 12544
Re: How to save image in clipboard.
F3:: ; press F3 to load screenshot to clipboard Clipboard := ; Clear the clipboard GDI_CaptureScreenToClipboard(0, 0, A_ScreenWidth, A_ScreenHeight) DllCall("DeleteObject", "Ptr", hBM) ; Clean-up Return These lines Clipboard := ; Clear the clipboard DllCall("DeleteObject", "Ptr", hBM) ; Clean-up ar...
- 09 May 2024, 15:20
- Forum: Ask for Help (v2)
- Topic: Any way to determine which control of a webform has focus? Topic is solved
- Replies: 8
- Views: 515
Re: Any way to determine which control of a webform has focus? Topic is solved
The solution will depend on how the required elements are described in html. For example, on this page there are two search fields with id keywords and search_keywords . If you run this script on this page ((...elemIds) => { const prevTitle = document.title; const updateTitle = id => document.title ...
- 09 May 2024, 10:54
- Forum: Ask for Help (v2)
- Topic: Any way to determine which control of a webform has focus? Topic is solved
- Replies: 8
- Views: 515
Re: Any way to determine which control of a webform has focus? Topic is solved
A variant of the solution is Tampermonkey extension for Firefox + custom javascript that will track a focus change event on a page, and add to the page title information about which element is in focus. Accordingly, you will be able to use #HotIf in AutoHotkey script.
- 08 May 2024, 22:15
- Forum: Ask for Help (v2)
- Topic: Progressive removal of text in Text Control?
- Replies: 5
- Views: 402
Re: Progressive removal of text in Text Control?
#Requires AutoHotkey v2+ ; disappearing text experiment guiTitle := 'Color Change' str := 'the quick brown fox jumps over' mg := Gui(, guiTitle) mg.SetFont('s16 cBlue','Consolas') sBlue := mg.Add('text', 'w400', str) mg.Show() #hotif WinActive(guiTitle) Right:: Left:: ((txtCtrl, side) => ( p := sid...
- 08 May 2024, 21:19
- Forum: Ask for Help (v1)
- Topic: How to save image in clipboard.
- Replies: 82
- Views: 12544
Re: How to save image in clipboard.
The location of DllCall("DeleteObject", "Ptr", hBM) ; Clean-up is it correct? Yes, it's ok. Do i also need to add ---> DllCall("DeleteObject", "Ptr", pBM) ; Clean-up ? No, the DeleteObject() function is not intended for this data type. Resource freeing has already been done in the gdip.DisposeImage...
- 05 May 2024, 13:05
- Forum: Ask for Help (v2)
- Topic: Get command associated with context menu items?
- Replies: 8
- Views: 536
Re: Get command associated with context menu items?
I can identify the command that can be used to 'simulate' the menu click, without actually displaying the menu itself? I wanted to reply that it is, but I decided to test it first. Unfortunately, it turned out that approach doesn't work with Windows Explorer. My thought is to write a script that th...
- 05 May 2024, 12:15
- Forum: Ask for Help (v2)
- Topic: Get command associated with context menu items?
- Replies: 8
- Views: 536
Re: Get command associated with context menu items?
So no persistent app can receive the command that you have suggested. If a context menu can be called, then there is an application that displays it. When the user clicks on a menu item, the application that opened the menu receives a WM_COMMAND message and executes the command associated with that...