Using PB to open a mouse selected file on Desktop
Posted: Thu Dec 17, 2020 9:14 pm
Is it possible write a PB program that can be used to open a mouse selected file on the main 'Desktop?
For example:
When you click on an object in a 'PB window', you get a response reaction.
For instance if you click on a ButtonGadget, it activates to what ever you have it programmed to do.
On the main 'Desktop screen'. When ever you click on a text file (txt), it opens up under the default program of notepad.
Is there any way to do something like that using PB? Perhaps by setting your PB program, as that files default program?
Here's the problem. I use notepad a lot for scratch notes when working on a project. But if not careful, I found that
you can actually open the same file more then once. This is not good, as you must always be sure to save the last edited
text file 'after closing' the other open files, or you chance losing every thing you edited on that file if you saved the wrong
one first. Believe me, it's happened to me, and on occasion, and too often, that I have lost everything I changed or edited!
That's why I was looking at the possibility if it were possible to do this using PB.
PB has some excellent code for detecting if a file is already opened, which could either be used to warn you of the fact,
or actually possibly switch to the one that is already opened. I would like to write a PB program that could be setup as the
default program for a text file, to first check if the file is already open and do the above, or if not, to use notepad to
open it and then exit my PB program.
Thanks for any input or ideas.
For example:
When you click on an object in a 'PB window', you get a response reaction.
For instance if you click on a ButtonGadget, it activates to what ever you have it programmed to do.
On the main 'Desktop screen'. When ever you click on a text file (txt), it opens up under the default program of notepad.
Is there any way to do something like that using PB? Perhaps by setting your PB program, as that files default program?
Here's the problem. I use notepad a lot for scratch notes when working on a project. But if not careful, I found that
you can actually open the same file more then once. This is not good, as you must always be sure to save the last edited
text file 'after closing' the other open files, or you chance losing every thing you edited on that file if you saved the wrong
one first. Believe me, it's happened to me, and on occasion, and too often, that I have lost everything I changed or edited!
That's why I was looking at the possibility if it were possible to do this using PB.
PB has some excellent code for detecting if a file is already opened, which could either be used to warn you of the fact,
or actually possibly switch to the one that is already opened. I would like to write a PB program that could be setup as the
default program for a text file, to first check if the file is already open and do the above, or if not, to use notepad to
open it and then exit my PB program.
Thanks for any input or ideas.