[Solved] Openning local html file in browser

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
inajke
Newbie
Posts: 24
Joined: Wed Mar 28, 2018 12:07 pm
Contact:

[Solved] Openning local html file in browser

#1 Post by inajke »

Hi, I've tried some posts on the forum, but still can't get how to open the local file. Right now I'm trying to do this:

Code: Select all

textbutton "wiki" xpos 650 ypos 450 action OpenURL("file:///" + config.basedir + "/wiki.html")
but it opens IE with a standard page. I've tried to specifiy the path to game/wiki.html, but couldn't get it either. Can someone help please?

I'm sorry for my english
Last edited by inajke on Fri Mar 20, 2020 5:57 pm, edited 1 time in total.

User avatar
RicharDann
Veteran
Posts: 286
Joined: Thu Aug 31, 2017 11:47 am
Contact:

Re: Openning local html file in browser

#2 Post by RicharDann »

If you're running the game from the Ren'Py Launcher, try copying wiki.html to your renpy-sdk folder (from where you run renpy.exe) and see if that works.
I think it uses the folder from where the game was executed to determine the url path.
The most important step is always the next one.

inajke
Newbie
Posts: 24
Joined: Wed Mar 28, 2018 12:07 pm
Contact:

Re: Openning local html file in browser

#3 Post by inajke »

Thats working as intended! Thank you very much

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Ocelot, Toma