Page 1 of 1
Multiple program instances
Posted: Sat Aug 31, 2024 11:49 am
by jak64
Hello everyone,
I wrote a program that allows me to listen to more than 15,000 songs (Songs, Music, Classical), by being able to choose one or more languages for the songs, by being able to choose the decades (60s, 70s, etc.).
when I use it on a touchscreen computer or a SURFACE tablet, I sometimes launch the program several times at the same time, when I tap on the shortcut!
Is there a way to be able to launch only one instance of my program (just like on VLC where there is a setting that only allows one instance)?
Thank you
Re: Multiple program instances
Posted: Sat Aug 31, 2024 12:13 pm
by BarryG
Man, you really need to search these forums. Your question has been answered hundreds of times over the years.
From 2003 ->
https://www.purebasic.fr/english/viewtopic.php?p=624766
From 2012 ->
https://www.purebasic.fr/english/viewto ... 89#p377789
You can search for the others.
Re: Multiple program instances
Posted: Sun Sep 01, 2024 8:00 am
by TI-994A
Thanks for the link, Barry.
Please allow me to add that this method not only prevents multiple instances of an app from launching, but it also relays the parameters of the new launch attempt to the running instance. So, a selected file associated with the app would still execute, but on the running instance.
Re: Multiple program instances
Posted: Sun Sep 01, 2024 10:40 am
by jak64
Thanks BarryG and TI-994A.
As I wrote in another post, I am French and do not speak English (I am 69 years old). I use Google translate to write my posts, that's why I have difficulties searching on the English forum.
Re: Multiple program instances
Posted: Sun Sep 01, 2024 10:59 am
by BarryG
jak64 wrote: Sun Sep 01, 2024 10:40 amI am French and do not speak English (I am 69 years old). I use Google translate to write my posts, that's why I have difficulties searching on the English forum.
Oh, sorry.

Re: Multiple program instances
Posted: Sun Sep 01, 2024 1:34 pm
by jak64
Here are some pieces of screen copies of my program to read my music
1) Here, I chose French and English songs from the 60s and 70s and I play them randomly
https://u.pcloud.link/publink/show?code ... K574eQK0l7
2) There, I chose music by selecting accordion and trumpet
https://u.pcloud.link/publink/show?code ... 5Jv00hTKLX
3) I chose Classical and Beethoven and Mozart
https://u.pcloud.link/publink/show?code ... yKRjSxvdhk
Actually, I can choose whatever I want, for example English songs and music from the 2000s, 2010s and 2020s, etc...
I also manage favorites (I like) and I can copy my favorites (I like) on a USB key or others...
I can also put aside the music that I don't like...
Ps: Before, with pcloud, I was able to put the photos directly in my post, but the site has evolved and apparently, I can't do it anymore, that's why only the links to the screenshots appear...
Re: Multiple program instances
Posted: Sun Sep 01, 2024 2:01 pm
by Kiffi
jak64 wrote: Sun Sep 01, 2024 1:34 pmPs: Before, with pcloud, I was able to put the photos directly in my post, but the site has evolved and apparently, I can't do it anymore, that's why only the links to the screenshots appear...
I recommend
imgur.com (in combination with
ShareX):

Re: Multiple program instances
Posted: Sun Sep 01, 2024 2:05 pm
by Martin Verlaan
Nice! I wrote a similar Purebasic program years ago

Re: Multiple program instances
Posted: Sun Sep 01, 2024 2:34 pm
by jak64
Thanks Kiffi and Martin Verlaan.
Have a nice Sunday