Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] HTML help file, using relative path for image

edited June 2013 in OpenSesame

Hello again,

I'm currently editing my help file send_message.HTML for a plug-in that I wrote send_message.

In my help file I want to include an image to display when the help file is accessed inside of opensesame. Currently I display the image by using the absolute path to the image.

<P><IMG SRC="C:\Program Files (x86)\OpenSesame\plugins\send_message\send_message_large.png" NAME="graphics2" ALIGN=BOTTOM WIDTH=32 HEIGHT=32 BORDER=0></P>

I would like to change from using an absolute path to a relative path, but when I do so my image can't be found.

<P><IMG SRC="send_message_large.png" NAME="graphics2" ALIGN=BOTTOM WIDTH=32 HEIGHT=32 BORDER=0></P>

I've asked around on forums on other websites for HTML specific questions and it seems as if this is the code I would have to use to accomplish this. Both of my send_message.HTML and send_message_large.PNG files are located in the send_message folder. All of the HTML people I've talked to say to use <img src="send_message.png" /> for relative paths.

I'm wondering if opensesame copys the help file when loading in a plugin and calls the HTML file from somewhere else when the help file is accessed inside of opensesame which could cause the relative path to not be that same as when it was located in my plug-in folder?

If you have any suggestions of where to look for this problem please let me know, thank you.

Comments

  • edited 7:50PM

    I would like to change from using an absolute path to a relative path, but when I do so my image can't be found. (...) I've asked around on forums on other websites for HTML specific questions and it seems as if this is the code I would have to use to accomplish this.

    Yes, if you specify only a file name, it is interpreted as a relative path. In fact, this works just fine on my system, but it could be an operating-system specific quirk of the QtWebKit component that is used for the browser.

    I'm wondering if opensesame copys the help file when loading in a plugin and calls the HTML file from somewhere else when the help file is accessed inside of opensesame which could cause the relative path to not be that same as when it was located in my plug-in folder?

    No, the .html file is loaded directly (link).

    If you have any suggestions of where to look for this problem please let me know, thank you.

    If you are sure that there is not a trivial reason for why this doesn't work, such as a typo, then relative paths apparently don't work as expected, perhaps due to a bug in QtWebKit. (This is possible, but since I find it a bit unlikely, I would double-check.) A workaround would be to use a remote image, and specify a URL instead, like so:

    <img src='http://osdoc.cogsci.nl/img/fig/fig1.2.1.png' />
    

    This works, but the obvious downside is that the system has to be online.

    Btw, you could also consider creating a markdown style help-file, which is much easier to read and manage. In that case, the equivalent code would be:

    ![](http://osdoc.cogsci.nl/img/fig/fig1.2.1.png)
    

    Cheers!
    Sebastiaan

  • edited 7:50PM

    My plugin will be used on offline computers unfortunately, otherwise I would go with that option. Also I don't want to switch to markdown because I'm trying to limit how much installation is required by someone to use my plugin. For now I'm just not including the image in my help file. If I finish everything else I might revisit the issue. Thank you for the response though!

  • edited 7:50PM

    Good luck! And just out of curiosity: What does the plug-in do exactly?

  • edited 7:50PM

    The plugin offers 3 different options. Start server, send mark, and stop server. When start server is selected the plugin opens a client socket connection through a port to an outside server. The send mark option allows the user to send useful information or messages about what their experiment just did, is doing, or is going to do. The stop server option closes the client socket connection. All of these options also send out date/time stamps of when the event occurred.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games