It is currently May 3rd, 2024, 11:38 pm

Opening apps

Get help with creating, editing & fixing problems with skins
user0000000000
Posts: 5
Joined: September 20th, 2023, 7:37 pm

Opening apps

Post by user0000000000 »

im currently using this skin - https://www.deviantart.com/apexxx-sensei/art/Delarge-737195900 - on my pc and ive changed the script a bit, but i can't seem to change the links option.

The current script is for the words to open the designated links:

Code: Select all

Text1= Craft
LocationPath1=!Execute ["https://docs.craft.do/"]

Text2= Facebook
LocationPath2=!Execute ["https://facebook.com/"]

Text3= Gmail
LocationPath3=!Execute ["https://mail.google.com/mail/"]

Text4= Pinterest
LocationPath4=!Execute ["https://www.pinterest.pt/"]

Text5= Youtube
LocationPath5=!Execute ["https://www.youtube.com/"]

Text6= Notion
LocationPath6=!Execute ["https://www.notion.so"]
I want to change the script to instead of opening links, directly to open apps.
I've honestly tried a lot of different ways but never successfully.
Some help would be appreciated!
Last edited by user0000000000 on September 21st, 2023, 10:09 am, edited 2 times in total.
User avatar
balala
Rainmeter Sage
Posts: 16198
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Opening apps

Post by balala »

user0000000000 wrote: September 20th, 2023, 7:46 pm I want to change the script to instead of opening links, directly to open apps.
I've honestly tried a lot of different ways but never successfully.
Some help would be appreciated!
Just replace the paths in the LocationPathX variable with the path of the file you want to open. For instance replace the LocationPath1=!Execute ["https://docs.craft.do/"] variable with LocationPath1=["C:\Windows\System32\mspaint.exe"] (just an example, use the right / desired path). Along with this replacement, most probably you'll want to replace the name stored as the TextX variable as well.
Note that besides replacing the URL with the file path, I removed the long-time-ago deprecated !Execute bang as well. Even if once it was required, in meantime (many years ago) it became deprecated and shouldn't be used. Still work for backward compatibility reasons, but it's not needed.
user0000000000
Posts: 5
Joined: September 20th, 2023, 7:37 pm

Re: Opening apps

Post by user0000000000 »

balala wrote: September 20th, 2023, 8:12 pm Just replace the paths in the LocationPathX variable with the path of the file you want to open. For instance replace the LocationPath1=!Execute ["https://docs.craft.do/"] variable with LocationPath1=["C:\Windows\System32\mspaint.exe"] (just an example, use the right / desired path). Along with this replacement, most probably you'll want to replace the name stored as the TextX variable as well.
Note that besides replacing the URL with the file path, I removed the long-time-ago deprecated !Execute bang as well. Even if once it was required, in meantime (many years ago) it became deprecated and shouldn't be used. Still work for backward compatibility reasons, but it's not needed.
Hey! Ive tried this method before, but it does not seem to work. If i remove the ".exe." it will simply open the app file location, if i add it, it does not open anything.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Opening apps

Post by eclectic-tech »

user0000000000 wrote: September 21st, 2023, 10:05 am Hey! Ive tried this method before, but it does not seem to work. If i remove the ".exe." it will simply open the app file location, if i add it, it does not open anything.
This method works every time... :Whistle
Make sure you use the same syntax (with quotation marks and brackets).

If you are sure you have the correct path and filename, then the fact you "changed the script a bit" may be causing a problem.

Suggestion: Re-install the Delarge package to get the original code, then try making the changes.
User avatar
balala
Rainmeter Sage
Posts: 16198
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Opening apps

Post by balala »

user0000000000 wrote: September 21st, 2023, 10:05 am Hey! Ive tried this method before, but it does not seem to work. If i remove the ".exe." it will simply open the app file location, if i add it, it does not open anything.
If eclectic-tech's recommendations don't help, post please here the exact variable you've tried and didn't work. Post it as you have it in your code.
user0000000000
Posts: 5
Joined: September 20th, 2023, 7:37 pm

Re: Opening apps

Post by user0000000000 »

eclectic-tech wrote: September 21st, 2023, 2:08 pm This method works every time... :Whistle
Make sure you use the same syntax (with quotation marks and brackets).

If you are sure you have the correct path and filename, then the fact you "changed the script a bit" may be causing a problem.

Suggestion: Re-install the Delarge package to get the original code, then try making the changes.
I've deleted it as you said, and now only changed one of the links script. Yet it does not open anything, idk what im doing wrong.

Ps:. I tried deleting the ".exe" at the end and it worked! Thank you a lot!! :bow:
Last edited by user0000000000 on September 22nd, 2023, 3:16 pm, edited 2 times in total.
user0000000000
Posts: 5
Joined: September 20th, 2023, 7:37 pm

Re: Opening apps

Post by user0000000000 »

Ok it actually worked! I had to remove the ".exe" tho. Thanks a lot :rolmfao:
User avatar
balala
Rainmeter Sage
Posts: 16198
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Opening apps

Post by balala »

user0000000000 wrote: September 22nd, 2023, 3:10 pm Ok it actually worked! I had to remove the ".exe" tho. Thanks a lot :rolmfao:
I honestly, hardly can believe. Might be I am missing something, but if it works by removing the extension, should work when you have the extension as well.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Opening apps

Post by CodeCode »

user0000000000 wrote: September 22nd, 2023, 3:10 pm Ok it actually worked! I had to remove the ".exe" tho. Thanks a lot :rolmfao:
It may also work more consistently by removing the square brackets and enclosing the entire path in single double quotes: "<path>" or even double double quotes: ""<path>"" but unless other options like the square brackets are working, these are a couple alternatives.

Also be sure not to have the backslash \ after a file extension like an .exe file.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16198
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Opening apps

Post by balala »

user0000000000 wrote: September 22nd, 2023, 3:06 pm I've deleted it as you said, and now only changed one of the links script. Yet it does not open anything, idk what im doing wrong.

Ps:. I tried deleting the ".exe" at the end and it worked! Thank you a lot!! :bow:
CodeCode is perfectly right in his reply. What you have to do is to enclose the path into double double quotes. The brackets may remain, but the quotes are needed. I'd try something like this: LocationPath1="["c:\Program Files\Folder\File.exe"]" (see the relative position of the quotes and brackets) or this: LocationPath1=""c:\Program Files\Folder\File.exe"" (no brackets at all).
Don't delete the extension.