It is currently September 21st, 2021, 5:28 pm

NXT-OS - Custom Center action to open web browser?

Help with creating, editing & fixing problems with skins
User avatar
Netherspark
Posts: 7
Joined: February 23rd, 2016, 1:41 pm

NXT-OS - Custom Center action to open web browser?

Post by Netherspark »

I use NXT-OS for it's dock skin, and because I use the internet browser more than all the other buttons I want to make the Center icon open my web browser. You can set a custom action for it in the menu but it can't seem to run applications, nor does it pay attention to folder paths.

I want it to open Firefox but it just doesn't work. The best I've managed to do is get it to run a shortcut that points to Firefox, but this is not ideal. And if I move that shortcut into a folder it just refuses to trigger it despite using the correct file path.

I think it may accept shell commands (things that start with "[Shell:::" etc). Is there a way to run an application like Firefox via a shell command like that?
User avatar
Yincognito
Rainmeter Sage
Posts: 4052
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: NXT-OS - Custom Center action to open web browser?

Post by Yincognito »

Netherspark wrote: July 18th, 2021, 11:19 pm I use NXT-OS for it's dock skin, and because I use the internet browser more than all the other buttons I want to make the Center icon open my web browser. You can set a custom action for it in the menu but it can't seem to run applications, nor does it pay attention to folder paths.

I want it to open Firefox but it just doesn't work. The best I've managed to do is get it to run a shortcut that points to Firefox, but this is not ideal. And if I move that shortcut into a folder it just refuses to trigger it despite using the correct file path.

I think it may accept shell commands (things that start with "[Shell:::" etc). Is there a way to run an application like Firefox via a shell command like that?
It certainly works to run applications or use folder paths for me:
Chrome.jpg
The only problem I could see is that when navigating through the path and then clicking the .EXE, it doesn't "visually" select the application (i.e. it shows no "marker" from what I've seen), but clicking the Select button in that skin will then correctly add your program to the dock.
You do not have the required permissions to view the files attached to this post.
User avatar
Netherspark
Posts: 7
Joined: February 23rd, 2016, 1:41 pm

Re: NXT-OS - Custom Center action to open web browser?

Post by Netherspark »

Yeah, the regular icons work fine, but I'm talking specifcally about the "center" icon - the NXT logo that by default opens the overlay launcher. The custom action setup for it is abysmal.
User avatar
Yincognito
Rainmeter Sage
Posts: 4052
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: NXT-OS - Custom Center action to open web browser?

Post by Yincognito »

Netherspark wrote: July 28th, 2021, 7:58 pm Yeah, the regular icons work fine, but I'm talking specifcally about the "center" icon - the NXT logo that by default opens the overlay launcher. The custom action setup for it is abysmal.
Ah, I see what you mean now. There is actually a custom action setup for that, configuring the dock by:
Right Clicking On It -> Dock Settings -> Dock (from left sidebar) -> Center Button Action (choose Custom) -> Custom Button Action (input command here)
DockConf.jpg
but although you can type the right command there, i.e. for Chrome:

Code: Select all

["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"]
pressing Enter afterwards doesn't seem to do what it's suposed to do and store that command, so I guess it's a design flaw there, despite stuff appearing to be more or less OK in ...\NXT-OS\Settings\Dock.ini:
Actions.jpg
That being said, without bothering to see what's wrong and how it can be corrected (it's quite a nice skin, but not my job to do), you can directly edit the ...\NXT-OS\@Resources\Settings.inc file, look for the Dock.CenterAction variable and set it as desired - for example, in my case, to ["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"]. Save the file, refresh the skin (or unload/reload), and you're good to go:
Settings.jpg
Don't try to edit that setting through the Dock settings anymore, as it won't work and will actually produce some strange results (leaving only a square bracket in the input box, LOL).

Regarding the shell commands, maybe some reading about Launching Windows Special Folders would help you get familiar to that. It shouldn't be needed for the above since by now you should have made it work already, but in case you encounter such situations in the future.
You do not have the required permissions to view the files attached to this post.
User avatar
Netherspark
Posts: 7
Joined: February 23rd, 2016, 1:41 pm

Re: NXT-OS - Custom Center action to open web browser?

Post by Netherspark »

Right, this is what I've already tried but it doesn't work. The problem seems to be the space - if there's a space anywhere in a name it won't work.

A quick test I just did: Put the Firefox shortcut in a folder on C: and point NXT to it, it works fine. Put a single space in that folder name, update the path and it will just stop doing anything at all.

The shell commands seem to be working though. Is it possible to launch Firefox this way, and if so how do I find out the CLSID identifier code for it?
User avatar
Yincognito
Rainmeter Sage
Posts: 4052
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: NXT-OS - Custom Center action to open web browser?

Post by Yincognito »

Netherspark wrote: July 28th, 2021, 11:06 pm Right, this is what I've already tried but it doesn't work. The problem seems to be the space - if there's a space anywhere in a name it won't work.

A quick test I just did: Put the Firefox shortcut in a folder on C: and point NXT to it, it works fine. Put a single space in that folder name, update the path and it will just stop doing anything at all.

The shell commands seem to be working though. Is it possible to launch Firefox this way, and if so how do I find out the CLSID identifier code for it?
Are you sure you enclosed the path to the file between quotes? That is required when there are spaces in it.
Regarding the test, as you can see from my screenshots, there are spaces in the path I edited in the above file, and it worked without issues (opened Chrome both times I tried) - just not when trying to configure stuff from the skin itself.

Don't know about the shell commands - Firefox is not a part of the Windows operating system (just like any 3rd party software, including Chrome), so I doubt they have CLSID-s. But you can try checking the link above and see if you can get closer (even if you execute Run through a shell command, you'd still have to type Firefox or its path, I reckon).