So I have a shortcut for a script on my desktop that can also be activated by a keybind (ctrl+shift+1).
The script is a python autoclicker that utilizes threading & pyautogui.
This keybind works if I'm doing something in firefox for example, but for whatever reason when I try to use the same keybind in Gmod, it doesn't run at all.
I have tried other keybinds for it like ctrl+alt+1 and that didn't work either. I also wanted to add that I don't think its anything with the game trying to block the script from running, cause if I run the same script manually and then alt tab to Gmod it works just fine.
Edit: in case it helps this is the script
from threading import Thread
import time
import pyautogui
#defines a bunch of 'blocks' that click 10 times
def opauto101():
for i in range(10):
pyautogui.click()
def opauto102():
for i in range(10):
pyautogui.click()
def opauto103():
for i in range(10):
pyautogui.click()
def opauto104():
for i in range(10):
pyautogui.click()
def opauto105():
for i in range(10):
pyautogui.click()
def opauto106():
for i in range(10):
pyautogui.click()
def opauto107():
for i in range(10):
pyautogui.click()
def opauto108():
for i in range(10):
pyautogui.click()
def opauto109():
for i in range(10):
pyautogui.click()
def opauto110():
for i in range(10):
pyautogui.click()
def opauto111():
for i in range(10):
pyautogui.click()
def opauto112():
for i in range(10):
pyautogui.click()
def opauto113():
for i in range(10):
pyautogui.click()
def opauto114():
for i in range(10):
pyautogui.click()
def opauto115():
for i in range(10):
pyautogui.click()
def opauto116():
for i in range(10):
pyautogui.click()
def opauto117():
for i in range(10):
pyautogui.click()
def opauto118():
for i in range(10):
pyautogui.click()
def opauto119():
for i in range(10):
pyautogui.click()
def opauto120():
for i in range(10):
pyautogui.click()
#-------------------------------------------
#this was originally based on a prompt to click 10, 100, 1000 etc times so i just changed it to if 1 = 1
true = 1
if true == 1:
#this calls the 'blocks' defined earlier through multithreading
Thread(target = opauto101).start()
Thread(target = opauto102).start()
Thread(target = opauto103).start()
Thread(target = opauto104).start()
Thread(target = opauto105).start()
Thread(target = opauto106).start()
Thread(target = opauto107).start()
Thread(target = opauto108).start()
Thread(target = opauto109).start()
Thread(target = opauto110).start()
Thread(target = opauto111).start()
Thread(target = opauto112).start()
Thread(target = opauto113).start()
Thread(target = opauto114).start()
Thread(target = opauto115).start()
Thread(target = opauto116).start()
Thread(target = opauto117).start()
Thread(target = opauto118).start()
Thread(target = opauto119).start()
Thread(target = opauto120).start()