MC IDE v2.6b12

Tariel Gogoberidze tariel at mac.com
Fri Jan 27 17:49:58 CST 2006


On Jan 26, Richard Gaskin wrote:

>> ----------
>> on linkClicked pLink
>>   if "@" is in pLink then revMail pLink
>>   else revGoUrl pLink
>> end linkClicked
>>
>> Not too long, rather easy :-)
>>
>> Best Regards from Paris,
>> Eric Chatonet
>> ------------

>
>> And may be revGoUrl handler could be added to MC IDE ?. Unless Rev  
>> Inc.
>> has something against it of course.
>> It's commonly used in posted stacks and would add more compatibility  
>> to
>> MC IDE.
>
> For copyright reasons we can't include Rev's handlers directly in the  
> MC
> IDE distribution.  We can, however, create a library importer.
> Currently one needs Rev anyway to get the engine, and with some of the
> changes in an upcoming release of Rev it may be beneficial to require a
> Rev install somewhere on the drive to draw parts from anyway.
>
> I would rather wait for the next Rev release before adding such a
> critter to MC, but in the meantime if someone wants to make a plugin  
> for
> importing Rev libs I see no reason not to.
>
>

OK, but actually it's not necessary to use RevGoURL to  add URL link  
and "@" mail recognition to answer dialog,

Ken Ray posted his excellent  "stsGoURL pURL" script  that does just  
that on both MC and Rev lists a while ago.

May be, with Ken's permission of course,  this script can be added to  
answer dialog?

Richard, you did a great job improving answer dialog in MC IDE and  
making it HIG complaint and it's already excepts HtmlText.
  Wouldn't it be nice  to have a  link recognition in it as well?

Just in case you would consider this and Ken is OK with it, I would  
copy Ken's posted script below

-------------------------------
on linkClicked pLink
   stsGoURL pLink
end linkClicked

on stsGoURL pURL
   put char 1 to offset(":",pURL) of pURL into tProtocol
   if (char 1 to 6 of pURL = "file:/") and (char 7 of pURL <> "/") then
     -- convert to local path with three ///
     replace "file:/" with "file:///" in pURL
   else
     put "file:,http:,mailto:,gopher:,aim:" into tProtocols
     if tProtocol is not among the items of tProtocols then
       -- assume web
       put "http://" & pURL into pURL
       put false into tIsIM
     end if
   end if
   switch (the platform)
   case "MacOS"
     if isOSX() then
       get shell("open" && q(pURL))
     else
       do ("open location" && q(pURL)) as AppleScript
     end if
     break
   case "Win32"
     put (word 1 of the systemVersion is "NT") into tIsNT
     if $COMSPEC <> "" then
       set the shellCommand to $COMSPEC
     else
       if tIsNT then
         set the shellCommand to "cmd.exe"
       else
         set the shellCommand to "command.com"
       end if
     end if
     switch tProtocol
     case "mailto:"
       put queryRegistry("HKEY_CLASSES_ROOT\mailto\shell\open\command\")  
into tMailApp
       -- replace placeholders for all Win versions (%1 for non-XP  
modern, %l for old, %ProgramFiles% for XP)
       replace q("%1") with pURL in tMailApp
       replace "%1" with pURL in tMailApp
       replace q("%l") with pURL in tMailApp
       replace "%l" with pURL in tMailApp
       replace "%ProgramFiles%" with $PROGRAMFILES in tMailApp
       open process tMailApp for neither
       break
     case "aim:"
       -- Example:
       --    aim:goim?screenname=binentertainment&message=This+is+a+test
       put  
queryRegistry("HKEY_LOCAL_MACHINE\Software\classes\aim\shell\open\comman 
d\") into tAIMApp
       replace q("%1") with pURL in tAIMApp
       replace "%1" with pURL in tAIMApp
       open process tAIMApp for neither
       break
     default
       put word 1 of  
queryRegistry("HKEY_LOCAL_MACHINE\Software\classes\http\shell\open\comma 
nd\") into tBrowserPath
       if tIsNT then
         set the hideconsolewindows to false
         open process (tBrowserPath && q(pURL)) for neither
       else
         get shell(tBrowserPath && q(pURL))
       end if
       break
     end switch
   end switch
end stsGoURL

function isOSX
   set the itemDel to "."
   return (item 1 of the systemVersion >=10)
end isOSX

function q pWhat
   return quote & pWhat & quote
end q
----------------------------

best regards
Tariel



More information about the metacard mailing list