Python hotkey script for powershell lag switch

Posts 1–8 of 8 · Page 1 of 1
Python hotkey script for powershell lag switch
Code:
import pythoncom, pyHook, winsound, os, sys

def hooking(event):
	if event.Key == 'F1':
		print "Working..."
		os.system("lagg.bat")
		winsound.Beep(1000,200)
		print "ON"
		return True
	if event.Key == 'F2':
		print "Working..."
		os.system("lagg1.bat")
		winsound.Beep(1000,200)
		print "OFF"
		return True
	if  event.Key == 'Escape':
		sys.exit()
	return True
# return True to pass the event to other handlers

# create a hook manager
hm = pyHook.HookManager()
# watch for all mouse events
hm.KeyDown = hooking
# set the hook
hm.HookKeyboard()
# wait forever
pythoncom.PumpMessages()
Requirements: Python 2.7, pyHook package (pip install pyhook)
You have to put lagg.bat and lagg1.bat in the same directory with your script. (lagg.bat is on, lagg1.bat is off, find it in Syruz's post)
Press F1 and F2 to run the bat files.
Warning after this script become public Battle Eye will be awere of it too...

If you get banned don't come here complain.

You have been warned.
Quote Originally Posted by xekoxxx View Post
Code:
import pythoncom, pyHook, winsound, os, sys

def hooking(event):
	if event.Key == 'F1':
		print "Working..."
		os.system("lagg.bat")
		winsound.Beep(1000,200)
		print "ON"
		return True
	if event.Key == 'F2':
		print "Working..."
		os.system("lagg1.bat")
		winsound.Beep(1000,200)
		print "OFF"
		return True
	if  event.Key == 'Escape':
		sys.exit()
	return True
# return True to pass the event to other handlers

# create a hook manager
hm = pyHook.HookManager()
# watch for all mouse events
hm.KeyDown = hooking
# set the hook
hm.HookKeyboard()
# wait forever
pythoncom.PumpMessages()
Requirements: Python 2.7, pyHook package (pip install pyhook)
You have to put lagg.bat and lagg1.bat in the same directory with your script. (lagg.bat is on, lagg1.bat is off)
Press F1 and F2 to run the bat files.
the term "hook" scares me real bad lol... can someone confirm this is safe? You are actually running executable file which can be detected by BattleEye isnt it?

How different is this from Syruz's .bat method? Need more explanation por favor
Quote Originally Posted by breakzz View Post
the term "hook" scares me real bad lol... can someone confirm this is safe? You are actually running executable file which can be detected by BattleEye isnt it?

How different is this from Syruz's .bat method? Need more explanation por favor
You can run it in python without compiling it. This is Syruz's method, i just add the hotkey for those who need.
Anyway i've used this since Syruz's 1st LS method without being banned. So, yeah...
Quote Originally Posted by xekoxxx View Post
You can run it in python without compiling it. This is Syruz's method, i just add the hotkey for those who need.
Anyway i've used this since Syruz's 1st LS method without being banned. So, yeah...
I assume this has same crash/net freeze issue then right?

Thanks!
Quote Originally Posted by breakzz View Post
I assume this has same crash/net freeze issue then right?

Thanks!
Yes. I just help people with the hotkey stufffs. But if you are using Mexor's VPN method, the script will also work!
Quote Originally Posted by xekoxxx View Post
Yes. I just help people with the hotkey stufffs. But if you are using Mexor's VPN method, the script will also work!
Thanks!
Quote Originally Posted by xekoxxx View Post
You can run it in python without compiling it. This is Syruz's method, i just add the hotkey for those who need.
Anyway i've used this since Syruz's 1st LS method without being banned. So, yeah...
Not the method of the lag switch.
i mean the code to call the .bat could be added to BE backlisted if they want to.

Even more so that he is now public.
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us