OpenUrl with local html file.
Monkey Forums/Monkey Beginners/OpenUrl with local html file.
| ||
Hi, I'm having no luck opening an html file in the data directory. Everything works fine with web urls. I've looked, and the file is definitely there in the build directory. I've tried: OpenUrl "docs/instructions.html" OpenUrl "monkey://data/docs/instructions.html" OpenUrl "file://docs/instructions.html" (... though I realize that last one probably needs an absolute path ) I've been mostly testing on the desktop target, but android is needed too. Is this just not possible? |
| ||
For the Desktop it's easy enough to do. But the other targets are another matter.Import mojo Import os #TEXT_FILES="*.txt|*.xml|*.json|*.html" Function Main:Int() OpenUrl "file:///" + CurrentDir().Replace("\\", "/") + "/data/instructions.html" Return 0 End Function |
| ||
Thanks. Yeah it works on desktop, but its a no go on Android :/ |
| ||
tbarela wrote: but its a no go on Android :/ Security issue? |
| ||
Test this code OpenUrl(PathToFilePath("monkey://data/Index.htm")) |