PsyScriptIcon.png PsyScript: getting experiments done

$query\n"; } $result = mysql_query($database, $query, $connection) or die("ack! query failed: " ."
  • errorno=".mysql_errno() ."
  • error=".mysql_error() ."
  • query=".$query ); return $result; } $Base = "http://www.maccs.mq.edu.au"; $URL= $PHP_SELF; $connection = mysql_connect('localhost', 'tim', 'connect2'); if (!$connection) { print("Cannot connect to database. Call Tim.
    "); exit(); } $result=safe_db_query("Counters","SELECT * FROM Count WHERE Base='$Base' AND URL='$URL'", $connection); while ($row = mysql_fetch_row($result)) { $ChkBase=$row[0]; $ChkURL=$row[1]; $ChkCount=$row[2]; $Count=$ChkCount; } if ($ChkURL == ""){ safe_db_query("Counters","INSERT INTO Count VALUES ('$Base','$URL','0')", $connection); $Count=0; } $Count++; safe_db_query("Counters","UPDATE Count SET Number='$Count' WHERE Base='$Base' AND URL='$URL'"); $result=safe_db_query("Counters","SELECT * FROM Count WHERE Base='$Base' AND URL='$URL'", $connection); while ($row = mysql_fetch_row($result)) { $Base=$row[0]; $URL=$row[1]; $Count=$row[2]; } echo $Count; */ ?>hits
  • Look & Feel

    What You So When PsyScript is Launched

    When you launch PsyScript, you will see that the right-most menu is called "Scripts"

    scriptsMenu.png

    As this screen grab shows, the scripts menu is a hierarchical menu of all sorts of scripts (well, it is for me because I do all different kinds of experiments).

    Running A Script (Experiment)

    To run a script, just select it from the scripts menu (you can also run scripts by choosing the script from the run menu under file).

    If you hold down the option key while making a selection, PsyScript will open it in the script editor so you can edit the experiment.

    Advanced: You can set the script editor to that of your own choice using the script "set editor" in the tools menu of the scripts folder.

    scriptsFolder.png

    How Scripts get displayed.

    Do display a scripts just place it in the scripts folder. Organize this using folders to create sub-menus.

    Note: if you don't see a scripts menu, it is because you need to create a folder called "scripts" in the same folder that contains your copy of PsyScript.

    Advanced: you can create dividers using an empty folder whose name ends with a dash. The name of the folder defines where PsyScript will insert the divider in your menu.

    If you save the following Script into the script menu and then select it, PsyScript will run the simplest ever experiment!

    tell application "PsyScript"
       
    activate
       
    begin experiment
       
    do trial " 'hello world (press any key to continue)' "
       
    end experiment
    end tell

    Yip: It will display the text "hello world (press any key to continue)" on your screen.

    Of course there is a whole lot more to learn about PsyScript. So let's read on:
    Next Section

    Back to index

    MACCS PsyScriptIcon.png Documentation Downloads FAQ Mailing List
    Last change:
    Advanced Search

    Applescript in a Nutshell : A Desktop Quick Reference

    AppleScript for Applications: Visual QuickStart Guide

    AppleScript For Dummies

    Applescript for the Internet Visual Quickstart Guide

    Applescript Language Guide; English Dialect

    Danny Goodman's Applescript Handbook