![]() To switch quickly between Builder and Coder views, you can type Ctrl-L / Cmd-L. However, you cannot go from code back to a Builder representation editing in coder is a one-way street, so, in general, we advise compiling to code is good for understanding what exists but, where possible, make code tweaks in builder itself using code components. You can then edit that code and run it as a python program. It is always possible to go from the Builder to python code in this way. If you then save and run this code, it would look the same as running it directly from the Builder. The view will automatically switch to the Coder, and display the python code. Instead of running the program, explicitly convert it into python: Type F5, or click the Compile icon: In the Builder, load or recreate your “hello world” program. To get a better feel for what was happening “behind the scenes” in the Builder program above: Whenever you run a Builder experiment, PsychoPy ® will first translate it into python code, and then execute that code. You can quit PsychoPy ® from the File menu, or typing Ctrl-Q / Cmd-Q. When running an experiment, you can quit by pressing the escape key (this can be configured or disabled). ![]() What if you wanted to display your cheerful greeting for longer than the default time?Ĭlick on your Text component (the existing one, not a new one).Įdit the Stop duration (s) to be 3.2 times are in seconds. If nothing happens or it looks wrong, recheck all the steps above be sure to start from a new Builder view. (Components, Routines, and other Builder concepts are explained in the Builder documentation.)īack in the main Builder, type Ctrl-R (Windows, Linux) or Cmd-R (Mac), or use the mouse to click the Run icon.Īssuming you typed in “Hello world!”, your screen should have looked like this (briefly): Your text component now resides in a routine called trial. (Properties dialogs have a link to online help-an icon at the bottom, near the OK button.) When you run the program, the text you type here will be shown on the screen.Ĭlick OK (near the bottom of the dialog box). In the Text field, replace the default text with your message. To get a new Builder view, type Ctrl-N on Windows or Linux, or Cmd-N on Mac.Ĭlick on a Text component and a Text Properties dialog will pop up. If you want to run your PsychoPy program (either Builder or Coder written) from a desktop shortcut rather than first firing up PsychoPy and opening the script. If you have poked around a bit in the Builder already, be sure to start with a clean slate. Start PsychoPy ®, and be sure to be in the Builder view.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |