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.
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.
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.
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...
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.
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.
eclectic-tech wrote: ↑September 21st, 2023, 2:08 pm
This method works every time...
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!!
Last edited by user0000000000 on September 22nd, 2023, 3:16 pm, edited 2 times in total.
user0000000000 wrote: ↑September 22nd, 2023, 3:10 pm
Ok it actually worked! I had to remove the ".exe" tho. Thanks a lot
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.
user0000000000 wrote: ↑September 22nd, 2023, 3:10 pm
Ok it actually worked! I had to remove the ".exe" tho. Thanks a lot
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.
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!!
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.