Re: URL Encoding
Re: URL Encoding
- Subject: Re: URL Encoding
- From: Andy Wylie <email@hidden>
- Date: Sat, 06 Apr 2002 02:01:15 +1200
on 6/4/02 12:01 AM, has at email@hidden wrote:
>
tell application "tanaka server" to MTEncodeURL(someURL)
>
>
>
Probably going to be fairly slow,
>
--fast...
script tidMachine
property tidResult : ""
on tidStr(myStr, findStr, replaceWith, previousState)
set AppleScript's text item delimiters to findStr
set x to (myStr's text items)
set AppleScript's text item delimiters to replaceWith
set tidResult to x as string
set AppleScript's text item delimiters to previousState
end tidStr
on pathToURL(myStr)
{tidStr(myStr, ":", "/", ""), tidStr(tidResult, " ", " ", "")}
return "file:///" & (tidResult)
end pathToURL
on URLTopath(myStr)
{tidStr(myStr, " ", " ", ""), tidStr(tidResult, "/", ":", ""),
tidStr(tidResult, "file:///", "", "")}
return (tidResult)
end URLTopath
end script
set myStr to (choose file) as string
tell tidMachine to set myURL to pathToURL(myStr)
-- "file:///kevin/Desktop Folder/Calendar"
tell tidMachine to set filePath to URLTopath(myStr)
-- "kevin:Desktop Folder:Calendar"
>
>
What other cool grooviness will it introduce?)
>
cool grooviness = hot smoothness I hope.
_____________________________ Andy
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.