Need a script for farming credits in Forza Horizon 5.
1. Press Spacebar
2. And press enter every 33 seconds
Thank you for your help, happy belated new year.
Script for farming credits [FH5]
Re: Script for farming credits [FH5]
Code: Select all
#Requires AutoHotkey v2.0
F3:: {
Static on:= False
SetTimer(() => Send('`n'), 33000 * on ^= True), (on) && Send(' `n')
SoundBeep 1000 + 500 * on
}
Re: Script for farming credits [FH5]
Sorry, can you fix it, I need the space to be pressedmikeyww wrote: ↑06 Jan 2024, 07:00Code: Select all
#Requires AutoHotkey v2.0 F3:: { Static on:= False SetTimer(() => Send('`n'), 33000 * on ^= True), (on) && Send(' `n') SoundBeep 1000 + 500 * on }
Re: Script for farming credits [FH5]
What happened when you ran the script in Notepad? No space? Or you need Space as the hotkey?
Re: Script for farming credits [FH5]
Repeatedly pressed and released, or just held?
Re: Script for farming credits [FH5]
Code: Select all
#Requires AutoHotkey v2.0
OnExit reset
F3:: {
Static on := False, sendEnter := SendEvent.Bind('`n')
SetKeyDelay 25, 25
If on ^= True {
SendEvent '{Space down}'
SetTimer(sendEnter, 33000), sendEnter()
SoundBeep 1500
} Else SetTimer(sendEnter, 0), reset()
}
reset(exitReason := '', exitCode := '') {
Send '{Space up}'
SoundBeep 1000
}
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
Hello,
what have to added if should work on one of 2 Monitors?
..Cause i have 1 Main Screen and 1 Side-Screen.
Now i run the game in window mode on 2nd screen. What have to be added, that it works?
e.g. every 10 minutes, until i stop it?
many thanks in advance.
ps.s i also got an regged display.fusion pro app, so i can swap between the montors, without that the game stop.
maybe there is an hotkey function also, which i currently cant find...to make AHK unnecceessary somehow...
cheers^^
what have to added if should work on one of 2 Monitors?
..Cause i have 1 Main Screen and 1 Side-Screen.
Now i run the game in window mode on 2nd screen. What have to be added, that it works?
e.g. every 10 minutes, until i stop it?
many thanks in advance.
ps.s i also got an regged display.fusion pro app, so i can swap between the montors, without that the game stop.
maybe there is an hotkey function also, which i currently cant find...to make AHK unnecceessary somehow...
cheers^^
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
..and i am quite not shure if this is related for to the v2 or v1 of AHK...feiercrack wrote: ↑22 Jul 2024, 12:12...snip
..Cause i have 1 Main Screen and 1 Side-Screen.
the monitor i use for the game is declared as monitor in windows
...snap
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
...oh btw, before i foget: i am using Forza Motorsport 2023
everything works fine with display.fusion on 2nd monitor, until game asks me, if i am still playing...or my gamepad disconnects...
everything works fine with display.fusion on 2nd monitor, until game asks me, if i am still playing...or my gamepad disconnects...
Re: Script for farming credits [FH5]
Send sends text to the active window. You can activate the window of your choice.
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
thanks for the fast replay.
but i am an totally n00b and have no idea on how to
send keyboard input "space" every ten minutes to my 2nd monitor, which is defined in windows to Monitor 1 (left side)
My main monitor is defined in windows as monitor 2, which is in my front.
i mean, how does AHK knows, which monitor i mean?
i tried the spy, and got those data of my 2nd monitor, w hich i like to use...
my u please help me to make an ahk file for that?
many thanks in advance
cheers^^
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
my "shot in the dark" with AHK V2 looks like this:
Code: Select all
#Requires AutoHotkey v2.0
OnExit reset
WinWait "forza.exe"
WinMove 5444, 936 ;
F3:: {
Static on := False, sendEnter := SendEvent.Bind('`n')
SetKeyDelay 25, 25
If on ^= True {
SendEvent '{Space down}'
SetTimer(sendEnter, 33000), sendEnter()
SoundBeep 1500
} Else SetTimer(sendEnter, 0), reset()
}
reset(exitReason := '', exitCode := '') {
Send '{Space up}'
SoundBeep 1000
}
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
...but that doesnt work
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
the data on the spy is wrong, because of the screenshot.
it should read:
Forza Motorsport
ahk_class App
ahk_exe forza_steamworks_release_final.exe
ahk_pid 32536
ahk_id 787970
Re: Script for farming credits [FH5]
Send does not send to a monitor. It sends to a window. WinActivate can be used to activate the window first. Some windows may also respond to ControlSend.
The mouse cursor's position makes no difference for these functions.
In your script, WinWait does not affect whether your hotkey can be triggered, but that can be achieved with a #HotIf directive.
The mouse cursor's position makes no difference for these functions.
In your script, WinWait does not affect whether your hotkey can be triggered, but that can be achieved with a #HotIf directive.
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
thanks for fast reply!mikeyww wrote: ↑22 Jul 2024, 16:16Send does not send to a monitor. It sends to a window. WinActivate can be used to activate the window first. Some windows may also respond to ControlSend.
The mouse cursor's position makes no difference for these functions.
In your script, WinWait does not affect whether your hotkey can be triggered, but that can be achieved with a #HotIf directive.
so i try now with this:
Spoiler
Re: Script for farming credits [FH5]
Fine if the script works. If it does not work, then indicate what it does when you run it, and what it should do instead.
-
- Posts: 10
- Joined: 22 Jul 2024, 12:04
- Contact:
Re: Script for farming credits [FH5]
well, i doesnt give me any errors,
but it wont send a "space" keyboard command to my 2nd screen windowed forza game...
dunno what to do, have searched and read alot, but understand only spain villages.. sry
Who is online
Users browsing this forum: No registered users and 19 guests