Trevliga Spel forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Open any app or file

3 posters

Go down

Open any app or file Empty Open any app or file

Post by jordikt Sun Nov 10, 2024 3:24 pm

It would be very useful to have a script action to open/activate any app or file. 

Something like:

[(midi:cc,1,1) {launch:/Applications/StatusBar_GlobalMute.app}]

or

[(midi:cc,1,1) {launch:/Users/jordi/KH/boqod FAS/boqod FAS Database.ods}]

If the app/file is not running/opened, the action would open it. If the app/file is already running/opened, the action would bring it to the front.
jordikt
jordikt

Posts : 290
Join date : 2024-02-10

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by Admin Sun Nov 10, 2024 6:46 pm

It's a bit off-topic, I think, but I can add it to the wish list. Very Happy
Admin
Admin
Admin

Posts : 1247
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by jordikt Sun Nov 10, 2024 9:23 pm

off-topic? why?
jordikt
jordikt

Posts : 290
Join date : 2024-02-10

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by Admin Sun Nov 10, 2024 10:57 pm

It's off-topic because the plugin was built to handle Midi. Period. It handles Midi communication and the Stream Deck button/dial displays.

Technically, it is, of course, possible to extend the Midi plugin to handle all sorts of tasks on the computer: open files, start programs, start and stop processes, move windows, create/copy/delete files, create/copy/delete folders, edit files, control other things than Midi, and so on. But it's like starting to integrate the complete Stream Deck infrastructure into the plugin.

An option to open files and programs is a first step in that direction, and I don't know if that's where I want to put the developer resources. I'd rather focus on extending the plugin's Midi capabilities.
Admin
Admin
Admin

Posts : 1247
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by jordikt Tue Nov 12, 2024 9:05 am

I see it in a different way.

IMO, an action for running an app is equivalent/similar to the current keystroke action {key:}. You could consider that both actions are not related with the midi world, but both are extremely useful.

In fact, running apps and controlling shortcuts has been always available actions in the main midi apps.

One of the main advantages of running apps from a midi software is that users can create and run their own apps for executing specific tasks, to control other things than Midi.

So (taking the examples of your previous post), if a user wants to start or stop a process, move a window, create/copy/delete files, create/copy/delete folders, edit files, etc. after receiving a midi message, he could do it creating an specific app for that task.

In summary, an scripting action for running apps would allow users to configure its system as they need. In my case, I would like to show some dialogs and notifications after pressing buttons or after receiving midi messages.

Let me finish saying that I don't think that an action for running apps is an opened door to loose the focus and extend the midi plugin to a long list of tasks on the computer. I think it's the opposite: running apps and managing keystrokes closes the door to that, as users that can manage apps and keystrokes can do anything they need.
jordikt
jordikt

Posts : 290
Join date : 2024-02-10

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by Admin Tue Nov 12, 2024 4:50 pm

I expected the "key action" argument. Smile

OK, I'll add it to the wish list. I am a bit worn out and low on energy after my mother's demise, so I'm struggling to finalize the 3.12 release.

After the release of 3.12, I need a break, and after that, I can take a look at what to do next.
Admin
Admin
Admin

Posts : 1247
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by jordikt Tue Nov 12, 2024 5:31 pm

Admin wrote:I am a bit worn out and low on energy after my mother's demise, so I'm struggling to finalize the 3.12 release.
I know you are going though a bad time, I can feel it.

I strongly support your decission to make a break after next release. Take care of yourself and rest all the time you need. You deserve it. Just come back when you feel it's the time to do it!  Very Happy
jordikt
jordikt

Posts : 290
Join date : 2024-02-10

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by thx538 Thu Nov 14, 2024 12:31 pm

Yes, Have a good rest ! You really deserve it.

I'll be delighted to contribute when it's time to discuss the next steps.

thx538

Posts : 130
Join date : 2023-10-23

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by Admin Fri Nov 15, 2024 11:29 am

jordikt wrote:...If the app/file is not running/opened, the action would open it. If the app/file is already running/opened, the action would bring it to the front.

Would it still be interesting if it cannot detect if the app is already running? I can't see any reliable way to do that, especially not on a Mac.
Admin
Admin
Admin

Posts : 1247
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by jordikt Fri Nov 15, 2024 1:16 pm

Admin wrote:Would it still be interesting if it cannot detect if the app is already running?
Yes, it's ok if the action only launches the app.

Just an idea: maybe it's not necessary to know if the app is running or not. For example, the following line of AppleScript launches the app if it's not running or moves it to the frontmost if it's already running. So you don't need to know if it's running or not:

tell application "nameOfTheApp" to activate

In Applescript it's easy to know if an app is running or not:

if application "nameOfTheApp" is running then
--action if running
else
--action if not running
end if

Don't know if this information helps... My knowledge is limited to AppleScript...
jordikt
jordikt

Posts : 290
Join date : 2024-02-10

Back to top Go down

Open any app or file Empty Re: Open any app or file

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum