Creating aliases

Shari shari at gypsyware.com
Sat Nov 6 17:20:06 EST 2004


I'm just round and round in circles with everything today.  Aaarrrggghhhh!

I could swear I had this working before.  But now it is broken.  It 
works on Windows, but not on OSX.  It's in a standalone.

on createAlias

   global gPlat # denotes the platform

   put specialFolderPath(Desktop) & "/myProgram" into theAlias
   put the effective filename of stack "myProgram" into theFile

   if gPlat is "W" then # windows
     put ".lnk" after theAlias
   end if

   if there is a file theAlias then
     exit createAlias
   end if

# fails totally with the following, and without it creates an alias 
with no icon that doesn't work
   if gPlat is "X" then
     set the itemDel to "/"
     repeat 3
       delete the last item of theFile
     end repeat
     set the itemDel to comma
   end if

   create alias theAlias to file theFile

end createAlias
-- 
Mac and Windows shareware games
http://www.gypsyware.com


More information about the metacard mailing list