Howdy, Stranger!

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

Supported by

use original size of the picture independent from screen

I am planning to install my experiment on several laptops with different screen sizes.
Of couse, we are going to use a standardized screen resolution on all laptops.
Is there an easy solution to set the size of a picture in a sketchpad item on its original size?
At the moment it automatically adjusts on the size of the screen.

set duration 0
set description "Präsentiert Stimuli"
draw image center=1 file="0_D.TIF" scale=1 show_if=always x=0 y=0 z_index=0

Comments

  • I found that opensesameRUN, which might be a helpfull tool to do that.
    I need it anyway to set the logfile.
    My plan:
    I set the screen size (width and height) to a small part in the middle of the screen, which is available even on a small laptop display.
    I put a fixed resolution. --> Then i hope to have the same image on each laptop.

    Only that i do not know how to implement it.
    Where to i write the line: opensesamerun [experiment] [options]
    Do i put that into an inline script of a new experiment?

    Directly a new question:
    I would like to save a folder at the laptops which includes the experiment and a second logfile folder.
    So instead of writing the complete path for the logfile folder, it would be grate to name just that it is the same as the experiment path plus ~/logfile

    I apologize for any inconvenience and making to much trouble in this forum.

  • I have in mind something like this:
    opensesamerun [experiment] [-c 1280,-l /pool/logfile]

    Where do i have to put this "opensesamerun" script ?
    In the first inline_script? in the prepare phase?
    Actually i would think i put it into the general script. But any time i change or write something in the general script, it is not saved.

  • You can use the command line (cmd.exe on Windows) or use a batch file

    For your previous question I guess you could use experiment_path:

    Best,
    Jarik

  • may i use something like this?

    log.close() 
    log.open([experiment_path]/Logfile\session1_[subject_nr].csv)
    
  • Yes you may. You don't need my permission :p :p :p
    But it won't work.

    Your using the experiment_path and subject_nr variables like you would in the GUI but you have to use them like you should in Python inline script.

    After some searching on the forum I found how to do this here. I couldn't make this work by calling (u'%s/Logfile/session1_%s.csv')%(var.experiment_path,var.subject_nr) directly like in @eduard's example, so I used the temporary variable t.

    t = (u'%s/Logfile/session1_%s.csv')%(var.experiment_path,var.subject_nr)
    print(t) # printing to the debug window helps you inspect if the path is correct
    log.open(t)
    

    I also found you don't have to call log.close() as reported on the forum here

    Note the directory Logfile has to exist (i.e. it is not created for you)

    Best,
    Jarik

    Tested on Win7 x64 with OpenSesame 3.1.2

Sign In or Register to comment.