Jump to content



Photo
* * * * * 5 votes

Call for testing


  • Please log in to reply
1630 replies to this topic

#861 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 23 September 2019 - 09:22 PM

Every time I tinker on my cab, it gets one step closer to perfection!

 

Well, you have better luck than I do then - it's more like one step forward, one step back. :)

 

Glad you got the plunger situation sorted out!



#862 Teahaus

Teahaus

    Hobbyist

  • Silver Supporter
  • 45 posts

  • Flag: Canada

  • Favorite Pinball: Firepower by 3rdAxis.........

Posted 23 September 2019 - 09:27 PM

 

Looked through this thread and noticed a couple of mentions of pinballY not having focus upon boot-up.  Whenever I boot my mini-cab, everything boots normally but my flippers don't work until I use the computer keyboard.  Then they suddenly function per the button mapping.  I can also enable them by unplugging and replugging the USB connector from my zebsboard plunger.  Any ideas how I can get it to work first-time upon booting?

 

That sounds like a new one to me - the plugging and replugging business is weird.  The *usual* problem people have with focus is just plain *focus*.  In your case, I'd say it's not a simple focus issue, because your regular keyboard is working.  With regular focus issues, the keyboard is precisely what *doesn't* work.

 

Are you sure this has anything to do with PinballY, other than that it happens to also be launched at startup?  It really sounds more like a USB or device issue to me given that rebooting the device fixes it.  Have you tried this without PinballY involved at startup, to see if the device starts up normally then?

 

 

 

Hi Mike.......firstly thank you for all your incredible apps/programs to further this great hobby.  I decided to totally unplug my zebsboards plunger and reboot my computer.  Everything boots into PBY which is great.........but there's no focus on the PF screen even with the keyboard.  I have to take the mouse and click on the PF and then the keyboard commands work.  I don't think I have anything else at start-up.  Any advice would be appreciated.  Once I plugged in my plunger button commands work as they should.  One thing I need to try is to unplug the keyboard altogether.  Maybe having both plugged in is causing a problem.  Is there a place in windows where I tell it that the plunger is not a keyboard?

 

Edited by Teahaus, 23 September 2019 - 09:38 PM.


#863 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 24 September 2019 - 02:13 AM

  I decided to totally unplug my zebsboards plunger and reboot my computer.  Everything boots into PBY which is great.........but there's no focus on the PF screen even with the keyboard.  I have to take the mouse and click on the PF and then the keyboard commands work.  I don't think I have anything else at start-up.

 

Okay, with the plunger out of the picture, this sounds like just a basic startup focus problem.

 

 

Maybe having both plugged in is causing a problem.  Is there a place in windows where I tell it that the plunger is not a keyboard?

 

No, there's not, but that's definitely not something you need (or would want) to do.  Windows is perfectly happy to have multiple keyboards attached.  Besides, given that you just tested that the focus problem is occurring with only the keyboard attached, let's leave the plunger device out of the picture for now - one thing at a time - and solve the focus problem with just the keyboard.  Once that's solved we can move on to the next issue, if there still is a next issue (there might not be after all once you get past the focus problem).

 

So, back to the focus problem...

 

Are you using Windows 10, by chance?

 

If so, that might be the whole issue.  It seems that Windows 10 Task Scheduler doesn't give focus to programs at launch.  That's apparently an intentional change Microsoft made - they thought it was better if auto-launched programs couldn't steal focus, which certainly can be a problem, but you'd think they would have made it an option rather than just disabled focus entirely.  But in their wisdom...

 

If you're *not* on Windows 10, it must be something else.

 

Let me know which Windows you're on and I'll suggest a next step.



#864 Teahaus

Teahaus

    Hobbyist

  • Silver Supporter
  • 45 posts

  • Flag: Canada

  • Favorite Pinball: Firepower by 3rdAxis.........

Posted 24 September 2019 - 04:48 AM

Hi Mike:  Yes, I'm using windows 10 pro.........



#865 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 24 September 2019 - 06:42 AM

Hi Mike:  Yes, I'm using windows 10 pro.........

 

Okay, that's what I was guessing.

 

There are a couple of workarounds on the Web (in unrelated contexts) for the Win 10 Task Scheduler focus issue, but I've tried going through those with a couple of people, and they don't seem to work for everyone.  The two main ones are:

 

- Stop using Task Scheduler to launch it; change to a "Startup" group shortcut in your Start menu instead

 

or,

 

- Edit the Task Scheduler task so that rather than launching the program directly, it launches CMD.EXE, with a /c command line that launches the program

 

If you're comfortable enough with Power User stuff to give those a try, go ahead and try them.  They're supposed to work, says the Internet.  But I've talked to at least one person where neither of them worked, so I don't want to waste your time too much by walking you through unfamiliar procedures if you don't know how to do them already.

 

If one of those won't work for you (or you don't want to research how to do them), here's a really ugly brute-force Javascript approach that I think will work.  But who knows, those clever Windows 10 people might have found a way to foil this as well. 

 

The idea here is that we'll generate a fake mouse click event on the PinballY main window a couple of seconds after launching.  That will hopefully give the program focus just like a real mouse click would.

 

The caveat is that you might have to adjust the timing.  In the example here, I'm setting it to 2 seconds after launch.  That might not be enough for your system - Windows can get awfully laggy during boot-up, so the mouse click might be ignored if it gets generated too soon.  So if this doesn't work, or doesn't work reliably, try increasing the time delay.  I'd go REALLY long if you have to try this, at least initially, just to see if ANYTHING will work.  So try maybe 30 or 60 seconds if 2 seconds doesn't work.  If it won't even work after 60 seconds, I'd say this is a hopeless approach.  If it doesn't work at 2 seconds but does work at 60 seconds, you can try successively shorter times until you find the cut-off where it stops being reliable, then use that.

To use this, create a file called main.js in your Scripts folder inside your PinballY folder, and paste this code into it.

 

Like I said, it's really ugly, so brace yourself...

// Focus-grabbing time delay in milliseconds.  Adjust this as needed to
// make it reliable.
const InitialFocusTime = 2000; 
setTimeout(function() {

    // This message is just so you know when it's happening, to help you
    // get the timing right.  You can remove this when the timing is reliable.
    mainWindow.message("Setting focus *now*");  

    // Set up to call SendInput() so we can send a mouse click to our window,
    // and GetSystemMetrics() so that we can figure the mouse position in terms
    // of the normalized virtual desktop per SendInput()'s requirements.
    let User32 = dllImport.bind("User32.dll", `

        typedef struct MOUSEINPUT {
            LONG dx;
            LONG dy;
            DWORD mouseData;
            DWORD dwFlags;
            DWORD time;
            ULONG_PTR dwExtraInfo;
        } MOUSEINPUT;

        typedef struct INPUT {
            DWORD type;
            union {
                MOUSEINPUT  mi;
            } u;
        } INPUT, *PINPUT, *LPINPUT;

        UINT SendInput(UINT cInputs, LPINPUT pInputs, int cbSize);

        int GetSystemMetrics(int nIndex);
    `);
    const INPUT_MOUSE = 0;
    const MOUSEEVENTF_ABSOLUTE = 0x8000;
    const MOUSEEVENTF_VIRTUALDESK = 0x4000;
    const MOUSEEVENTF_MOVE = 0x0001;
    const MOUSEEVENTF_LEFTDOWN = 0x0002;
    const MOUSEEVENTF_LEFTUP = 0x0004;
    const SM_XVIRTUALSCREEN = 76;
    const SM_YVIRTUALSCREEN = 77;
    const SM_CXVIRTUALSCREEN = 78;
    const SM_CYVIRTUALSCREEN = 79;

    // figure our window location in normalized virtual desktop space
    let rcWin = mainWindow.hwndView.getWindowPos().windowRect;
    let rcDesk = { 
        left: User32.GetSystemMetrics(SM_XVIRTUALSCREEN),
        top: User32.GetSystemMetrics(SM_YVIRTUALSCREEN),
        width: User32.GetSystemMetrics(SM_CXVIRTUALSCREEN),
        height: User32.GetSystemMetrics(SM_CYVIRTUALSCREEN)
    };
    let xMouse = Math.round((rcWin.left - rcDesk.left)*65535/rcDesk.width) + 1;
    let yMouse = Math.round((rcWin.top - rcDesk.top)*65535/rcDesk.height) + 1;

    // move the mouse over our window, and send a left-button-down + left-button-up sequence
    // to bring it to the foreground and give it focus
    let inp = dllImport.create("INPUT");
    inp.type = INPUT_MOUSE;
    inp.u.mi.dx = xMouse;
    inp.u.mi.dy = yMouse;
    inp.u.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK | MOUSEEVENTF_MOVE | MOUSEEVENTF_LEFTDOWN;
    User32.SendInput(1, inp, dllImport.sizeof("INPUT"));

    inp.u.mi.dwFlags = MOUSEEVENTF_LEFTUP;
    User32.SendInput(1, inp, dllImport.sizeof("INPUT"));

}, InitialFocusTime);



#866 Teahaus

Teahaus

    Hobbyist

  • Silver Supporter
  • 45 posts

  • Flag: Canada

  • Favorite Pinball: Firepower by 3rdAxis.........

Posted 24 September 2019 - 11:20 AM

Thanks so much for the advice........will try them all but if not, it's not that big of deal (to me anyhow).  I can always have my mini-wireless keyboard available on the cab.  It's more for others who may want to use the machine and don't know the procedure.  Thanks again and why are you up at 2:42 am?



#867 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 27 October 2019 - 06:16 PM

 

 

Messing around with Future Pinball, got it running smoothly with BAM and FutureDMD.  Tried running a FP game from PinballY but it's requiring ADMIN version.  Is this normal for Future Pinball within PinballY?

 

If you're running program "X" in Admin Mode, then anything that launches program "X" needs to be in Admin Mode.  So are you running FP in Admin Mode?  I'm guessing you must be.  

 

I personally think it's better not to run anything at all in Admin Mode if you can avoid it, since it creates no end of problems with interoperating programs.  It seems like about 90% of the reason people think they need Admin Mode is that they tried checking that stupid little box in the properties dialog at some point in their troubleshooting history, and it didn't help, but they never bothered un-checking it.  So if you're unsure about why Admin Mode is a factor here at all, maybe that's what happened this time.

 

Keep in mind that you shouldn't be running PinballY itself in Admin Mode under any circumstances.  You should be running that separate "PinballY Admin Mode.exe" program that's included in the install.  Kind of weird distinction, I know, but there's a method to the madness (explained in the help).

 

Ok yes I managed to install Future Pinball with elevated Admin Rights.  I found this via task manager, Details, then under the elevated column I see Future Pinball listed as YES, so it is running as Admin, but not sure how to remove it from running as Admin.  

 

Still issues with this, I don't have Future Pinball properties checked "Run as Admininistrator" but it still remains as 'elevated' or running as Admin so can't run this within PinballY, any other ideas?



#868 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 27 October 2019 - 06:41 PM

20191027_143448.jpg



#869 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,807 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 27 October 2019 - 06:49 PM

Is there a way in windows to find out what programs are set to run as Admininistratorare and how they are set?



#870 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 27 October 2019 - 07:08 PM

There's probably other ways, but Via Task Manager in Windows 10 under the details tab you can display the Elevated and other columns just right click on the tabs and add it.  The 'how they are set' that's what's got me perplexed ATM.



#871 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,807 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 27 October 2019 - 09:28 PM

I don't believe that means it's running as admin

If you right click the start button go to system

Name of your computer might be admin


Edited by Outhere, 28 October 2019 - 02:24 AM.


#872 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 28 October 2019 - 01:32 AM

It's not that it's the elevated column that's saying its operating with admin rights. Have done a lot of googling and I can find how to give elevated rights easy enough but not how to remove them. I may have to find a windoze forum To find my answer.

#873 Outhere

Outhere

    Pinball Wizard

  • Platinum Supporter
  • 4,807 posts

  • Flag: United States of America

  • Favorite Pinball: M M

Posted 28 October 2019 - 02:19 AM

Maybe mjr will jump in


Edited by Outhere, 28 October 2019 - 02:20 AM.


#874 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 28 October 2019 - 05:55 PM

Still issues with this, I don't have Future Pinball properties checked "Run as Admininistrator" but it still remains as 'elevated' or running as Admin so can't run this within PinballY, any other ideas?

 

There are a bunch of different ways to make a program launch elevated ("Run as Administrator" mode), so I guess you must be using one of the "other" ways if "Run as Administrator" isn't checked in the .EXE properties.

 

Could you clarify how you're launching that FP process that's showing up as Elevated = Yes?  Then I might have some ideas of where to look for why it's getting elevated.


It's not that it's the elevated column that's saying its operating with admin rights. Have done a lot of googling and I can find how to give elevated rights easy enough but not how to remove them. I may have to find a windoze forum To find my answer.

 

There actually is no way (as far as I understand the mechanism) to add or remove elevated rights to a *running* process - it's all a matter of how it got launched initially.



#875 JLPicard001

JLPicard001

    Enthusiast

  • Members
  • PipPipPip
  • 270 posts
  • Location:Earth

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Theatre of Magic

Posted 30 October 2019 - 02:07 AM

 

Still issues with this, I don't have Future Pinball properties checked "Run as Admininistrator" but it still remains as 'elevated' or running as Admin so can't run this within PinballY, any other ideas?

 

There are a bunch of different ways to make a program launch elevated ("Run as Administrator" mode), so I guess you must be using one of the "other" ways if "Run as Administrator" isn't checked in the .EXE properties.

 

Could you clarify how you're launching that FP process that's showing up as Elevated = Yes?  Then I might have some ideas of where to look for why it's getting elevated.


It's not that it's the elevated column that's saying its operating with admin rights. Have done a lot of googling and I can find how to give elevated rights easy enough but not how to remove them. I may have to find a windoze forum To find my answer.

 

There actually is no way (as far as I understand the mechanism) to add or remove elevated rights to a *running* process - it's all a matter of how it got launched initially.

 

BOOM!! I started to type this in as a response to your question : I have BAM installed alongside FP and am using the fploader.exe in BAM to open FP as explained in the instructions... 

 

and while typing that i thought I'd stroll over to the cabinet and check the fploader.exe executable and low and behold it was launching as Administrator, but not showing up as a process itself or getting on the 'Elevated' list.  I unchecked the Administrator privileges for fploader.exe and now it loads in PINBALLY.

 

Thanks bunches for helping guys!



#876 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 30 October 2019 - 02:43 AM

BOOM!! I started to type this in as a response to your question : I have BAM installed alongside FP and am using the fploader.exe in BAM to open FP as explained in the instructions... 

 

and while typing that i thought I'd stroll over to the cabinet and check the fploader.exe executable and low and behold it was launching as Administrator, but not showing up as a process itself or getting on the 'Elevated' list.  I unchecked the Administrator privileges for fploader.exe and now it loads in PINBALLY.

 

Ah, that makes sense.  fploader wasn't showing up in the process list because it's pretty literally a "loader" - it launches a separate FP process and then it exits, leaving FP running.  Glad you tracked it down!



#877 BoltBait

BoltBait

    Software Developer

  • Members
  • PipPipPip
  • 459 posts
  • Location:Sacramento, CA

  • Flag: United States of America

  • Favorite Pinball: Elvira, Whitewater, Big Bang Bar, Fun House and All the old EM tables of the 70s that I played as a kid (including Buccaneer, Spirit of 76, and King Kool)

Posted 30 October 2019 - 03:10 AM

There actually is no way (as far as I understand the mechanism) to add or remove elevated rights to a *running* process - it's all a matter of how it got launched initially.


This is true.

How I built my B2S Pinball Cabinet, step-by-step, with pictures!  Full-sized cabinet for ~$700. Believe me, if I can do it, so can you!

"Making anything with your hands goes wonderfully with whatever in your life you would consider your grind." ~Nick Offerman


#878 djlunchbox

djlunchbox

    Enthusiast

  • Members
  • PipPipPip
  • 157 posts

  • Flag: El Salvador

  • Favorite Pinball: WCS 94, Theatre of Magic, TOTAN

Posted 30 October 2019 - 09:55 PM

Are there ways to change/modify the script parameters for launching FX3 tables? I think it currently launches it in Single player but I think for newer williams tables with the updated physics you gotta launch Hot Seat? 



#879 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 31 October 2019 - 12:42 AM

Are there ways to change/modify the script parameters for launching FX3 tables? I think it currently launches it in Single player but I think for newer williams tables with the updated physics you gotta launch Hot Seat? 

 

Sure - just go to the options and edit the launch parameters for the system.



#880 djlunchbox

djlunchbox

    Enthusiast

  • Members
  • PipPipPip
  • 157 posts

  • Flag: El Salvador

  • Favorite Pinball: WCS 94, Theatre of Magic, TOTAN

Posted 09 November 2019 - 06:32 PM

Figured it out. Change the launch line to this to get the of physics to play

applaunch 442120 -class "-table_[TABLEFILE]"