Hello, I'm new to AHKv2, and I'm trying to create a script that will allow me to copy and/or clone my keystrokes to another window using Parsec, an application that is very similar to Remote Desktop or TeamViewer. The primary keys I will be using will be the W, A, S, and D buttons. For more context, I am using two PCs, with one acting as the controller for the second one. Each PC will be running Minecraft, and my end goal is to be able to control both PCs by utilizing AHK to interact with the Parsec Window located on the first PC. One key feature I want my AHK script to possess is the ability to choose between interacting with one specific window or all designated windows using a hotkey. I would appreciate it if anyone could give me any coding examples or other information I could use to achieve my goals. I have tried searching for help and information using YouTube, but unfortunately the videos that appear are either for AHKv1 or not quite related to what I am looking for.
"Error: Target window not found."
My code, while incredibly basic, does work with TeamViewer, but unfortunately, AHK is unable to detect Parsec. This is an issue since Parsec is currently the best remote access software I can find that will allow me to actually move my character, unlike TeamViewer. I have tried using Window Spy, but it seems it cannot detect Parsec either, as it only shows details of the last known window my mouse cursor hovered over.
Current Features I plan to use in the future:
-Hotkey Symbols
-Gosub
-Label
-Variables
-If (expression)
-Boolean
-Operators
-SetTimer
-GetKeyState
-Send
-ControlSend
Please let me know if I'm on the right track, as well as suggest any tips or tricks I could use in the comments. Any help would be greatly appreciated.
Code: Select all
#Requires AutoHotkey v2.0
W::
{
ControlSend "{W}" , "Parsec"
}