Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: SegaOutrun on May 02, 2014, 05:48:11 pm

Title: looking for script help: add hit "enter" in hyperspin module Update: DONE
Post by: SegaOutrun on May 02, 2014, 05:48:11 pm
i posted this in the hyperspin forum but it can be a deadzone sometimes. it seems like a generic request not specific to hyperspin so i decided to post here incase anyone can help.

i use my steering wheel from racing games and demul doesnt like my wheel. it throws up this warning while loading any game. Its just a warning popup since I can play the games with my wheel just fine after hitting enter. It appears after about 3 seconds after loading a game.
What and where can I add to module to have it  "hit" enter for me? instead of me doing it manually anytime i load a game

(http://i.imgur.com/6vq1dXa.jpg?1)

btw i searched for a solution for warning but it seems that it has to do with how demul handles xinput and dinput and there was no solution.

i have added the modules incase it is useful for you guys

here is the ahk

http://pastebin.com/MHgqrrE3 (http://pastebin.com/MHgqrrE3)

and the isd if needed

http://pastebin.com/ScrDrbTt (http://pastebin.com/ScrDrbTt)

Thanks in advance

update #2 : this is a better way to close the window

add this before the run line (this is what the run line looks like Run(executable ........)

Code: [Select]
myErrorWindowTitle := "padDemul ahk_class #32770"
Settimer, CloseErrorTest, 5

and add this at the bottom of the ahk

Code: [Select]
CloseErrorTest:
IfWinExist, %myErrorWindowTitle%
{
ControlSend,, {Enter}, %myErrorWindowTitle%
SetTimer, CloseErrorTest, Off
}
Return
this one is not timed based, it specifically looks for the popup window and close it

UPDATE #1: Fixed it myself. ignore, Use update #2 as it is a better method.

after some trial and error, i figured out how to do it myself. Add the last two lines to your AHK after run executable, if you have the same error. Some games load faster than other (18wheeler worked with 1500) but, i put 5000 because Initial D takes longer to load.

Sleep, 5000
Send {ENTER}


for example
Code: [Select]
; Run(executable .  " -run=" . ident . " " . romCLI, emuPath,, emuPID)
Run(executable .  " -run=" . ident . " " . romCLI, emuPath, (If hideDemulGUI = "true" ? "min" : ""), emuPID)    ; launching minimized, then restoring later hides the launch completely
Sleep, 1000 ; Need a second for demul to launch, increase if yours takes longer and the emu is NOT appearing and staying minimized. This is required otherwise bezel backgrounds do not appear
Sleep, 5000
Send {ENTER}
Title: Re: looking for script help: add hit "enter" in hyperspin module Update: DONE
Post by: Howard_Casto on May 03, 2014, 02:25:01 am
That's interesting.  What kind of wheel is it specifically?  The error message is from an invalid creation of a force-feedback effect (obviously) so it means you might be missing out on some force-feedback effects.
Title: Re: looking for script help: add hit "enter" in hyperspin module Update: DONE
Post by: SegaOutrun on May 03, 2014, 02:57:25 am
its a driving force gt but, it gave me the same error with my momo wheel.  The naomi racing games i play the most are intial d 1,2,3 and jambo safari so theres no need for force feedback.
Title: Re: looking for script help: add hit "enter" in hyperspin module Update: DONE
Post by: Howard_Casto on May 03, 2014, 04:24:10 am
Have you told the Demul guys?  Just a random guess in the dark, the error might be that they are trying to create rumble style effects that a wheel won't support (for gamepads) and they forgot to put in error handling.  Admittedly it's a pain in the butt... you have to go through this enumeration procedure and check every possible effect type.
Title: Re: looking for script help: add hit "enter" in hyperspin module Update: DONE
Post by: charlieram on June 15, 2014, 05:59:22 pm
Sorry to dig up an old thread but I have just upgraded my driving cab pc just enough to get some of the demul games to run :-) , I also have the same error using a Logitec Driving force pro, I will add the sleep command for now but I'm hoping it means the devs are trying to implement FFB into the emu.

Cheers for the workaround...'search' is a wonderful thing!!
Title: Re: looking for script help: add hit "enter" in hyperspin module Update: DONE
Post by: SegaOutrun on June 16, 2014, 03:49:51 am
opps, i forgot to update the thread. the person who wrote the ahk chimed in with a better way to close the window.

add this before the run line (this is what the run line looks like Run(executable ........)

myErrorWindowTitle := "padDemul ahk_class #32770"
Settimer, CloseErrorTest, 5


and add this at the bottom of the ahk

CloseErrorTest:
IfWinExist, %myErrorWindowTitle%
{
ControlSend,, {Enter}, %myErrorWindowTitle%
SetTimer, CloseErrorTest, Off
}
Return


this one is not timed based, it specifically looks for the popup window and close it

Title: Re: looking for script help: add hit "enter" in hyperspin module Update: DONE
Post by: charlieram on June 16, 2014, 11:26:24 am
Cheers for that, it worked but I still have to mute the system sound. It doesn't work on 0.5.7 btw just 0.5.8.
 :applaud: