davejonescue
Puritan Board Junior
Hello, is there anybody versed in AutoHotKey? I am trying to create a script or executable that will allow me to use Word as my reference, but scroll in Foxit Reader when I scroll in Word. Below is the script ChatGPT gave me, but I dont really know how to code, or where to start, but that it is not working after running the script and opening up both Word and Foxit Reader.
Can you create an AutoHotKey script that will allow me to Scroll both Microsoft Word and Foxit PDf Reader at the same time, using Microsoft Word as the rule?
Certainly! Below is an AutoHotKey script that allows you to scroll both Microsoft Word and Foxit PDF Reader simultaneously, with Microsoft Word as the reference:
autohotkey
SetTitleMatchMode 2 ; Match any substring in the title
#Persistent ; Keep the script running
; Function to scroll Foxit PDF Reader
ScrollFoxit() {
WinGet, id_foxit, list, Foxit Reader
Loop, %id_foxit%
{
this_id_foxit := id_foxit%A_Index%
ControlSend,, {WheelDown}, ahk_id %this_id_foxit%
}
}
#IfWinActive ahk_class OpusApp ; Microsoft Word window class
{
; Scroll Down
WheelDown::
Send {WheelDown}
ScrollFoxit() ; Call the function to scroll Foxit PDF Reader
return
; Scroll Up
WheelUp::
Send {WheelUp}
ScrollFoxit() ; Call the function to scroll Foxit PDF Reader
return
}
This script will scroll both Microsoft Word and Foxit PDF Reader simultaneously. When you scroll in Microsoft Word, it will send the same scroll command to Foxit PDF Reader. Make sure to have both Microsoft Word and Foxit PDF Reader open while running this script. Adjust the WheelDown and WheelUp keys as per your preference if you want to scroll using different keys.
Can you create an AutoHotKey script that will allow me to Scroll both Microsoft Word and Foxit PDf Reader at the same time, using Microsoft Word as the rule?
Certainly! Below is an AutoHotKey script that allows you to scroll both Microsoft Word and Foxit PDF Reader simultaneously, with Microsoft Word as the reference:
autohotkey
SetTitleMatchMode 2 ; Match any substring in the title
#Persistent ; Keep the script running
; Function to scroll Foxit PDF Reader
ScrollFoxit() {
WinGet, id_foxit, list, Foxit Reader
Loop, %id_foxit%
{
this_id_foxit := id_foxit%A_Index%
ControlSend,, {WheelDown}, ahk_id %this_id_foxit%
}
}
#IfWinActive ahk_class OpusApp ; Microsoft Word window class
{
; Scroll Down
WheelDown::
Send {WheelDown}
ScrollFoxit() ; Call the function to scroll Foxit PDF Reader
return
; Scroll Up
WheelUp::
Send {WheelUp}
ScrollFoxit() ; Call the function to scroll Foxit PDF Reader
return
}
This script will scroll both Microsoft Word and Foxit PDF Reader simultaneously. When you scroll in Microsoft Word, it will send the same scroll command to Foxit PDF Reader. Make sure to have both Microsoft Word and Foxit PDF Reader open while running this script. Adjust the WheelDown and WheelUp keys as per your preference if you want to scroll using different keys.