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
  • PsyScriptIcon.png PsyScript: getting experiments done

    $query\n"; } $result = mysql_db_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
  • RB Library

    This library is just tow handlers that we wrote for helping with repetition blindness paradigms.

    Contents:

    Using the Library

    An example

    The Library Handlers


    Using the Library

     
     


    An example:


     

    The Library Handlers


    property stimList : {" % ", " $ ", " @ ", " ? ", " & ", " ^ ", " > ", " < ", " ( "} -- the list of mask characters

    set listHandler to load script ""
    to createMaskStimuli ( howmany ) -- returns a list of mask words

    set maskListOut to {} -- will contain a list of mask strings
    set theMaskCharacters to sample ( howmany , stimList , false ) of listHandler -- grab 7 unique mask characters
    repeat with aMaskCharacter in theMaskCharacters -- pad each mask character out to a length between 3 and 7 repeats
    set theMaskString to ""
    repeat with n from 1 to ( random number from 3 to 7 )
    set theMaskString to theMaskString & aMaskCharacter
    end repeat
    set end of maskListOut to (" ' " & theMaskString & " ' ") -- single quotes so it is not interpreted as an instruction
    end repeat
    return maskListOut
    end createMaskStimuli

    to packMaskLengthToPreceedingWord ( WordStimuli , wordIndex , maskList , maskIndex )
    set minlength to count of characters of item wordIndex of WordStimuli
    set theCharString to text 2 through -2 of item maskIndex of maskList -- step over quote
    set maskLength to count of theCharString
    if maskLength < minlength then
    set theMaskCharacter to character 1 of theCharString
    repeat with n from 1 to ( minlength - maskLength )
    set theCharString to theCharString & theMaskCharacter
    end repeat
    end if
    set item maskIndex of maskList to " ' " & theCharString & " ' "
    return maskList
    end packMaskLengthToPreceedingWord

     

    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
    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