Jump to content
LaunchBox Community Forums

Future Pinball not running AutoHotKey scripts?


Johnny T

Recommended Posts

Hi all,

When I try and add a Start/Exit AHK script to Future Pinball it doesn't run at all?

I'm not sure if it's because I'm launching the BAM loader which then launches Future Pinball or something along those lines?

I've found a couple of other mentions of a similar problem here and there.

I just wanted to map the Pause "P" key to the Pause/Break keyboard key so that pressing P brings up the highscore table.

Anyone got a way round this? I'm thinking I might need to make a .bat file or something that will run the BAM launcher AND run the AHK script?

Thanks

Link to comment
Share on other sites

Have you set AHK to run as admin? 

In your launchbox folder/emulators/Future Pinball find the future pinball executable (labeled FP with a green box with an H for an icon)

right click it and select properties, select the Compatibility tab and at the bottom check the box marked Run this program as an administrator hit apply then ok 

(you'll receieve an error in game if you dont run as admin)

more tables here :

Future Pinball

 

Link to comment
Share on other sites

11 hours ago, lou silver said:

Have you set AHK to run as admin? 

In your launchbox folder/emulators/Future Pinball find the future pinball executable (labeled FP with a green box with an H for an icon)

right click it and select properties, select the Compatibility tab and at the bottom check the box marked Run this program as an administrator hit apply then ok 

(you'll receieve an error in game if you dont run as admin)

more tables here :

Future Pinball

 

Hi Lou

I've just re-read your reply (I originally read it last night on my phone) and I mis-understood your response.

I'm running Future Pinball directly from LB/BB. I don't run a AHK script from LB/BB. I just run the FPLoader.exe inside the BAM folder. 

However, I'm trying to use the LB feature of adding a AHK script when the emulator runs and stops but that doesn't seem to work for Future Pinball.

I've got the same script running for another Platform and it works without a problem.

That was my issue - although, I might just have to go down the route of using an external AHK script for everything (i.e. remap the keys and *then* start the game up).

futurepinball.jpg

Link to comment
Share on other sites

Right!!! I've sussed it!!!

The whole reason I was trying to do what I was doing was so that I could use my cabinet "Pause" button (mapped to the letter "P") in order to open the High Scores on Future Pinball.

I had problems because I run FPLoader (BAM) from LB and that then runs Future Pinball so, as far as LB is concerned the program is running and closing almost instantly (hence the LB AHK script running/closing imperceptively).

So... I set up LB "Running Autohotkey" script to run another script with:

Run "D:\LaunchBox\Emulators\Future Pinball\BAM\FuturePinballKeyRemap.ahk"

 

Then in FuturePinballKeyRemap.ahk I put the following code:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance, Force
#Persistent

#If ProcessExist("Future Pinball.exe")
p::MButton
ESC::ExitApp
#If
ProcessExist(Name)
{
 Process,Exist,%Name%
 return Errorlevel
}

 

Because AHK wouldn't use the "Pause/Break" key (which is the default high score key in Future Pinball) I opened FP up and "enabled mouse" in the keys and then changed the middle mouse key to be high scores.

The above set up is working great now.

I took the part about the mapping to the middle mouse key from Wade007 on the AHK forums:

https://autohotkey.com/board/topic/82367-how-to-remap-pausebreak-key-to-another-key-in-ahk/

So can't take any credit for it. Just standing on the shoulders of giants :)

Just posting in case it helps someone else. :)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...