The second monitor is my main monitor but i want this script F7 function to work on the…
- User
The second monitor is my main monitor but i want this script F7 function to work on the first monitor even though i am using the second monitor SingleInstance, Force #MaxThreadsPerHotkey 2 SetTitleMatchMode, 2 ; Allows partial matching of window titles SetKeyDelay, -1
Global screencenterx := (A_ScreenWidth // 2) Global screencentery := (A_ScreenHeight // 2)
; Simple Clicker F5::Goto AFKCTest
F6:: ToolTip "GeForceNow Anti-AFK Enabled", 0, 0 Goto GeForceNowAntiAFK
; New F7 functionality - faster version F7:: Send, f ; Press "f" Sleep, 100 ; Reduced delay MouseMove, 1250, 200 ; Move cursor to coordinates (1250, 200) Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, g ; Type "g" Sleep, 50 ; Reduced delay Send, {Enter} ; Press Enter Sleep, 100 ; Reduced delay MouseMove, 1427, 193 ; Move cursor to coordinates (1427, 193) Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, {Enter} ; Press Enter after left click Sleep, 50 ; Reduced delay MouseMove, 1250, 200 ; Move back to (1250, 200) Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, y ; Type "y" Sleep, 50 ; Reduced delay Send, {Enter} ; Press Enter Sleep, 100 ; Reduced delay MouseMove, 1427, 193 ; Move to (1427, 193) again Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, {Enter} ; Press Enter after left click Sleep, 50 ; Reduced delay MouseMove, 1250, 200 ; Move back to (1250, 200) Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, o ; Type "o" Sleep, 50 ; Reduced delay Send, {Enter} ; Press Enter Sleep, 100 ; Reduced delay MouseMove, 1427, 193 ; Move to (1427, 193) again Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, {Enter} ; Press Enter after left click Sleep, 50 ; Reduced delay MouseMove, 1250, 200 ; Move back to (1250, 200) Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, h ; Type "h" Sleep, 50 ; Reduced delay Send, {Enter} ; Press Enter Sleep, 100 ; Reduced delay MouseMove, 1427, 193 ; Move to (1427, 193) again Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, {Enter} ; Press Enter after left click Sleep, 50 ; Reduced delay MouseMove, 1250, 200 ; Move back to (1250, 200) Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, f ; Type "f" Sleep, 50 ; Reduced delay Send, {Enter} ; Press Enter Sleep, 100 ; Reduced delay MouseMove, 1427, 193 ; Move to (1427, 193) again Sleep, 50 ; Reduced delay Click, Left ; Left click Sleep, 100 ; Reduced delay Send, {Enter} ; Press Enter after left click Send, {Esc} ; Press Escape to close interface Return
AFKCTest: AFKCToggle := !AFKCToggle Loop { If not AFKCToggle break Sleep 100 ControlClick, x%screencenterx% y%screencentery%, GeForce NOW,,,, D Pos ControlClick, x%screencenterx% y%screencentery%, GeForce NOW,,,, U Pos } Return
- Assistant
To make your F7 function work on the first monitor, even though your second monitor is set as the main monitor, you need to adjust the coordinates in the script to reference the first monitor's coordinate space. You can achieve this by identifying the starting position of your first monitor and adjusting the and commands accordingly. Here are steps and modifications you can make:
- User
print the full script with the changes
- Assistant
- User
will this script remove me from the second monitor
- Assistant
The script itself won't automatically "remove" you from the second monitor, but it will perform mouse movements and clicks on the specified coordinates of the first monitor. The
MouseMoveandClickcommands with adjusted offsets aim to interact specifically with the first monitor based on your setup. - User
Can you edit the script so that it runs on the first monitor without effecting the main second monitor
- Assistant