Hi,
I've copied a web page (archive) to my desktop and I put it in the same file as the program I've written with Rev. I have a button in the program that I want to open this archive (web page). I have my Airport (wireless) shut off because I want to show how I can open a web page and there may not be web access when I show this. I've tried a few things:
open file "filename.html"
open file "filename"
open file "/home/commonfile/filename"
revGoURL "file:/User/home/Desktop/commonfile/filename"
None of these work! Any suggestions?
Thanks so much,
Patrick
opening a web page (archive)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 52
- Joined: Sun Jan 20, 2008 7:06 am
close....
I think your looking for [open URL "file:filename.html"]
or [open URL "binfile:filename.html"]
It also possible to create a browser instance in an image or within the stacks window by the windowID and naviate with the broswer to that file.
or [open URL "binfile:filename.html"]
It also possible to create a browser instance in an image or within the stacks window by the windowID and naviate with the broswer to that file.
-
- Posts: 52
- Joined: Sun Jan 20, 2008 7:06 am
Ooops...
Sorry, i also kinda misread your thread.....
Rev needs something to open the data with or to put it into maybe jsut a text filed or something,
But if you are just wanting to launch it on the web you want:
launch url "yourFilePathAndName.html" wich will launch it in the appropriate web browser.
Rev needs something to open the data with or to put it into maybe jsut a text filed or something,
But if you are just wanting to launch it on the web you want:
launch url "yourFilePathAndName.html" wich will launch it in the appropriate web browser.
Re: opening a web page (archive)
Hi Patrick,herbwords wrote:Hi,
I've copied a web page (archive) to my desktop and I put it in the same file as the program I've written with Rev. I have a button in the program that I want to open this archive (web page). I have my Airport (wireless) shut off because I want to show how I can open a web page and there may not be web access when I show this. I've tried a few things:
open file "filename.html"
open file "filename"
open file "/home/commonfile/filename"
revGoURL "file:/User/home/Desktop/commonfile/filename"
None of these work! Any suggestions?
Thanks so much,
Patrick
Just add a couple of more forward slashes (for a total of 3) to the revGoURL command and if it's a web archive, it should also have ".webarchive" after the filename(even if you have the file extension is hidden by OS X)
revGoURL "file:///User/home/Desktop/commonfile/filename.webarchive"
You can also convert the webarchive format to one of these formats : txt, html, rtf, rtfd, doc, docx, wordml, odt, webarchive form shell . And import the converted file into your program. Using the user command textutil to convert the file with the shell function in revolution.
example in rev converting to html
set shellcommand to "/bin/sh"
shell (textutil -convert "~/path 2 file/filename.webarchive" -output "~/Yourfile path/newfile.html" )
or by using: return shell (the textutil command) ,you can return the data into revolution with in a field or variable.
type; man textutil , into the terminal for how to use. also typing in textutil -h , list additional arguments that can be used.
Just another option depending on what your trying to do.
example in rev converting to html
set shellcommand to "/bin/sh"
shell (textutil -convert "~/path 2 file/filename.webarchive" -output "~/Yourfile path/newfile.html" )
or by using: return shell (the textutil command) ,you can return the data into revolution with in a field or variable.
type; man textutil , into the terminal for how to use. also typing in textutil -h , list additional arguments that can be used.
Just another option depending on what your trying to do.