<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Desktop alias</title></head><body>
<div><font size="+1">My standalone creates a desktop alias when first
launched, however the alias does not work. Also, the alias is
named GoldCarbonMach-0, and I'd like it to be named Blackjack Gold.
This is for OSX.</font></div>
<div><font size="+1"><br></font></div>
<div><font size="+1">Note: Double clicking the alias nothing
happens, not even a dialog to find the original. Get Info
however, does show the correct filepath to the original.</font></div>
<div><font size="+1"><br></font></div>
<div><font size="+1">Have not tested Windows or PPC yet.</font></div>
<div><font size="+1"><br></font></div>
<div><font size="+1" color="#000000"># create desktop alias<br>
set the itemDel to "/"<br>
put specialFolderPath(Desktop) & "/Blackjack Gold.lnk"
into aliasName<br>
put the effective filename of stack "Blackjack Gold"
into fileLocation<br>
put "Blackjack Gold alias" into nameIt<br>
if gPlat is "W" then # Windows<br>
create alias(aliasName) to file
fileLocation</font></div>
<div><font size="+1" color="#000000"><br>
else if gPlat is "X" then # OSX<br>
delete the last item of aliasName<br>
replace "/" with ":" in
aliasName<br>
put ":" after aliasName #
:Users:UserName:Desktop:<br>
replace "/" with ":" in
fileLocation<br>
put "tell application" &&
q("Finder") & cr & \<br>
"set tFile to"
&& q(fileLocation) & cr & \<br>
"make alias file to
tFile at" && q(aliasName) & cr & \<br>
"end tell" into
tScript<br>
do tScript as AppleScript</font></div>
<div><font size="+1" color="#000000"><br>
else if gPlat is "P" then # Mac Classic<br>
delete the last item of aliasName<br>
put " alias" after aliasName<br>
replace "/" with ":" in
aliasName<br>
replace "/" with ":" in
fileLocation<br>
create alias(aliasName) to file fileLocation<br>
end if<br>
set the itemDel to comma<br>
# end create alias</font><br>
<font size="+1" color="#000000"></font></div>
<div><font size="+1" color="#000000">function q pWhat # put quotes
around it<br>
return quote & pWhat & quote<br>
end q</font></div>
<div><br></div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div>Mac and Windows shareware games<br>
http://www.gypsyware.com</div>
</body>
</html>