Found A Script On Reddit...

Get help with using AutoHotkey and its commands and hotkeys
GTAGlitcher
Posts: 2
Joined: 16 Jun 2020, 15:12

Found A Script On Reddit...

16 Jun 2020, 15:23

So, I found a script that could turn off your connection to the wifi and also turn it back on (https://www.reddit.com/r/gtaglitches/comments/fycrzs/psapc_you_can_pull_your_ethernet_cable_with_a/?sort=new). I copied and pasted it as told and ran it as an admin, but nothing happens when I press the key binds which are set to make it's purpose (CTRL+F5/CTRL+F6)

Here's the code:

Code: Select all

^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
User avatar
Chunjee
Posts: 787
Joined: 18 Apr 2014, 19:05
GitHub: Chunjee

Re: Found A GTA Script On Reddit...

16 Jun 2020, 15:26

put a msgbox in there to make sure it is triggering.
User avatar
Chunjee
Posts: 787
Joined: 18 Apr 2014, 19:05
GitHub: Chunjee

Re: Found A GTA Script On Reddit...

16 Jun 2020, 15:27

You probably need your network adapter name where it says to insert it.
GTAGlitcher
Posts: 2
Joined: 16 Jun 2020, 15:12

Re: Found A Script On Reddit...

24 Jun 2020, 11:57

Chunjee wrote:put a msgbox in there to make sure it is triggering.
How do I do that? I'm pretty new to this and I'm not even much of a coder myself.
User avatar
Chunjee
Posts: 787
Joined: 18 Apr 2014, 19:05
GitHub: Chunjee

Re: Found A Script On Reddit...

24 Jun 2020, 13:41

replace "NETWORK ADAPTER NAME" with the name of your network adapter maybe.
jamk
Posts: 3
Joined: 24 Jun 2020, 16:39

Re: Found A Script On Reddit...

24 Jun 2020, 16:51

make sure [NETWORK ADAPTER NAME] is actually your network adapter name (quotes, but no brackets),

if you are not sure of your network adapter name, from a command prompt type:

Code: Select all

netsh interface show interface
and a list of your adapters will show, you should be able to determine which one is your wifi.
RickC
Posts: 253
Joined: 27 Oct 2013, 08:32

Re: Found A Script On Reddit...

02 Jul 2020, 17:29

As @jamk said.

Image

I haven't tried the script you found but note that if your chosen network interface name contains one or more spaces then the string needs to be enclosed in quotes.

So, in the example screenshot example you would use: run, *runas %comspec% /c netsh interface set interface name=WiFi admin=disabled,,hide.

However, if - for example - the network interface name was Wireless Network Connection you would have to use: run, *runas %comspec% /c netsh interface set interface name="Wireless Network Connection" admin=disabled,,hide.

Hope this helps...

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], malcev, WatsonEnterprises and 37 guests