Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Would this autohotkey script work with any frontend?  (Read 10778 times)

0 Members and 1 Guest are viewing this topic.

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Would this autohotkey script work with any frontend?
« on: June 18, 2010, 02:01:34 am »
I was checking the hyperspin .ahk realizing that it might help me get atomiswave games on maximus arcade.  Is anyone any good with this? And, do you know if this script bellow only works with hyperspin?

;Sega Naomi Demul 0.5.5
;Atomiswave
;Required - Settings.ini: http://www.hyperspin-fe.com/forum/sh...5&postcount=54

else if (executable = "demul.exe")
{

Blockinput on
SetDefaultMouseSpeed, 0
MouseGetPos X, Y
MouseMove %A_ScreenWidth%,-%A_ScreenHeight%
Gui +AlwaysOnTop -Caption +ToolWindow
Gui, color, 0
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%, HSHIDE
IniRead, num_down, %emupath%settings.ini, %RomName%, Down_Count, 0
IniRead, system, %emupath%settings.ini, %RomName%, System, Atomiswave
Run, "%emupath%%executable%", Hide UseErrorLevel
winactivate %executable%
sleep, 1000 ; wait a moment for emulator to load
send, {AltDown}{AltUP}
send, {down}
sleep, 500
if (system = "Atomiswave")
{
send, {Down}
send, {Down}
send, {ENTER}
send, {DOWN %num_down%} ; send down keystroke to select rom
send, {ALTDOWN}{ENTER}{ALTUP}
send, {ENTER}
sleep, 10000 ; sleep for 10 seconds before pressing f8 key
send, {F8} ; Go full Screen
sleep, 1000
Gui Destroy
SetDefaultMouseSpeed, 2
Blockinput off
}
if (system = "Atomiswave Load Decrypted")
{
send, {Down}
send, {Down}
send, {ENTER}
send, {DOWN %num_down%} ; send down keystroke to select rom
send, {ALTDOWN}{ENTER}{ALTUP}
send, {ENTER}
sleep, 10000 ; sleep for 10 seconds before pressing f8 key
send, {F8} ; Go full Screen
sleep, 1000
Gui Destroy
Blockinput off
}

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Would this autohotkey script work with any frontend?
« Reply #1 on: June 18, 2010, 05:51:22 pm »
Propenty change this into a wrapper for the emulators should works on all frontends and designed to use with demul, so it only checking with example which kind of game that is. This is due you can compile a ahk script to a exe which is the prefer way to start a wrapper from a frontend.


Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Would this autohotkey script work with any frontend?
« Reply #2 on: June 18, 2010, 08:23:50 pm »
Hmm.. it didn't work, maybe it's looking for a specific message from the frontend?

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #3 on: June 19, 2010, 05:30:48 pm »
The script above is for HyperSpin only, but I modified it to work as a stand-alone (wrapper) for Demul.exe v55 only.
You need (2) of the (3) items below,
1-script to compile as "AtomisWave.exe"
2-settings.ini - "required"
3-batch file - (optional) for testing independant of all FE's
(all need to be placed in the "DEMUL.exe" folder.)


This script (once compiled) supports the commandline structure like Mame,

Atomiswave.exe "romname"

Once compiled run it from Maximus as the executable (wrapper) for Demul or test it with the batch file below first.
(I dont know the Maximus Arcade setup procedures, but the batch file at the bottom should hopefully act as a psuedo MA if it follows the commandline parameters above like Mame's)

[Atomiswave.ahk]- compiles to Atomiswave.exe
Code: [Select]
; AutoHotkey Version: 1.x
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey  releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and  reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#Singleinstance force
SetTitleMatchMode, 1
romname=%1%
param := romname
Blockinput on
SetDefaultMouseSpeed, 0
MouseGetPos X, Y
MouseMove %A_ScreenWidth%,-%A_ScreenHeight%
Gui +AlwaysOnTop -Caption +ToolWindow
Gui, color, 0
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%, HSHIDE

IniRead, num_down, %A_ScriptDir%\settings.ini, %RomName%, Down_Count, 0
IniRead, system, %A_ScriptDir%\settings.ini, %RomName%, System,
IniRead, Screen_Timeout, %emupath%settings.ini, %Romname%, Screen_Timeout
IniRead, LoadDecrypted, %emupath%settings.ini, %Romname%, LoadDecrypted

Run, "%A_ScriptDir%\demul.exe", Hide UseErrorLevel
winactivate, demul.exe
sleep, 1000 ; wait a moment for emulator to load
send, {AltDown}{AltUP}{ENTER}
sleep, 500
if (system = "Atomiswave"  && LoadDecrypted = "false")
{
send, {Down 2}
send, {ENTER}
send, {DOWN %num_down%} ; send down keystroke to select rom
send, {ALTDOWN}{ENTER}{ALTUP}
send, {ENTER}
sleep, %Screen_Timeout%
send, {F8} ; Go full Screen
sleep, 1000
Gui Destroy
SetDefaultMouseSpeed, 2
Blockinput off
winactivate, DEMUL
exitapp
}
else if (system = "Atomiswave" && LoadDecrypted = "true")
{
send, {Down 2}
send, {ENTER}
send, {shiftdown}{Tab}{Shiftup}
send, {Enter}
sleep, 2000
clipboard=
clipboard=%A_ScriptDir%\%romName%
ClipWait
Sleep,100
Send,^v
Sleep,100
send, {ENTER}
sleep, %Screen_Timeout%
send, {F8} ; Go full Screen
sleep, 1000
Gui Destroy
Blockinput off
winwaitactive, DEMUL
exitapp
}

These settings are required and need to be placed in your Demul folder.
(note #1)-(Its OK to overwrite the previous settings.ini if you had it when using Demul in HyperSpin for Naomi or Atomiswave.)
(note #2)-(The Load_Decrypted portion of the script and settings are for future releases of Demul and not used for Atomiswave at this time)
(note #3)-There are some new features to the settings and script which are outlined in the settings.ini.

save as,
[Settings.ini]
Code: [Select]
# System specifies whether the game is found in the Naomi, Atomiswave or Hikaru lists
#Down_Count is the number of down arrow presses required to select a given  rom. 3 is the first rom in each of the systems list.
#Screen_Timeout is the amount of time for the black "splash" screen to remain visible. 8000=8secs
#LoadDecrypted true\false tells the script to run a decrypted rom ".bin" or a regular ".zip" (supports the Demul55 ability to run decrypted roms)

[demofist]
system = Atomiswave
Down_Count = 3
Screen_Timeout= 8000
LoadDecrypted= false

[dolphin]
system = Atomiswave
Down_Count = 4
Screen_Timeout= 8000
LoadDecrypted= false

[fotns]
system = Atomiswave
Down_Count = 5
Screen_Timeout= 8000
LoadDecrypted= false

[ggisuka]
system = Atomiswave
Down_Count = 6
Screen_Timeout= 8000
LoadDecrypted= false

[kofnw]
system = Atomiswave
Down_Count = 7
Screen_Timeout= 8000
LoadDecrypted= false

[kov7sprt]
system = Atomiswave
Down_Count = 8
Screen_Timeout= 8000
LoadDecrypted= false

[salmankt]
system = Atomiswave
Down_Count = 9
Screen_Timeout= 8000
LoadDecrypted= false

[sprtshot]
system = Atomiswave
Down_Count = 10
Screen_Timeout= 8000
LoadDecrypted= false

[rangrmsn]
system = Atomiswave
Down_Count = 11
Screen_Timeout= 8000
LoadDecrypted= false

[rumblef]
system = Atomiswave
Down_Count = 12
Screen_Timeout= 8000
LoadDecrypted= false

[xtrmhnt]
system = Atomiswave
Down_Count = 13
Screen_Timeout= 8000
LoadDecrypted= false

[xtrmhnt2]
system = Atomiswave
Down_Count = 14
Screen_Timeout= 8000
LoadDecrypted= false

[vfurlong]
system = Atomiswave
Down_Count = 15
Screen_Timeout= 8000
LoadDecrypted= false



[capsnk]
system = Naomi
Down_Count = 3
Screen_Timeout= 8000
LoadDecrypted= false

[capsnka]
system = Naomi
Down_Count = 4
Screen_Timeout= 8000
LoadDecrypted= false

[csmash]
system = Naomi
Down_Count = 5
Screen_Timeout= 8000
LoadDecrypted= false

[csmasho]
system = Naomi
Down_Count = 6
Screen_Timeout= 8000
LoadDecrypted= false

[cspike]
system = Naomi
Down_Count = 7
Screen_Timeout= 8000
LoadDecrypted= false

[deathcox]
system = Naomi
Down_Count = 8
Screen_Timeout= 8000
LoadDecrypted= false

[derbyoc]
system = Naomi
Down_Count = 9
Screen_Timeout= 8000
LoadDecrypted= false

[derbyoc2]
system = Naomi
Down_Count = 10
Screen_Timeout= 8000
LoadDecrypted= false

[doa2]
system = Naomi
Down_Count = 11
Screen_Timeout= 8000
LoadDecrypted= false

[doa2m]
system = Naomi
Down_Count = 12
Screen_Timeout= 8000
LoadDecrypted= false

[dybb99]
system = Naomi
Down_Count = 13
Screen_Timeout= 8000
LoadDecrypted= false

[dybbnao]
system = Naomi
Down_Count = 14
Screen_Timeout= 8000
LoadDecrypted= false

[f355]
system = Naomi
Down_Count = 15
Screen_Timeout= 8000
LoadDecrypted= false

[ggram2]
system = Naomi
Down_Count = 16
Screen_Timeout= 8000
LoadDecrypted= false

[ggx]
system = Naomi
Down_Count = 17
Screen_Timeout= 8000
LoadDecrypted= false

[gram2000]
system = Naomi
Down_Count = 18
Screen_Timeout= 8000
LoadDecrypted= false

[gunsur2]
system = Naomi
Down_Count = 19
Screen_Timeout= 8000
LoadDecrypted= false

[gwing2]
system = Naomi
Down_Count = 20
Screen_Timeout= 8000
LoadDecrypted= false

[hmgeo]
system = Naomi
Down_Count = 21
Screen_Timeout= 8000
LoadDecrypted= false

[hotd2]
system = Naomi
Down_Count = 22
Screen_Timeout= 8000
LoadDecrypted= false

[mvsc2]
system = Naomi
Down_Count = 6
Screen_Timeout= 8000
LoadDecrypted= false

[otrigger]
system = Naomi
Down_Count = 24
Screen_Timeout= 8000
LoadDecrypted= false

[pjustice]
system = Naomi
Down_Count = 25
Screen_Timeout= 8000
LoadDecrypted= false

[pstone]
system = Naomi
Down_Count = 26
Screen_Timeout= 8000
LoadDecrypted= false

[pstone2]
system = Naomi
Down_Count = 27
Screen_Timeout= 8000
LoadDecrypted= false

[qmegamis]
system = Naomi
Down_Count = 28
Screen_Timeout= 8000
LoadDecrypted= false

[samba]
system = Naomi
Down_Count = 29
Screen_Timeout= 8000
LoadDecrypted= false

[shangril]
system = Naomi
Down_Count = 30
Screen_Timeout= 8000
LoadDecrypted= false

[shootpl]
system = Naomi
Down_Count = 31
Screen_Timeout= 8000
LoadDecrypted= false

[slasho]
system = Naomi
Down_Count = 32
Screen_Timeout= 8000
LoadDecrypted= false

[smarinef]
system = Naomi
Down_Count = 33
Screen_Timeout= 8000
LoadDecrypted= false

[smlg99]
system = Naomi
Down_Count = 34
Screen_Timeout= 8000
LoadDecrypted= false

[spawn]
system = Naomi
Down_Count = 35
Screen_Timeout= 8000
LoadDecrypted= false

[suchie3]
system = Naomi
Down_Count = 36
Screen_Timeout= 8000
LoadDecrypted= false

[totd]
system = Naomi
Down_Count = 37
Screen_Timeout= 8000
LoadDecrypted= false

[toyfight]
system = Naomi
Down_Count = 38
Screen_Timeout= 8000
LoadDecrypted= false

[virnba]
system = Naomi
Down_Count = 39
Screen_Timeout= 8000
LoadDecrypted= false

[virnbao]
system = Naomi
Down_Count = 40
Screen_Timeout= 8000
LoadDecrypted= false

[vs2_k]
system = Naomi
Down_Count = 41
Screen_Timeout= 8000
LoadDecrypted= false

[vtennis]
system = Naomi
Down_Count = 42
Screen_Timeout= 8000
LoadDecrypted= false

[wwfroyal]
system = Naomi
Down_Count = 43
Screen_Timeout= 8000
LoadDecrypted= false

[zombrvn]
system = Naomi
Down_Count = 44
Screen_Timeout= 8000
LoadDecrypted= false

[bdrdown]
system = Naomi
Down_Count = 45
Screen_Timeout= 8000
LoadDecrypted= false

[cfield]
system = Naomi
Down_Count = 46
Screen_Timeout= 8000
LoadDecrypted= false

[chocomk]
system = Naomi
Down_Count = 47
Screen_Timeout= 8000
LoadDecrypted= false

[confmiss]
system = Naomi
Down_Count = 48
Screen_Timeout= 8000
LoadDecrypted= false

[cvs2gd]
system = Naomi
Down_Count = 49
Screen_Timeout= 8000
LoadDecrypted= false

[cvsgd]
system = Naomi
Down_Count = 50
Screen_Timeout= 8000
LoadDecrypted= false

[dygolf]
system = Naomi
Down_Count = 51
Screen_Timeout= 8000
LoadDecrypted= false

[ggxx]
system = Naomi
Down_Count = 52
Screen_Timeout= 8000
LoadDecrypted= false

[ggxxrl]
system = Naomi
Down_Count = 53
Screen_Timeout= 8000
LoadDecrypted= false

[ggxxsla]
system = Naomi
Down_Count = 54
Screen_Timeout= 8000
LoadDecrypted= false

[gundmgd]
system = Naomi
Down_Count = 55
Screen_Timeout= 8000
LoadDecrypted= false

[gundmxgd]
system = Naomi
Down_Count = 56
Screen_Timeout= 8000
LoadDecrypted= false

[ikaruga]
system = Naomi
Down_Count = 57
Screen_Timeout= 8000
LoadDecrypted= false

[jingystm]
system = Naomi
Down_Count = 58
Screen_Timeout= 8000
LoadDecrypted= false

[karous]
system = Naomi
Down_Count = 59
Screen_Timeout= 8000
LoadDecrypted= false

[keyboard]
system = Naomi
Down_Count = 60
Screen_Timeout= 8000
LoadDecrypted= false

[kurucham]
system = Naomi
Down_Count = 61
Screen_Timeout= 8000
LoadDecrypted= false

[lupinsho]
system = Naomi
Down_Count = 62
Screen_Timeout= 8000
LoadDecrypted= false

[luptype]
system = Naomi
Down_Count = 63
Screen_Timeout= 8000
LoadDecrypted= false

[meltyb]
system = Naomi
Down_Count = 64
Screen_Timeout= 8000
LoadDecrypted= false

[meltyba]
system = Naomi
Down_Count = 65
Screen_Timeout= 8000
LoadDecrypted= false

[meltybld]
system = Naomi
Down_Count = 66
Screen_Timeout= 16000
LoadDecrypted= false

[moeru]
system = Naomi
Down_Count = 67
Screen_Timeout= 8000
LoadDecrypted= false

[mok]
system = Naomi
Down_Count = 68
Screen_Timeout= 8000
LoadDecrypted= false

[monkeyba]
system = Naomi
Down_Count = 69
Screen_Timeout= 8000
LoadDecrypted= false

[ngdup23a]
system = Naomi
Down_Count = 70
Screen_Timeout= 8000
LoadDecrypted= false

[ngdup23c]
system = Naomi
Down_Count = 71
Screen_Timeout= 8000
LoadDecrypted= false

[psyvar2]
system = Naomi
Down_Count = 72
Screen_Timeout= 8000
LoadDecrypted= false

[puyofev]
system = Naomi
Down_Count = 73
Screen_Timeout= 8000
LoadDecrypted= false

[quizgd]
system = Naomi
Down_Count = 74
Screen_Timeout= 8000
LoadDecrypted= false

[radirgy]
system = Naomi
Down_Count = 75
Screen_Timeout= 8000
LoadDecrypted= false

[senko]
system = Naomi
Down_Count = 76
Screen_Timeout= 8000
LoadDecrypted= false

[senkoo]
system = Naomi
Down_Count = 77
Screen_Timeout= 8000
LoadDecrypted= false

[sfz3ugd]
system = Naomi
Down_Count = 78
Screen_Timeout= 8000
LoadDecrypted= false

[shikgam2]
system = Naomi
Down_Count = 79
Screen_Timeout= 8000
LoadDecrypted= false

[slashout]
system = Naomi
Down_Count = 80
Screen_Timeout= 8000
LoadDecrypted= false

[spkrbtl]
system = Naomi
Down_Count = 81
Screen_Timeout= 8000
LoadDecrypted= false

[sprtjam]
system = Naomi
Down_Count = 82
Screen_Timeout= 8000
LoadDecrypted= false

[ss2005]
system = Naomi
Down_Count = 83
Screen_Timeout= 8000
LoadDecrypted= false

[takoron]
system = Naomi
Down_Count = 84
Screen_Timeout= 8000
LoadDecrypted= false

[tetkiwam]
system = Naomi
Down_Count = 85
Screen_Timeout= 8000
LoadDecrypted= false

[trgheart]
system = Naomi
Down_Count = 86
Screen_Timeout= 8000
LoadDecrypted= false

[trizeal]
system = Naomi
Down_Count = 87
Screen_Timeout= 8000
LoadDecrypted= false

[undefeat]
system = Naomi
Down_Count = 88
Screen_Timeout= 8000
LoadDecrypted= false

[usagui]
system = Naomi
Down_Count = 89
Screen_Timeout= 8000
LoadDecrypted= false

[vathlete]
system = Naomi
Down_Count = 90
Screen_Timeout= 8000
LoadDecrypted= false

[vtennis2]
system = Naomi
Down_Count = 91
Screen_Timeout= 8000
LoadDecrypted= false

[vtennisg]
system = Naomi
Down_Count = 92
Screen_Timeout= 8000
LoadDecrypted= false

[wsbbgd]
system = Naomi
Down_Count = 93
Screen_Timeout= 8000
LoadDecrypted= false

[clubkrte]
system = Naomi
Down_Count = 94
Screen_Timeout= 8000
LoadDecrypted= false

[vf4cart]
system = Naomi
Down_Count = 95
Screen_Timeout= 8000
LoadDecrypted= false

[vf4evoct]
system = Naomi
Down_Count = 96
Screen_Timeout= 8000
LoadDecrypted= false

[vstrike3c]
system = Naomi
Down_Count = 97
Screen_Timeout= 8000
LoadDecrypted= false

[wldrider]
system = Naomi
Down_Count = 98
Screen_Timeout= 8000
LoadDecrypted= false

[beachspi]
system = Naomi
Down_Count = 99
Screen_Timeout= 8000
LoadDecrypted= false

[initd]
system = Naomi
Down_Count = 100
Screen_Timeout= 8000
LoadDecrypted= false

[initdexp]
system = Naomi
Down_Count = 101
Screen_Timeout= 8000
LoadDecrypted= false

[vf4]
system = Naomi
Down_Count = 102
Screen_Timeout= 8000
LoadDecrypted= false

[vf4b]
system = Naomi
Down_Count = 103
Screen_Timeout= 8000
LoadDecrypted= false

[vf4c]
system = Naomi
Down_Count = 104
Screen_Timeout= 8000
LoadDecrypted= false

[vf4evo]
system = Naomi
Down_Count = 105
Screen_Timeout= 8000
LoadDecrypted= false

[vf4evoa]
system = Naomi
Down_Count = 106
Screen_Timeout= 8000
LoadDecrypted= false

[vf4tuned]
system = Naomi
Down_Count = 107
Screen_Timeout= 8000
LoadDecrypted= false

[vf4tuneda]
system = Naomi
Down_Count = 108
Screen_Timeout= 8000
LoadDecrypted= false

[vf4tunedd]
system = Naomi
Down_Count = 109
Screen_Timeout= 8000
LoadDecrypted= false

[vstrike3]
system = Naomi
Down_Count = 110
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Naomi
Down_Count = 111
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Naomi
Down_Count = 112
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Naomi
Down_Count = 113
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Naomi
Down_Count = 114
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Naomi
Down_Count = 115
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Naomi
Down_Count = 116
Screen_Timeout= 8000
LoadDecrypted= false



[]
system = Hikaru
Down_Count = 3
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 4
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 5
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 6
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 7
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 8
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 9
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 10
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 11
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 12
Screen_Timeout= 8000
LoadDecrypted= false

[]
system = Hikaru
Down_Count = 13
Screen_Timeout= 8000
LoadDecrypted= false

This is a sample batch file to test the roms independant of any front end.
-remove "rem" on the specific line for the rom you want to test
-add "rem" to the previously tested rom.
[Batch sample]- save in demul folder (any name you want i.e."test.bat")
Code: [Select]
rem \\\\\\\\\\\\Atomiswave\\\\\\\\\\\\\\
AtomisWave.exe "demofist"
rem AtomisWave.exe "dolphin"
rem AtomisWave.exe "fotns"
rem AtomisWave.exe "ggisuka"
rem AtomisWave.exe "kofnw"
rem AtomisWave.exe "kov7sprt"
rem AtomisWave.exe "salmankt"
rem AtomisWave.exe "sprtshot"
rem AtomisWave.exe "rangrmsn"
rem AtomisWave.exe "rumblef"
rem AtomisWave.exe "xtrmhnt"
rem AtomisWave.exe "xtrmhnt2"
rem AtomisWave.exe "vfurlong"

rem pause
« Last Edit: June 19, 2010, 08:07:37 pm by chillinwater »

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Would this autohotkey script work with any frontend?
« Reply #4 on: June 19, 2010, 10:00:29 pm »
Ok, I think I follow most of that.. the only thing I don't understand is the batch file.

Maximusarcade scans the rom folder to find roms based on the extensions you specify.  I can have it scan for .bat files, but it would only find this one .bat file you gave me as an example.  

or did you mean, I would make a .bat file for each game?


question 2.) You seem to be very good at autohotkey, do you mind if I asked you a few questions about this? I want to make a script for my pc games that will allow me to switch the keys to match my control panel.  I  need different scripts for different games but, how can I do this with just one .ahk file? I mean, how can i have the script detect street fighter 4 is launched press enter, and the same script detect when a touhou shmup is launched no z:f and x:d, and when another pc game is launched use a completely different computer scheme.

Does that question make sense?

« Last Edit: June 19, 2010, 10:06:01 pm by shateredsoul »

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #5 on: June 19, 2010, 11:19:56 pm »
answer #1) The batch is just for you to run\test roms outside any Front-end (you know just to test the wrapper).
It has no function at all for a front end.

If MA runs mame like this,
Mame.exe "romname"

then it should run the wrapper "Atomiswave" the same.
Atomiswave.exe "fotns"  
or whatever.

I wonder though if it reads the directory of roms,
then the naomi roms, bios and atomiswave roms are all in the same directory.

Does it distinguish between them or do you seperate them temporarily for MA to make its list (like"rom2xml" or "hyperlist?)
and then put them back in one folder?

How do it know?


answer #2) yes its possible i have a couple of examples back in the HyperSpin FE site "Setting-Up Unofficial Systems" look for the PcGaming link and a couple more links within that one.
(what you really want , "the one script to rule them all" is possible but a little more involved).
I still havent finished my HS version of that yet 65%-75%, it may be some time before I perfect it and then more time to be able to port it to ANY FE.
« Last Edit: June 19, 2010, 11:56:12 pm by chillinwater »

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #6 on: June 20, 2010, 12:14:12 am »
Ill post an example of tohou 123th shortly

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #7 on: June 20, 2010, 12:46:09 am »
I dont know if you have Touhou123th, but if you do,
(all of the following is only for adding the ability to remap keys in a pc game if it cant be done inside the game or emu)

-Add appropriate (personalized) key mappings
-Compile the script below for Touhou123th (standalone wrapper)
-if needed create a batch file similar to this change the directory in the script and the batch to your directory. (or no directory if putting it in the touhou folder)
Code: [Select]
J:\HyperSpin\Wrappers\Testing\TouHou123th.exeYou may have to wrap the bat in "quotes" for your version of windows, I'm@vista32
If this were Hyperspin id just make a link from the compiled script.

So for,
[Key Remapping]-see below in script
Mapping syntax:
Mapto::Mapfrom

Where,
Mapfrom = the default emulator key settings
Mapto= the keys you want to use
i.e.
w::up
s::down
a::left
d::right
g::z
h::x
j::c

Code: [Select]
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
Run, C:\HyperSpin\Emulators\PC Gaming\Touhou Hisoutensoku ~Eastern Unthinkable Natural Law~\th123.exe
WinWait, 東方非想天則 〜` 超弩級ギニョルの謎を追え Ver1.01,
IfWinNotActive, 東方非想天則 〜` 超弩級ギニョルの謎を追え Ver1.01, , WinActivate, 東方非想天則 〜` 超弩級ギニョルの謎を追え Ver1.01,
WinWaitActive, 東方非想天則 〜` 超弩級ギニョルの謎を追え Ver1.01,

;\\map your keys here\\
;\\i.e. these are just random keys
w::up
s::down
a::left
d::right
g::z
h::x
j::c
« Last Edit: June 20, 2010, 12:58:06 am by chillinwater »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: Would this autohotkey script work with any frontend?
« Reply #8 on: June 20, 2010, 04:59:23 pm »
chillinwater: YOu should zip and attachments your work, but awesome post... Then it would propnety have easier to understand, due we could just download the file(s).
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #9 on: June 20, 2010, 08:45:14 pm »
chillinwater: YOu should zip and attachments your work, but awesome post... Then it would propnety have easier to understand, due we could just download the file(s).
Done, for
-Atomiswave
-Touhou 123th
I didnt compile Touhou because You need to edit the paths.

I can do more Touhou versions but I have to find them first.
Which versions do you want scripts for?
« Last Edit: June 21, 2010, 08:18:52 pm by chillinwater »

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Would this autohotkey script work with any frontend?
« Reply #10 on: June 21, 2010, 04:35:36 am »
1. Hey chillin so I actually had time to test out the script out for atomiswave and it worked great! I just had to add %name to the commandline and it launched the games. I did have one issue, when I have maximus exit programs through a normal keyboard key.  I use the letter "G", when I exit atomiswave it hangs really bad.  Is there a command I can add to the autohotkey script for it to forcequit demul with the letter "G"?

2. Also, I do have Tohou but not that particular one, I didn't even know scarlet weather rhapsody had an expansion. So some more dumb questions. I know you explained it before.. in the touhou script is "剣非想天則 〜` 超弩級ギニョルの謎を追" just the name of the active window? I mean, if I had a game like lets say braid (yeah i know it's through steam but humor me).  Would that name be replaced by braid?

I'm trying to figure it out.

3. Also, i don't want one monster script running all the time.. just for pc games.  I don't know the autohotkey scrip well enough to do a real example but this is what I envisioned (i made up my own code :P to illustrate my point).  I couldn't think of more games and I know some of these you can config. within the game, it's just for an example.  I would want this script to launch for all pc games. I just want to know if this is possible.. the scrip wouldn't have to launch the games, just detect that they are running.

If braid.exe running

f::z
n::x

if touhou double spoiler.exe running

f::z
n::x

if plants vs zombies.exe running

f::u
n::t

if sf4.exe running

send enter


4. Do you know if there's a autohotkey sript for the frst few touhou games that use the win 98 emulator?


chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #11 on: June 21, 2010, 06:21:11 pm »
For Atomiswave "esc" exits normally when not in any FE's.
You could also try "Alt-f4".

using "esc" as an example, add\test this just before the run command or after the winwait commandin the Atomiswave.exe (save\re-compile)

g::
send, {esc}

or

g::
send, {laltdown}{f4}{laltup}


Yes) all this "剣非想天則 〜` 超弩級ギニョルの謎を追"
is active window crap, you may be able to sub it for the actual excutable name


None of the following have been tested, you may have to:

-edit each for the actual window names for each game. i.e.
@ the winwait, winactivate, winwaitactive, lines (in each script) make sure they have the proper window names.
(mouse over the game on the taskbar, when running if possible, to find out what they are)
-place all launchers in the games directory as the actual game executable i.e. "braid_launcher.exe" would go in the same directory as "braid.exe"


[Braid_Launcher.exe]- then make your batch file for braid, pointing to the launcher.

Run, %A_scriptdir%\braid.exe
WinWait, braid,
IfWinNotActive, braid, , WinActivate, braid,
WinWaitActive, braid,
;sleep, 500
;Send, {F4} ;fullscreen for some other executables, dont know what braid is
f::z
n::x
exitapp


[touhou double spoiler_launcher.exe]- then make your batch file for touhou double spoiler.exe, pointing to the launcher.

Run, %A_scriptdir%\touhou double spoiler.exe
WinWait, braid,
IfWinNotActive, touhou double spoiler.exe, , WinActivate, touhou double spoiler.exe,
WinWaitActive, touhou double spoiler.exe,
;sleep, 500
;Send, {F4} ;fullscreen for some other executables, dont know what touhou double spoiler.exe is.
f::z
n::x
exitapp


[plants vs zombies_launcher.exe]- then make your batch file for plants vs zombies, pointing to this launcher.

Run, %A_scriptdir%\plants vs zombies.exe
WinWait, braid,
IfWinNotActive, plants vs zombies, , WinActivate, plants vs zombies,
WinWaitActive, plants vs zombies,
;sleep, 500
;Send, {F4} ;fullscreen for some other executables, dont know what plants vs zombies is.
f::u
n::t
exitapp



for SF4 look in the HyperSpin forums there is already a launcher for it, but you could give this a shot.

[sf4_launcher.exe]- then make your batch file for sf4, pointing to this launcher.
Run, %A_scriptdir%\sf4.exe
WinWait, sf4,
IfWinNotActive, sf4, , WinActivate, sf4,
WinWaitActive, sf4,
sleep, 500
send, {enter}
;sleep, 500
;Send, {F4} ;fullscreen for some other executables, dont know what sf4 is
exitapp
« Last Edit: June 21, 2010, 06:37:28 pm by chillinwater »

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Would this autohotkey script work with any frontend?
« Reply #12 on: June 21, 2010, 07:00:57 pm »
cool thanks!

I hadn't considered that I can just make a batch file pointing to the autohotkeyscript launcher, great idea.  Using this method I can do an individual script per game.  Brilliant! Do you have any idea how to tell autohotkey to press the "windows" key?  For my popcap games I want it to press windowskey+shift+rightarrow to send the screen to my touchscreen.

I've spent too much time setting up atomiswave and with the new nulldc r50 that just came out and have a bunch of catching up to do on work.  It looks like it's going to take a while to do, but it should be worth it!

Thanks!

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #13 on: June 21, 2010, 07:30:23 pm »
Here are the keys to play with.
[your key list]

{LWin}
{SHIFT}
{RIGHT}


[example]-I know this works
Send, {SHIFTDOWN}{RIGHT}{SHIFTUP}

[example]-unknown if this works
Send, {LWinDOWN}{SHIFTDOWN}{RIGHT}{SHIFTUP}{LWinUP}

or
Send, {LWin}{SHIFT}{RIGHT}

« Last Edit: June 21, 2010, 07:32:43 pm by chillinwater »

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #14 on: June 21, 2010, 08:15:28 pm »
Fyi,
I have had Atomiswave (demul) crash on me the way you describe in your tutorial for Maximus, ( thanks for the creds btw, blushing)
I dont think its the script though.
It usually happened to me while testing and exiting too quickly before the game fully loads? or gets its graphic drivers loaded?
(it can happen in or out of any FE)
its all guess work but I have no problems when waiting a few.

Also you'll notice that some games may take longer too load then others which causes you to send the {alt}{F4} manually for fullscreen.
For those long loading games you can adjust the "screen_timeout" in the settings.ini for each individual rom.
The default is 8000=8secs
but you can increase or decrease this per rom.

Update (version .002 atomiswave)
rather than showing just a black screen you could try substituting these lines in the original "Atomiswave" script:

Gui +AlwaysOnTop -Caption +ToolWindow
Gui, color, 0
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%,  


with these lines:

WinHide ahk_class Shell_TrayWnd
guiheight:=A_ScreenHeight/9*4
Gui, +toolwindow -Caption +AlwaysOnTop
Gui, Color, black
Gui, Font, S24 Cred, verdanna
Gui, Add, Text, y%guiheight% W%A_ScreenWidth% H%A_ScreenHeight% Center, Please Wait While Loading... `n`n -Atomiswave- `n "%romname%"
Gui, Show, W%A_ScreenWidth% H%A_ScreenHeight%,


you'll hopefully get a pleasant surprise.
For the new lines above,
-You can adjust the background color on this line above:
Gui, Color, black

-You can adjust the Font size, color and the actual font on this line above:
Gui, Font, S24 Cred, verdanna

-You can adjust what you want to say on this line above:
Gui, Add, Text, y%guiheight% W%A_ScreenWidth% H%A_ScreenHeight% Center, Please Wait While Loading... `n -Atomiswave- `n "%romname%"

I'll add the attachments shortly.
  
« Last Edit: June 30, 2010, 06:03:16 pm by chillinwater »

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Would this autohotkey script work with any frontend?
« Reply #15 on: June 21, 2010, 09:07:35 pm »
nice! I'm pretty sure I can tell what this is based off the text  8).  I haven't had that issues since I had maximus terminate "demul.exe" at the exit of the game.  I did wonder though... launching individual gams with remapped keys may be an issue if autohotkey isn't terminated when exiting back to the front end.  I was testing with Braid outside the frontend and I was stuf with f typing n even after exiting Braid. I think having maximus kill autohotkey.exe on exit would work now? or I wonder if the script recognized as braid.exe?

I will add the new atomiswave script definitely, atomiswave games seem to take longer to load than other emulated games... this will keep players from thinking it didn't work.  I'll give it a test later.

By the way, in looking at your settings.ini I couldn't help but notice you had naomi and hikaru in there.  I've been using makaron for naomi, do you think demul is pretty good for naomi? Also, have you been able to try the hikaru emulation? I don't have any of those yet.

*edit* also, would this work with naomi and naomi2 without any further setup?
« Last Edit: June 21, 2010, 09:29:30 pm by shateredsoul »

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #16 on: June 21, 2010, 10:25:08 pm »
Hikaru isnt truly supported yet in demul it only references it (like the script and settings),
for Naomi...
demul is descent but better than Makaron or Nulldc?  for some games maybe (easier to setup maybe).
and now is it better than the new NullDC for naomi 104.50?
(in demul) you can change the vertical games to actual vertical orientations
for the rest of the comparisons though not complete, look for "Naomi performance\benchmark testing" in the HS forums.

Steam may be an issue here for braid and exit,
try adding this into your scripts (example for braid and if using "G" as your exit key.)
If this works for you, then plug in the other games (sub-out "braid")

[sample code]
;\\\\\\\\\\\\\\\\\\\\\Braid\\\\\\\\\\\\\\\\\\\\\\\\\
exitemulatorkey=g
hotkey, %exitemulatorkey%, ShutDown
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
;\\\add please wait text screen here if wanted\\\
;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Run, %A_scriptdir%\braid.exe
WinWait, braid,
IfWinNotActive, braid.exe, , WinActivate, braid.exe,
WinWaitActive, braid.exe,
;sleep, 500
;Send, {F4} ;fullscreen for some other executables, dont know what braid.exe is.
f::z
n::x

ShutDown:
process, close, braid_launcher.exe
process, close, braid.exe
;exitapp ;use this if needed
;\\\\\\\\\\\\End Of Code\\\\\\\\\\\\\\\\\\\\\\\\\\\\
« Last Edit: June 21, 2010, 10:32:24 pm by chillinwater »

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Would this autohotkey script work with any frontend?
« Reply #17 on: June 21, 2010, 10:31:10 pm »
nice! worked like a charm.

It's good to know that naomi can flip the screen, does that happen automatically (I'd try it to see my self, but I won't have access to my cab computer for a while). I've been testing what i have on my laptop.

chillinwater

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:February 01, 2022, 12:13:55 am
Re: Would this autohotkey script work with any frontend?
« Reply #18 on: June 21, 2010, 10:34:12 pm »
No, it wont auto-switch,
You have to go into service mode like in makaron or nulldc, the service and test keys may be different but configurable.
« Last Edit: June 22, 2010, 02:17:59 am by chillinwater »

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Would this autohotkey script work with any frontend?
« Reply #19 on: June 24, 2010, 08:33:37 pm »
So I was able to use the street fighter launcher from hyperspin, I couldn't figure it out on my own. 

One last thing that would really help is figuring out how to get the autohotkey scripts to terminate with the press of "G" (my exit key).  The autohotkey scripts keep running in the background (Maximus Arcade fails to close them) and even when i'm just using my pc outside of the frontend the script keeps running until I kill the process manually.

Is there anyway to have the script "kill" itself when I press "G"?

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Would this autohotkey script work with any frontend?
« Reply #20 on: June 24, 2010, 10:25:36 pm »
figured it out..

~g::ExitApp


I also figured out that you can just put the name of the executable if you're going to have your script in the same folder as the app you want to launch.. very handy for pc games.

Here's a full example

Run, BurgerTime_Deluxe.exe <- run this game that's located in the same folder
f::Space <- for space press f (space is used to use teh attac)
1::Enter <- now I can push enter with my player 1 start buttong
~g::ExitApp  <-gloses autohotkey when I exit the game on my frontend
« Last Edit: June 24, 2010, 11:10:37 pm by shateredsoul »

Smudge418

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:March 20, 2016, 02:45:17 pm
  • Maximus arcade is very much alive......
Re: Would this autohotkey script work with any frontend?
« Reply #21 on: April 20, 2014, 01:32:01 pm »
 ???hey guys totally a newbie with AHK and would love to get atomiswave working in maximus. i know its cheeky but could u upload the files so i could get this running

thank you in advance