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: kids issue --- any way to prevent more than 1 application from being run  (Read 1156 times)

0 Members and 1 Guest are viewing this topic.

big daddy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 179
  • Last login:May 01, 2019, 12:16:13 pm
  • I'm a llama!
I have some PC games on my arcade and my 3 year old loves to play them, but he gets overzealous (or impatient) and hits the button several times so several instances of the games start up.  This eventually causes focus problems and I'll have to break out the keyboard to "end task" some of the things. 

Occassionally I'll come in and there'll be like 3 or 4 different games running (Dora, Clifford, etc.)   :)

Anyways...is there anyway to prevent this (any sort of wrapper I can run or way to prevent multiple copies from opening?)

I also use Mamewah and can have the games kickoff from there, but it always loses focus (again probably from all the button mashing while the game is being started) and I end up having to break out the keyboard for that as well.

Any suggestions? (aside from actually teaching my kid not to do it...'cause he just doesn't seem to want to listen!)  "I pushed it once dad! (after he hits it 3 or 4 times)   :)

leapinlew

  • Some questionable things going on in this room with cheetos
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7919
  • Last login:July 27, 2025, 11:06:50 am
Re: kids issue --- any way to prevent more than 1 application from being run
« Reply #1 on: February 14, 2007, 11:48:04 pm »
If you have keys mapped to cntrl, alt, shift, or space - you should probably change those mappings for starters.

Also, this problem fixes itself in about 6-7 years.   ;)

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: kids issue --- any way to prevent more than 1 application from being run
« Reply #2 on: February 14, 2007, 11:59:18 pm »
I tried to tackle a similar problem yonkers ago, but I threw away the code. I just wasn't very happy with it. Essentially what I did was write a simple VB application where you would just pass in a launch string and the program would attempt to see if it was already launched.

Unfortunately, I wasn't very experienced at the time and the method I chose to see if a particular app was already launched was by writing a file out. If the program or OS crashed, it wouldn't let you launch it again. :( I figured a way to fix it, but by then, the need for having such a thing disappeared... or I lost interest... something like that. Basically, if I found this http://support.microsoft.com/kb/185730 I might've been better off.

I did a quick Google search and found the following links
http://www.windowsitpro.com/Article/ArticleID/37748/37748.html

I don't know if it'll work in XP or not and it's a VBS, which tends to set off some virus scanners.

I can find gobs of code in a variety of programming languages that can be modified to accomplish what you want. But I can't find any universal tool to accomplish it.

That should be an interesting and useful tool to make if there isn't one out there.

SavannahLion

  • Wiki Contributor
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5986
  • Last login:December 19, 2015, 02:28:15 am
Re: kids issue --- any way to prevent more than 1 application from being run
« Reply #3 on: February 15, 2007, 02:02:57 am »
OK, I've put together a quickie hack. Took me about 15 minutes to research and write the code using the samples, took me about 1.5 hours to remember how to use the Microsoft VB IDE. It'll probably take me another hour to remember how to build a setup package.

The code seems to run OK, but I'm only testing it on things like notepad, solitaire and whatever else.

How it works is pretty simple. Where ever you have a shortcut, add insert the path to the executable instead. For instance, if you have a shortcut to C:\windows\notepad.exe then change the short cut so it reads "C:\program files\SavannahLion\O1G.exe" C:\windows\notepad.exe (I'm just picking paths out randomly :P )

Now if you click on it, notepad (or whatever) should appear. Click on the shortcut again, no new program should appear.

Some things to consider.

The program launches whatever you ask it and it waits until the application shuts down. This could give the appearance of "dead shortcuts" if the application should be minimized.

It's not very bright. If you create two shortcuts to two different applications using this wrapper, then launch one, the other will not launch at all.

I'm not sure of any timing issues. I thought about throwing up a splash screen to block your little tyke from pushing more buttons but that's up to err... maybe I'll make it a configurable option next time if people wish.

Once the VB app calls the application, it appears to go to sleep. But I didn't track it for any long term effects.

My Windows coding is a bit rusty and the code is embarrasingly sloppy.  ::) This really should be written in something like C to keep the package size extremely small, but my Windows C skills are even rustier than my VB skills. :cry: :banghead:

As always, please run a virus scanner. I trust my PC, but I don't expect anyone else too.

I don't see an option to upload files here, so I guess I'll upload it to my project site server.
« Last Edit: February 15, 2007, 02:05:06 am by SavannahLion »

big daddy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 179
  • Last login:May 01, 2019, 12:16:13 pm
  • I'm a llama!
Re: kids issue --- any way to prevent more than 1 application from being run
« Reply #4 on: February 15, 2007, 11:06:26 am »
wow, thanks for the effort on this!  I'll give it a try.  Thanks again!