r/gtaglitches•
CRlME

[PSA][PC] You can "pull your ethernet cable" with a keystroke using a small AutoHotkey Script.

PSA

Note: I noticed that Firefox was reporting AutoHotkey as a virus/malware for me. It is not. However, AHK is a powerful scripting language, and you should be careful with any AHK scripts that you run on your machine. There is potential for an AHK script to be malicious. Treat AHK scripts like you would an .exe file and don't run them if you don't know what they do.

This is a long post, but everything below the horizontal rule is just extra information and answers to common questions.

I didn't see anyone talking about this or any previous posts on it, so I thought I'd share. It's not a glitch in itself, but an excellent QOL supplement to a lot of glitches. It eliminates the need for windowed mode, alt-tabbing, crawling under your desk, etc. to disable your network.

This works with Wifi connections, and you can use it for multiple connections at once if you have a wireless and ethernet connection.

#How it works An AutoHotkey (AHK) script is used to disable your Windows network adapter(s), cutting off your access to the internet. It's a software version of pulling out the network cable.

#Requirements:

  • AutoHotkey
  • Only tested on Windows 10 (should work on other versions)

#First Time Steps:

  1. Download AutoHotkey (AHK)
  2. Copy the AHK Script within the code box below into notepad or other text editor.
  3. Replace [NETWORK ADAPTER NAME] with the adapter name you want to toggle
  • See "Getting your Network Adapter's Name" below if you need help
  • Leave the quotes
  • Remove the brackets
  1. Save the text document as whatever you want, but give it the extension .ahk
  • You may need to make sure windows isn't hiding file extensions in order to change the extension
  1. Run the new .ahk script file as administrator.
  2. Press CTRL+F5 to turn off your network adapter.
  3. Press CTRL+F6 to turn the network adapter back on.

You can test this outside the game to make sure you have the adapter name correct before attempting it with any glitch.

#Susequent Usage Steps:

  1. Make sure the AHK Script is running as administrator.
  2. Press CTRL+F5 to turn off your network adapter.
  3. Press CTRL+F6 to turn the network adapter back on.

#AHK Script This script allows you to turn off your network adapter by pressing CTRL+F5 and turn it back on with CTRL+F6 (provided you alter it to include your adapter's name):

^f5::
run, *runas %comspec% /c netsh interface set interface name="[NETWORK ADAPTER NAME]" admin=disabled,,hide
return	

^f6::
run, *runas %comspec% /c netsh interface set interface name="[NETWORK ADAPTER NAME]" admin=enabled,,hide
return

#AutoHotkey Information:

https://www.autohotkey.com/

Here's a brief overview of what AHK is/does taken from their website:

Key BindsWhat is AutoHotkeyIs it good for me?Why AutoHotkey
Define hotkeys for the mouse and keyboard, remap keys or buttons and autocorrect-like replacements. Creating simple hotkeys has never been easier; you can do it in just a few lines or less!AutoHotkey is a free, open-source scripting language for Windows that allows users to easily create small to complex scripts for all kinds of tasks such as: form fillers, auto-clicking, macros, etc.AutoHotkey has easy to learn built-in commands for beginners. Experienced developers will love this full-fledged scripting language for fast prototyping and small projects.AutoHotkey gives you the freedom to automate any desktop task. It's small, fast and runs out-of-the-box. Best of all, it's free, open-source (GNU GPLv2), and beginner-friendly. Why not give it a try?

If you want to change the keys used to activate the script or more information about what else AHK can do, I suggest you look at the AHK documentation, and start with their tutorial: https://www.autohotkey.com/docs/Tutorial.htm

#Getting your Network Adapter's Name ####netsh Method You can run this command in a Command Prompt to see your network interfaces:

netsh interface ipv4 show config

You'll want what's in the quotes where it says 'Configuration for interface "[Name]"'

####Control Panel Method Open the Windows Control Panel and view Network Connections.

You're looking for the topmost label in dark black next to your internet connection.

Common Issues

####Constant "Alerts" never being kicked back to single player This typically occurs when you have additional network adapters, such as a VPN enabled, even if they aren't connected. The game will continually retry these until they're disabled.

Solution: Add an additional "run" line to both the enable and disable shortcut for the additional network adapter. Copy and paste the same line, and change the adapter name. Example of disable side:

^f5::
run, *runas %comspec% /c netsh interface set interface name="[Ethernet Name]" admin=disabled,,hide
run, *runas %comspec% /c netsh interface set interface name="[VPN/Wi-Fi Name]" admin=disabled,,hide
return	

####My Wi-Fi takes over, and the game reconnects.

Solution: Add an additional "run" line to both the enable and disable shortcut for the additional network adapter. (See above example)

Posted Apr 10, 2020, 9:39 AM UTC · edited

32841
Loading comments…