Page 1 of 1
Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 5:29 pm
by hrcap
Hi All
I hope that everyone is having a good weekend.
Is there a way to create a shortcut to an internet webpage on the users desktop, I know how to create a file alias on the desktop using the 'create alias' command but I can't get that to work for a webpage shortcut.
Many Thanks
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 5:32 pm
by richmond62
Do you want to do that using LiveCode?
Shortcuts are implemented in different ways in different operating systems, and in the Linux world
in different ways in different windowing environments and so on.
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 5:35 pm
by hrcap
Hi Richmond
Ideally yes, I have a database which stores links to documents in dropbox, I would like to be able to create shortcuts to these web links, much the same as how the create alias command works, only opening a web page and not a file.
Many Thanks
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 5:43 pm
by Klaus
Hi hrcap,
Mac:
This is how a .webloc file looks like.
It is plain XML on the Mac, I just dragged the LC forum url from Safari to my desktop:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://forums.livecode.com/index.php</string>
</dict>
</plist>
No idea about windows, sorry.
Best
Klaus
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 6:33 pm
by richmond62
No idea about windows, sorry.
And Linux with GNOME, XFCE, LXDE and so on?
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 6:39 pm
by hrcap
Lovely Thanks Klaus
I am trying to upload an example stack that I have just created but it is telling me that .livecode is an invalid file extension to upload to the forum?
Many Thanks
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 6:46 pm
by Klaus
ZIP the stack and then upload!
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 6:48 pm
by Klaus
richmond62 wrote: ↑Sun Aug 30, 2020 6:33 pm
No idea about windows, sorry.
And Linux with GNOME, XFCE, LXDE and so on?
And also no idea about Linux with GNOME, XFCE, LXDE and so on.
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 6:50 pm
by hrcap
Thank Klaus (we'll get there in the end)
Please find attached stack which creates Mac web shortcuts.
I assume it would work very much the same for Windows but would just need to have the XML and .extension that is relevant to the Windows OS.
Many Thanks
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 7:26 pm
by ghettocottage
Why not just create an html page with a redirect to your link ( link.html ) with the content something like:
Code: Select all
<html>
<head>
<title>redirects to link after 1 second</title>
<meta http-equiv="refresh" content="1; URL=http://livecode.digio.space/">
<meta name="keywords" content="automatic redirection">
</head>
<body>
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 7:49 pm
by hrcap
Thanks for the HTML suggestion
I have attached updated version of the example to include this.
I assume the HTML shortcut will work regardless of Windows of Mac?
Many Thanks
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 8:33 pm
by ghettocottage
I am running linux ( Ubuntu 20.04). It works for me. It asks where I want to save it and for a file-name and then it creates the html file.
My linux machine defaults to opening HTML documents with the default browser, so firefox opens when I click on the saved html file.
If I remember correctly, Windows does the same thing.
Some developers might have HTML documents set to open with a text editor, but they would still see the link and know what it means.
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 8:48 pm
by hrcap
That’s excellent, thank you very much for the feedback and help
Re: Create Shortcut to Internet Web Page
Posted: Sun Aug 30, 2020 8:50 pm
by richmond62
That works perfectly well on Xubuntu 20.04.
