create an alias on the dock of OSX

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

create an alias on the dock of OSX

Post by jmburnod »

Hi All

Is there a way to create an alias on the dock
I readed the entry for createalias in dictinary but
i didnt a doc about dock path

Jean-Marc
https://alternatic.ch
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: create an alias on the dock of OSX

Post by Klaus »

Bonjour Jean-Marc,

this is only possible via AppleScript or SHELL (first hit in GOOGLE :-)):
http://hints.macworld.com/article.php?s ... 9170450489

Best

Klaus
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: create an alias on the dock of OSX

Post by Mark »

Hi Jean-Marc,

Before following Klaus' advice, you need to check whether the item already exists in the dock. If it already exists, you don't want to add it again.

Use the following line to retrieve info about all the items in the dock:

Code: Select all

put shell("defaults read com.apple.dock persistent-apps") into myDockItems
Now parse the info in myDockItems and check if it contains your item. If it does't, then proceed as suggested by Klaus.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: create an alias on the dock of OSX

Post by jmburnod »

Hi Klaus and Mark,

Thank
I'll cooking with shell first time

Best

Jean-Marc
https://alternatic.ch
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: create an alias on the dock of OSX

Post by FourthWorld »

If you plan on submitting your app to the forthcoming OS X App Store, you may want to skip this feature. IIRC apps that install icons to the Dock will be rejected from the new App Store.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: create an alias on the dock of OSX

Post by jmburnod »

Hi Richard,
If you plan on submitting your app to the forthcoming OS X App Store, you may want to skip this feature. IIRC apps that install icons to the Dock will be rejected from the new App Store.
Thank for this

All the best

Jean-Marc
https://alternatic.ch
Post Reply