Get url "file:///..."

-hh hh at hh.on-rev.com
Tue Jun 21 01:06:41 EDT 2016


Assuming you are on a Mac: 
The following should work from 10.4 to 10.12 with LC 5/6/7/8.

on mouseUp
  put "/Users/jimhurley/Library/Mail%20Downloads/elec_web/precincts/241.htm"
into f
  put "source" into sOrT --> one of "source", "text", "URL"
  do iScript(f, sOrT) as applescript
  put the result into fld 1
end mouseUp

Using above "text" instead of "source" may save you some work.
(The LC interpretation as htmltext does the same but somehow 'uncomplete').

function iScript f,x
  put numToChar(34) into q
  return "tell application " &  q&"Safari"&q  &cr& \
        "	open POSIX file " &  q&URLdecode(f)&q  &cr& \
        "	set rslt to " & x & " of document 1" &cr& \
        "end tell"
end iScript




--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Get-url-file-tp4705988p4706007.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list