Icon in Standalone

J. Landman Gay jacque at hyperactivesw.com
Thu Jun 19 23:10:08 EDT 2008


Randy Hengst wrote:
> 
> Jacque, I don't know how to use the terminal, but I had tried both of 
> your other suggestions.

Here's a script that doesn't need Terminal, you can run it in Rev. I 
mistakenly said it uses a shell command, but it uses AppleScript. Put 
this script into a button:

on touchAppFile
   answer file "Choose a stanadlone application:"
   if it = "" then exit touchAppFile
   put it into tAppName
   if char -4 to -1 of tAppName <> ".app" then
     beep
     answer error "Not an application file."
     exit touchAppFile
   end if
   put revMacFromUnixPath(tAppName) into tFilePath
   replace quote with "\"&quote in tFilePath -- escape
   put the cTouchScript of this cd into tScript
   replace "*FPATH*" with tFilePath in tScript
   do tScript as AppleScript
   get the result
   if it contains "error" then answer it
end touchAppFile

Then create a custom card property, call it "cTouchScript", and set the 
property contents to this:

tell application "Finder"
update file "*FPATH*"
end tell


When you click the button, it will ask you for an app and then update 
the Finder.

Scott Morrow's suggestion about checking the pList is a good one too, I 
hadn't thought of that. If the pList doesn't list your custom icons, 
then the Finder won't know about them.
-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list