DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: An idea for a "Toggled App" button -- thoughts?  (Read 6,457 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
An idea for a "Toggled App" button -- thoughts?
« on: August 20, 2013, 08:00 AM »
I was thinking of adding a new kind of command button for launchbars, a "Toggled App" button.

It would work like this:

You set up a button for an application, let's say "Firefox.exe".

When you press the button, LBC would start firefox if it's not already running, or terminate it if it is already running.

We would probably want some kind of option to change the way the button looks based on whether it's running or not.. Like gray out the icon if it's (not) running..

Useful or no? I suppose that, except for the graying out, one could already do this by using a standalone commandline utility to run or terminate another executable based on whether it's already running (that's a nice idea for a little coding snack).

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: An idea for a "Toggled App" button -- thoughts?
« Reply #1 on: August 20, 2013, 08:17 AM »
When you press the button, LBC would start firefox if it's not already running, or terminate it if it is already running.
Hm, sounds a bit dangerous. Maybe it should only terminate the instance if it was started from that same button? And start a new instance if it hadn't already started one.

Oh, and dangerous in case I'm running some webapp that requires me to log in, or keep a shopping-cart, that would loose it's session/data when terminated unexpectedly :o.
Alternatively the button could fire a new instance, then the next press would activate that instance, and a small part of the button could terminate the instance, like the X button on a normal window?
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: An idea for a "Toggled App" button -- thoughts?
« Reply #2 on: August 20, 2013, 08:24 AM »
well this wouldn't be the default action, this would only be set up manually by user for certain kinds of apps.  so presumably you wouldn't use it in cases where it could have potential to cause problems.

Vurbal

  • Mostly harmless
  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 653
    • Writer
Re: An idea for a "Toggled App" button -- thoughts?
« Reply #3 on: August 21, 2013, 06:08 AM »
How about instead of just open and close you could assign different options for the right and left mouse buttons when the program is running? One button could bring it to the foreground or minimize it and the other could close it.

That would be great for all kinds of programs you might just want to check periodically and then dismiss without actually exiting.
I learned to say the pledge of allegiance
Before they beat me bloody down at the station
They haven't got a word out of me since
I got a billion years probation
- The MC5

Follow the path of the unsafe, independent thinker. Expose your ideas to the danger of controversy. Speak your mind and fear less the label of ''crackpot'' than the stigma of conformity.
- Thomas J. Watson, Sr

It's not rocket surgery.
- Me


I recommend reading through my Bio before responding to any of my posts. It could save both of us a lot of time and frustration.

Original address: https://www.donationcoder.com/forum/index.php?topic=35836.0