hybrid mouse control and auto priority

Post your working scripts, libraries and tools
Hardimpact

hybrid mouse control and auto priority

31 Dec 2015, 13:13

change priority of software object if it is in focus. makes multasking super fast on slow computers! focus=high priority, losing focus=low priority. also let's you know via tooltip when your processor is maxed out so you don't click widely and freeze your computer.

Code: Select all

#SingleInstance force 
;#InstallKeybdHook 
;#InstallMouseHook 
;#NoEnv 

#Persistent
;#NoTrayIcon                ; Save space w/o icon/menu

av:=0
av2:=0

SetBatchLines, -1
VarSetCapacity( IdleTicks, 2*4 )

SetTimer, UpdateCPU, 500
SetTimer, UpdateToolTip, 500

UpdateToolTip:

IfWinNotActive,%szProcessName%
{
if (szProcessName != "explorer.exe") 
Process, priority, %szProcessName%, Low

}






  ; Get the process name of the active window (i.e. Notepad.exe) 
  WinGet, szProcessName, ProcessName, A
  if (szProcessName != "explorer.exe") 
	{	 
  	Process, priority, %szProcessName%, High
	}







        av=%load%        
        av2+=%av%
        av2/=2
	if (av2 > 97)
        {        
        ToolTip X  ;%av2%    ;%load%`%
        ;SetTimer, UpdateToolTip, on
        }
        else
        {
        ToolTip
        ;SetTimer, UpdateToolTip, off
        }     
        
return

UpdateCPU:
 	IdleTime0 = %IdleTime%
	Tick0 = %Tick%

	DllCall("kernel32.dll\GetSystemTimes", "uint",&IdleTicks, "uint",0, "uint",0)
	IdleTime := *(&IdleTicks)

	Loop 7
		IdleTime += *( &IdleTicks + A_Index ) << ( 8 * A_Index )

	Tick := A_TickCount
	load := (200 - 0.01*(IdleTime - IdleTime0)/(Tick - Tick0))/2

	SetFormat, Float, 0.0
	load +=0

        
return







hybrid mouse
will be pixel accurate moving slow, but the faster you move, the farther your cursor travels. amazing for 1st person shooters or people who want min effort to control mice with super accuracy.

Code: Select all

;copyright 2016
 
 
; <COMPILER: v1.0.48.5>
Critical
CoordMode, Mouse, Screen
#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
#NoEnv
SendMode, Input
#Persistent
 
 
SetTimer, WatchCursor, 30
return
 
WatchCursor:
MouseGetPos, , , id, control
 
xlast = %xpos%
ylast = %ypos%
 
 
MouseGetPos, xpos, ypos
 
 
xmove := xpos-xlast
ymove := ypos-ylast
 
X := xmove
Y := ymove
 
X /= 3.5
Y /= 3.5
 
if (xmove!=0&&ymove!=0)
{
 
MouseEvent(X,Y)
}
return
 
~$Pause::
Pause
return
 
MouseEvent(a_xpos, a_ypos)
{
   DllCall("mouse_event", uint,1, int,a_xpos, int,a_ypos, uint,0, int,0 )
}
 
 
 
CPLNet
Posts: 53
Joined: 06 Dec 2016, 11:24

Re: hybrid mouse control and auto priority

09 Jan 2019, 03:11

i did same thing but only with regedit (registry) for legit where ahk is banned (faceit, esea...)

this is link

https://www.dropbox.com/s/pk1e5u6e4jxv0 ... s.rar?dl=0

join me Discord ? #mTb1680

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Google [Bot] and 53 guests