Path problem in RevGOURL + How to find current directory path
Alex Tweedly
alex at tweedly.net
Fri Feb 17 14:35:07 EST 2006
MITTAL Pradeep Kumar wrote:
>Hello,
>
>I want to launch html file which is present in the current directory (
>from where the exe runs)
>
>But the syntax like this does not work.
>revGoURL "file:///index.htm"
>
>Perhaps the RevGOUrl requires complete path of the file.
>
>Do you know how can we find out what is the current direcory path in
>rev??
>
>
You can use the built in function "defaultFolder" (or simply "folder")
Note that this gives you a full path - so you should not add "//" to the
start of it
>So that I can use revGoUrl "file://" & curPath & "/index.htm"
>
>
>
put the defaultFolder into curPath
RevGoURL ("file:" & curPath & "/index.htm") -- Note simply 'file:'
without any leading /s
It's always a good idea to add the parentheses in a case like this.
For RevGoURL, I think it would be OK without it, but other cases would
not be, e.g.
put URL ("file:" & curPath & "/index.htm") into myData
puts the content of the index.html file into the variable
put URL "file:" & curPath & "/index.htm" into myData
puts the URL "file:" (i.e. empty), followed by the path, followed by
the string "index.htm" into the variable.
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.10/263 - Release Date: 16/02/2006
More information about the use-livecode
mailing list