I have this script which works in a standalone AHK file
Code: Select all
#Persistent
Status_Of_The_Mouse_Button := 0
Time_Count_Of_The_Mouse_Button_Being_In_A_Given_State := 0
SetTimer, Checking_Status_Of_The_Mouse_Button, 11
Return
Checking_Status_Of_The_Mouse_Button:
GetKeyState, Status_Of_The_Mouse_Button, XButton1
if (Status_Of_The_Mouse_Button = "D")
{
if (Time_Count_Of_The_Mouse_Button_Being_In_A_Given_State = 0)
{
Time_Count_Of_The_Mouse_Button_Being_In_A_Given_State := A_TickCount
}
}
else
{
if (Time_Count_Of_The_Mouse_Button_Being_In_A_Given_State > 0)
{
if (A_TickCount - Time_Count_Of_The_Mouse_Button_Being_In_A_Given_State >= 333)
{
Send {XButton1 Down}
}
else
{
Send TEST HAS BEEN EXECUTED SUCCESSFULLY
}
Send {XButton1 Up}
}
Time_Count_Of_The_Mouse_Button_Being_In_A_Given_State := 0
}
Return
Code: Select all
#SingleInstance Force
SetTimer, Update_This_Script, 333
Return
Update_This_Script:
FileGetAttrib, attribs, %A_ScriptFullPath%
IfInString, attribs, A
{
FileSetAttrib, -A, %A_ScriptFullPath%
SplashTextOn, 200, 200, ● ● ● ● ● ● ● ● ● ● ● ●,`n S C R I P T`n`n U P D A T E D `n`n ● ● ● ● ● ● ● ● ●
WinSet, AlwaysOnTop, Off, ● ● ● ● ● ● ● ● ● ● ● ●
SetTimer, Remove_Pop_Up_Window, 1111
SetTimer, Reload_This_Whole_File, 2222
}
Return
Remove_Pop_Up_Window:
SplashTextOff
SetTimer, Remove_Pop_Up_Window, Off
Return
Reload_This_Whole_File:
Reload
Return
That auto-update part I have been using for quite long now in my bulk AHK file that holds various alterations to my programs and it does not block those numerous other ones - hence do not understand how it can affect this one