Fallout 4 Toggle ADS Topic is solved

Ask gaming related questions
Frustrated

Fallout 4 Toggle ADS  Topic is solved

01 Jun 2016, 10:03

I am trying to create an ahk file to work with fallout 4.
There is another file created by kiloanoyo (Link : http://www.nexusmods.com/fallout4/mods/4011). but, it doesn't work and has issues.

Code: Select all

#IfWinActive Fallout4
ScrollLock::Suspend,
SendMode Input
RButton::
    toggle := !toggle
    if (toggle) {
		SendInput {RButton Down}
    } else {
		SendInput {RButton Up}
    }
return
#IfWinActive
What i want to heppen
In a window titled "Fallout4" I want the following to happen.
Click RMB >> Hold down RMB
Click RMB >> Release RMB

Problems with previously shown code :-
1-
Click RMB >> Click RMB
Click RMB >> Nothing
Click RMB >> Click RMB
Click RMB >> Nothing
...
2-
When Alt+tabbing outside the window titled "Fallout4", the mouse disappears.


Basically what i am trying to do is to make Fallout 4 have a toggle aim down sight when pressing RMB
Guest

Re: Fallout 4 Toggle ADS

02 Jun 2016, 09:56

Can someone at least direct me to the parts of the tutorial that i need to know in order to be able to create/tweak/fix the problem with the current code?
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: Fallout 4 Toggle ADS

03 Jun 2016, 11:13

Try this instead (untested)...

Code: Select all

#MaxThreadsPerHotkey 2
SendMode Input
#IfWinActive Fallout4
ScrollLock::Suspend,
RButton::
	toggle := !toggle
	if (toggle)
	{
		SendInput {RButton Down}
		While Toggle AND WinActive("Fallout4")
			Sleep 10
	}
	SendInput {RButton Up}
return
#IfWinActive
Frustrated

Re: Fallout 4 Toggle ADS

03 Jun 2016, 13:09

Shadowpheonix wrote:Try this instead (untested)...

Code: Select all

#MaxThreadsPerHotkey 2
SendMode Input
#IfWinActive Fallout4
ScrollLock::Suspend,
RButton::
	toggle := !toggle
	if (toggle)
	{
		SendInput {RButton Down}
		While Toggle AND WinActive("Fallout4")
			Sleep 10
	}
	SendInput {RButton Up}
return
#IfWinActive
Sadly, the result is the same.
Frustrated

Re: Fallout 4 Toggle ADS

04 Jun 2016, 10:10

This one works
Source : http://steamcommunity.com/app/377160/di ... 6385126542 by StaffRecordPlayer
Thanks!

I modified an existing Autohotkey script slightly, so it will only work if the Fallout4 window is active (and not in your browser etc). Just copy this into an empty .txt file, rename it to .ahk and load it with Autohotkey:

Code: Select all

SetTitleMatchMode, 2
#SingleInstance Force
#IfWinActive, Fallout4

*RButton Up::
If (Toggle := !Toggle){
	Send {Click Down Right}
}
Else{
	Send {RButton up}
}
Return
#IfWinActive 
CrippledBegger

Re: Fallout 4 Toggle ADS

25 Jun 2016, 20:01

Hey, can anyone make this script using right trigger of an xinput controller instead of rbutton mouse? Thank you.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 63 guests