Create a per-game script
3 posters
Page 1 of 1
Create a per-game script
Is it possible to creat a "per-game" script.
For instance I would like to have an invisble script running that waits for thirty seconds and then activates a certain window?
I (and Chat-GPT) can make the script myself, but is there any way to execute a script with a specific game?
Thanks
For instance I would like to have an invisble script running that waits for thirty seconds and then activates a certain window?
I (and Chat-GPT) can make the script myself, but is there any way to execute a script with a specific game?
Thanks
melin- Messages : 35
Date d'inscription : 2024-07-27
Re: Create a per-game script
Hello
You should make a search on "script" or "event" on this forum to find some examples.
Or in the pixelcade topic, which use it also
You should make a search on "script" or "event" on this forum to find some examples.
Or in the pixelcade topic, which use it also
getupor- Admin
- Messages : 1388
Date d'inscription : 2020-10-04
Re: Create a per-game script
getupor wrote:Hello
You should make a search on "script" or "event" on this forum to find some examples.
Or in the pixelcade topic, which use it also
Thanks, but I have already tried that. I can find a lot of people writing about their specific problems, but not touching my general issues.
I want to run a script when I run the PC game Forza Horizon 5?
Where do I place the script? What formats does it take? How should the script be named etc.
I haven't found the answers to these questions, neither in the documentation or in the different threats.
I need an answer like:
"If your windows game's shortcut is called "xxx", then you should place your script xxx.yyy (valid formats are aaa, bbb and ccc) in the folder zzz and everything will be great".
melin- Messages : 35
Date d'inscription : 2024-07-27
getupor- Admin
- Messages : 1388
Date d'inscription : 2020-10-04
Re: Create a per-game script
I want my script to wait and the focus on the windows I decided it should focus on (or maybe do alt+tab).
My issue is that some games are not in focus when I start them. For instance Forza Horizon 5 - rumble does not work until I alt+tab to get the window in focus (even though no other windows exists and the joypad works, apart from the rumle). Other games don't play music until I alt+tab.
And no, I can't just alt+tab. The idea is to be able to operate the machine with joypad only.
My issue is that some games are not in focus when I start them. For instance Forza Horizon 5 - rumble does not work until I alt+tab to get the window in focus (even though no other windows exists and the joypad works, apart from the rumle). Other games don't play music until I alt+tab.
And no, I can't just alt+tab. The idea is to be able to operate the machine with joypad only.
melin- Messages : 35
Date d'inscription : 2024-07-27
Re: Create a per-game script
melin wrote:Is it possible to creat a "per-game" script.
For instance I would like to have an invisble script running that waits for thirty seconds and then activates a certain window?
I (and Chat-GPT) can make the script myself, but is there any way to execute a script with a specific game?
Thanks
There are already topics on scripts.
The folders RetroBat\emulationstation\.emulationstation\scripts\game-start or game-end and
If not, you can hijack my script pack and clean it of what you don't need to add the systems and games you want to run autohotkeys that can launch keyboard commands or others
https://archive.org/details/retrobat-script-demulshooter-packes-custom-nixx.-7z
Aynshe- Messages : 432
Date d'inscription : 2022-03-18
getupor likes this post
Re: Create a per-game script
Aynshe wrote:melin wrote:Is it possible to creat a "per-game" script.
For instance I would like to have an invisble script running that waits for thirty seconds and then activates a certain window?
I (and Chat-GPT) can make the script myself, but is there any way to execute a script with a specific game?
Thanks
There are already topics on scripts.
The folders RetroBat\emulationstation\.emulationstation\scripts\game-start or game-end and
If not, you can hijack my script pack and clean it of what you don't need to add the systems and games you want to run autohotkeys that can launch keyboard commands or others
https://archive.org/details/retrobat-script-demulshooter-packes-custom-nixx.-7z
Thank you for this. I am not sure it is helping me with what I need. The script I can do myself, but how to ensure that the scripts are picked up is what I don't get. For instance: In the game-start you have a batch script that does stuff. How is it picked up? Is it picked up with the launch of every game? I need something that is picked up when launching a particular game. For the time being, never mind the contents of the script - Chat-GPT will solve that problem for me, but how are these scripts being picked up? I don't get it. Please help me with understanding this.
melin- Messages : 35
Date d'inscription : 2024-07-27
Re: Create a per-game script
melin wrote:Aynshe wrote:melin wrote:Is it possible to creat a "per-game" script.
For instance I would like to have an invisble script running that waits for thirty seconds and then activates a certain window?
I (and Chat-GPT) can make the script myself, but is there any way to execute a script with a specific game?
Thanks
There are already topics on scripts.
The folders RetroBat\emulationstation\.emulationstation\scripts\game-start or game-end and
If not, you can hijack my script pack and clean it of what you don't need to add the systems and games you want to run autohotkeys that can launch keyboard commands or others
https://archive.org/details/retrobat-script-demulshooter-packes-custom-nixx.-7z
Thank you for this. I am not sure it is helping me with what I need. The script I can do myself, but how to ensure that the scripts are picked up is what I don't get. For instance: In the game-start you have a batch script that does stuff. How is it picked up? Is it picked up with the launch of every game? I need something that is picked up when launching a particular game. For the time being, never mind the contents of the script - Chat-GPT will solve that problem for me, but how are these scripts being picked up? I don't get it. Please help me with understanding this.
My program does what you ask. *It allows to detect the execution of the name of a game for a system and whose name is indicated in the list then to execute a dedicated code that you write in addition in autohotkey.
I do not know of a tutorial, so you have to do some research if you want to have the basis of the operation. Otherwise if you dissect my code whose source is available on GitHub you will understand.
Aynshe- Messages : 432
Date d'inscription : 2022-03-18
Re: Create a per-game script
here is a focus test, here I do the opposite for the test...I focus emulationstation after launching the game given that the game is in the foreground. The test code waits 5 seconds before focusing.
- Code:
#NoEnv
#SingleInstance force
SendMode Input
SetWorkingDir %A_ScriptDir%
partialWindowTitle := "EmulationStation"
processName := "maldita_castilla_arcade_cabinet.exe"
Sleep, 5000
WinActivate, %partialWindowTitle%
Sleep, 100
WinSet, Top,, %partialWindowTitle%
Loop
{
Process, Exist, %processName%
if (ErrorLevel = 0)
{
ExitApp
}
Sleep, 1000
}
ExitApp
Aynshe- Messages : 432
Date d'inscription : 2022-03-18
Re: Create a per-game script
Thank you for providing me the info. It was REALLY difficult to see what was going on with the really small fonts, low res and my 48-year old eyes LOL. Furthermore the tool could also use a little bit of a usability touch-up, but nevertheless with the help of the tool and Chat-GPT I have apparently created a Forza Horizon 5_ahk.exe which is my "script". How do I get it to execute with the game?
melin- Messages : 35
Date d'inscription : 2024-07-27
Re: Create a per-game script
melin wrote:Thank you for providing me the info. It was REALLY difficult to see what was going on with the really small fonts, low res and my 48-year old eyes LOL. Furthermore the tool could also use a little bit of a usability touch-up, but nevertheless with the help of the tool and Chat-GPT I have apparently created a Forza Horizon 5_ahk.exe which is my "script". How do I get it to execute with the game?
indeed, the encoding of the site is excessive....
Important, you have to place the arg.bat file in RetroBat\emulationstation\.emulationstation\scripts\game-start\
Here is another link in YT :
The interface Edit_LsTRoms.exe is basic, I did it as best I could. I'm not a developer, and I didn't want to make another version of it.
The main code is in ScriptPush.exe
Aynshe- Messages : 432
Date d'inscription : 2022-03-18
getupor likes this post
Re: Create a per-game script
Aynshe wrote:melin wrote:Thank you for providing me the info. It was REALLY difficult to see what was going on with the really small fonts, low res and my 48-year old eyes LOL. Furthermore the tool could also use a little bit of a usability touch-up, but nevertheless with the help of the tool and Chat-GPT I have apparently created a Forza Horizon 5_ahk.exe which is my "script". How do I get it to execute with the game?
indeed, the encoding of the site is excessive....
Important, you have to place the arg.bat file in RetroBat\emulationstation\.emulationstation\scripts\game-start\
Here is another link in YT :
The interface Edit_LsTRoms.exe is basic, I did it as best I could. I'm not a developer, and I didn't want to make another version of it.
The main code is in ScriptPush.exe
I am thankful for the tool. I guess you get used to it. I will probably never get used to it starting off screen, but nevertheless. I probably need to look into everything again. I don't get bat-files but exefiles. Too late for more today. Have to get up early in the morning. I will probably get it at some point. Thanks for all the help.
melin- Messages : 35
Date d'inscription : 2024-07-27
Re: Create a per-game script
melin wrote:Aynshe wrote:melin wrote:Thank you for providing me the info. It was REALLY difficult to see what was going on with the really small fonts, low res and my 48-year old eyes LOL. Furthermore the tool could also use a little bit of a usability touch-up, but nevertheless with the help of the tool and Chat-GPT I have apparently created a Forza Horizon 5_ahk.exe which is my "script". How do I get it to execute with the game?
indeed, the encoding of the site is excessive....
Important, you have to place the arg.bat file in RetroBat\emulationstation\.emulationstation\scripts\game-start\
Here is another link in YT :
The interface Edit_LsTRoms.exe is basic, I did it as best I could. I'm not a developer, and I didn't want to make another version of it.
The main code is in ScriptPush.exe
I am thankful for the tool. I guess you get used to it. I will probably never get used to it starting off screen, but nevertheless. I probably need to look into everything again. I don't get bat-files but exefiles. Too late for more today. Have to get up early in the morning. I will probably get it at some point. Thanks for all the help.
everything is in the archive "RETROBAT_script_demulshooterPack+es-custom_Nixx.7z", the archive paths are the paths where the files go in retrobat.
Aynshe- Messages : 432
Date d'inscription : 2022-03-18
Similar topics
» ES game-start script question
» [5.1.1] Bug pour script "game-start"
» Running a script before a specific game starts
» [RESOLVED] 3ds game doesn't start, only Citra game list. NDS Desmume no full screen.
» background music not turning off when launching steam game from retrobat (ea sports pga tour golf game)
» [5.1.1] Bug pour script "game-start"
» Running a script before a specific game starts
» [RESOLVED] 3ds game doesn't start, only Citra game list. NDS Desmume no full screen.
» background music not turning off when launching steam game from retrobat (ea sports pga tour golf game)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum