[TxMt] Re: Running an AppleScript

Allan Odgaard throw-away-1 at macromates.com
Sun Apr 1 02:54:56 UTC 2007


On 1. Apr 2007, at 03:14, Tim Mansour wrote:

> On 01/04/2007, at 3:47 am, Jacob Rus wrote:
>> I think this sounds overly complex and a bit silly (at least for  
>> languages based on latin characters), but there it is.  It was  
>> just surprising to me, as I hadn't seen a Mac Roman encoded email  
>> in years (or at least not noticed it).  So I guess there's nothing  
>> you can do.
> Well I guess I'll just have to avoid typing ­

For the records, the iconv solution is:

     iconv -f utf-8 -t mac <<-APPLESCRIPT|osascript
     set title to "${TM_SELECTED_TEXT}"
     if title ­ "" then
         tell application "FileMaker Pro Advanced"
             if not (exists window "HachetteTitles") then open alias  
"Path:To:My:Database.fp7"
             set cell "_Search" of layout "Titles" to title
             do script "Search For Title"
             set href to cell "_Search" of layout "Titles"
             set img to cell "_thumb" of layout "Titles"
         end tell
         if href ­ "" then set title to img & href
     end if
     return title
     APPLESCRIPT





More information about the textmate mailing list