Scroll to the bottom of vscode

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
haomingchen1998
Posts: 168
Joined: 20 Feb 2023, 16:37

Scroll to the bottom of vscode

Post by haomingchen1998 » 23 May 2023, 12:47

I want to write a code when I edit any ahk script with vscode, it sends Ctrl + End to scroll to the bottom of the page, so I can add new script to it. The problem with my script is that it just keep sending Ctrl + End every 1 second, are there ways to make it work only once when I first open the script with vscode? Thanks!

Code: Select all

;  Scroll to the Bottom when Editing Script
      SetTimer, CheckVSCodeWindow, 1000
      return

   CheckVSCodeWindow:
      IfWinActive, ahk_exe Code.exe
      ControlSend,, {Ctrl Down}{End}{Ctrl Up}, ahk_exe Code.exe
      return

Return to “Ask for Help (v1)”