Anvir & AutoHotKey

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
maximuszen
Posts: 3
Joined: 08 Dec 2022, 16:40

Anvir & AutoHotKey

Post by maximuszen » 08 Dec 2022, 17:15

AnVir has a Window Enhancement buttons and shortcuts one of which rolls up and down the window.

The shortcut is predefined as ALT + c.

I want to use a keyboard shortcut to roll up/down the window without having to focus on the Window. I've been working on it for several days without success. Here are some code that I have used without success.

Code: Select all

!,::
SetKeyDelay, 10, 10
WinActivate, ahk_class TViewForm ahk_exe BCompare.exe, folder1- Folder Compare - Beyond Compare
; just using "ahk_exe BCompare.exe" did not work either
;ControlSend, ahk_class TViewForm, !c, ahk_exe BCompare.exe, folder1- Folder Compare - Beyond Compare
;  also tried without success
;Sleep, 1000 also tried without success
!c
;Send, {Alt down}c{Alt up} also tried without success
return
The environment doesn't seem to be a problem because I have other hotkeys defined in this file that do work!

What am I missing?

User avatar
mikeyww
Posts: 26895
Joined: 09 Sep 2014, 18:38

Re: Anvir & AutoHotKey

Post by mikeyww » 08 Dec 2022, 19:02

Can try:

Code: Select all

!, Up::
KeyWait, Alt
SetKeyDelay,, 25
WinActivate, ahk_class TViewForm ahk_exe BCompare.exe, folder1- Folder Compare - Beyond Compare
Send !c
MsgBox, 64, Done, Done!
Return
If it doesn't work, you can see if pressing your key sequence manually at this point does work. If not, then you probably have the wrong WinTitle or window exclusion.

AHK rollup

Post Reply

Return to “Ask for Help (v1)”