Spoiler
Script Help
Script Help
Ok so I made this script the one in the spoiler, what I want it to do is when I hold down the Right mouse button For 1 second I want it to press 8 key that activates the 8 keys toggle. but when the script presses the 8 the toggle doesn't activate, any help would be great.
Re: Script Help
try to add
at the top of script
it works (I think) for this
Code: Select all
Critical Off
it works (I think) for this
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Critical Off
#MaxThreadsPerHotkey 10
CoordMode, Pixel, Window
~$RButton::
KeyWait RButton, T1.0
While GetKeyState("RButton", "P") = 1
{
send,{8 down}
;~ sleep, 10
}
GetKeyState("RButton", "P") = 0
send, {8 up}
return
f1::
Toggle := !Toggle
If toggle
Msgbox her
/*
{
Gui, +AlwaysOnTop -Caption
Gui, Add, Text,, Toggle is ON
Gui, Show, NoActivate w75 h27 x940 y0, toggle is ON
}
else
Gui, destroy
While Toggle{
PixelSearch, FoundX, FoundY, 901, 537, 1020, 590, 0xD0150C, 0, Fast RGB
If ErrorLevel = 0
{
Send, {j down}
sleep 300
Send, {j up}
}
}
*/
return
Re: Script Help
Thank you but I got it lol I removed
and just made this
Code: Select all
~$RButton::
KeyWait RButton, T1.0
While GetKeyState("RButton", "P") = 1
{
send,{8 down}
sleep, 10
}
GetKeyState("RButton", "P") = 0
send, {8 up}
return
Code: Select all
Critical Off
#MaxThreadsPerHotkey 10
CoordMode, Pixel, Window
~$RButton::
KeyWait RButton, T1.0
While GetKeyState("RButton", "P")
Toggle := !Toggle
If toggle
{
Gui, +AlwaysOnTop -Caption +ToolWindow
Gui, Add, Text,, Toggle is ON
Gui, Show, NoActivate w75 h27 x940 y0, toggle is ON
}
else
Gui, destroy
While Toggle{
PixelSearch, FoundX, FoundY, 920, 510, 997, 572, 0xD0140B, 0, Fast RGB
If ErrorLevel = 0
{
Send, {j down}
sleep 300
Send, {j up}
}
}
return
Who is online
Users browsing this forum: AlFlo, Bing [Bot], Google [Bot] and 145 guests