1.1 Listing of E

advertisement
E-Prime Reference Guide
Chapter 2: E-Basic
Chapter 1: E-Basic
E-Basic is the complete scripting language underlying E-Prime. E-Basic is almost identical to
Visual Basic for Applications, with additional commands inserted to accommodate the needs of
empirical research. For detailed information concerning E-Basic commands, refer to the on-line
Help. The E-Basic on-line Help may be accessed via the E-Prime menu.
1.1
Listing of E-Basic Commands
The following is a list of E-Basic commands grouped by type. These commands may be used in
an InLine object, and are used by E-Studio to convert object specifications into script.
1.1.1
Audio Control
SoundBuffer.Continue (method)
SoundDevice.CreateBuffer (method)
SoundBuffer.Load (method)
SoundDevice.Open (method)
SoundBuffer.Pause (method)
Slide.Play (method)
SlideSoundOut.Play (method)
SlideState.Play (method)
1.1.2
Compiler Control
#Const (directive)
#If... Then... #Else (directive)
() (keyword)
_ (keyword)
1.1.3
SoundBuffer.Play (method)
SoundOut.Play (method)
SoundOut.Run (method)
Slide.Stop (method)
SlideSoundOut.Stop (method)
SlideState.Stop (method)
SoundBuffer.Stop (method)
SoundOut.Stop (method)
Inline (statement)
Option Default (statement)
Option Explicit (statement)
Data Logging
Summation.AddObservation (method)
DataFile.Close (method)
DataFile.Convert (method)
DataFile.Flush (method)
Summation.Max (method)
Summation.Mean (method)
Summation.Min (method)
Summation.N (method)
DataFile.Open (method)
Summation.RemoveObservation (method)
FeedbackDisplay.Reset (method)
Summation.StdDevP (method)
Summation.StdDevS (method)
Summation.Total (method)
Summation.VarP (method)
Summation.VarS (method)
Page 1
E-Prime Reference Guide
Chapter 2: E-Basic
1.1.4
Data Type Conversion
Asc (function)
AscB (function)
AscW (function)
CBool (function)
CColor (function)
CColorPalette (function)
CCur (function)
CDate (function)
CDbl (function)
Chr (function)
Chr$ (function)
ChrB (function)
ChrB$ (function)
ChrW (function)
ChrW$ (function)
CInt (function)
CLng (function)
CLogical (function)
1.1.5
CSng (function)
CStr (function)
CString (function)
CVar (function)
CVDate (function)
CVErr (function)
Fix (function)
Hex (function)
Hex$ (function)
Int (function)
IsDate (function)
IsNumeric (function)
Oct (function)
Oct$ (function)
RGB (function)
Str (function)
Str$ (function)
Val (function)
Data Type Conversion: Casting
CCanvas (function)
CCellSpec (function)
CContext (function)
CCycles (function)
CDataFile (function)
CDeletion (function)
CDevice (function)
CDeviceManager (function)
CDisplayDevice (function)
CDisplayEchoClient (function)
CDisplayEchoClientCollection (function)
CEchoClient (function)
CExplicitOrder (function)
CExplicitOrderByName (function)
CFactor (function)
CFactorSpace (function)
CFactorTable (function)
CFeedbackDisplay (function)
CImageDisplay (function)
CInputDevice (function)
CInputHistoryManager (function)
CInputMask (function)
CInputMaskManager (function)
CKeyboardInputDevice (function)
CKeyboardResponseData (function)
CLatinSquares (function)
CMouseInputDevice (function)
CMouseResponseData (function)
CNoDeletion (function)
COffsetOrder (function)
COrder (function)
CPermutationOrder (function)
CPickOne (function)
CPortInputDevice (function)
CPortResponseData (function)
CRandomOrder (function)
CRandomReplaceOrder (function)
CResponseData (function)
CResponseDataCollection (function)
CRteCollection (function)
CSamples (function)
CSequentialOrder (function)
CSerialDevice (function)
CSlide (function)
CSlideImage (function)
CSlideSoundOut (function)
CSlideState (function)
CSlideStateCollection (function)
CSlideStim (function)
CSlideStimCollection (function)
CSlideText (function)
CSlideVisualStim (function)
CSoundBuffer (function)
CSoundBufferCollection (function)
CSoundDevice (function)
CSoundOut (function)
CSRBoxEchoClient (function)
CSRBoxEchoClientCollection (function)
CSRBoxInputDevice (function)
CSRBoxResponseData (function)
CStimDisplay (function)
CSummation (function)
CTextDisplay (function)
CTimed (function)
CTrigger (function)
Page 2
E-Prime Reference Guide
Chapter 2: E-Basic
1.1.6
Date and Time
Date (function)
Date (statement)
Date$ (function)
Date$ (statement)
DateAdd (function)
DateDiff (function)
DatePart (function)
DateSerial (function)
DateValue (function)
Day (function)
Hour (function)
Minute (function)
1.1.7
Display: Dialogs
AnswerBox (function)
AskBox (function)
AskBox$ (function)
AskPassword (function)
AskPassword$ (function)
InputBox (function)
InputBox$ (function)
1.1.8
MsgBox (function)
MsgBox (statement)
OpenFilename$ (function)
PopupMenu (function)
SaveFilename$ (function)
SelectBox (function)
Display: General Control
EchoClient.AddEchoData (method)
DisplayDevice.CalcActualRefreshRate (method)
DisplayDevice.CalculateRefreshRate (method)
DisplayDevice.Canvas (method)
Slide.Clear (method)
SlideState.Clear (method)
SlideVisualStim.Clear (method)
StimDisplay.Clear (method)
CPaletteIndex (function)
DisplayDevice.CreateCanvas (method)
DisplayDeviceEchoClientCollection.CreateEchoClient
(method)
SRBoxDeviceEchoClientCollection.CreateEchoClient
(method)
EchoClient.Detach (method)
1.1.9
Month (function)
Now (function)
Second (function)
Time (function)
Time (statement)
Time$ (function)
Time$ (statement)
Timer (function)
TimeSerial (function)
TimeValue (function)
Weekday (function)
Year (function)
DisplayDeviceEchoClient.Draw (method)
Slide.Draw (method)
SlideState.Draw (method)
SlideVisualStim.Draw (method)
StimDisplay.Draw (method)
GetDefaultDisplayDevice (function)
SlideState.HitTest (method)
ImageDisplay.Load (method)
SlideImage.Load (method)
DisplayDevice.Open (method)
DisplayDevice.Palette (method)
DisplayDevice.RestoreVideoBuffers (method)
DisplayDevice.WaitForVerticalBlank (method)
Display: Graphics
Canvas.Arc (method)
Canvas.CalculateTextSize (method)
Canvas.Chord (method)
Canvas.Circle (method)
Canvas.Clear (method)
Canvas.Copy (method)
Palette.GetEntries (method)
Canvas.GetPixel (method)
Canvas.Line (method)
Canvas.LineTo (method)
Canvas.LoadImage (method)
Canvas.MoveTo (method)
Canvas.Oval (method)
Canvas.Pie (method)
PointInRect (function)
Canvas.Polygon (method)
Canvas.Rectangle (method)
Canvas.RoundedRectangle (method)
Canvas.SaveImage (method)
Palette.SetEntries (method)
Canvas.SetPixel (method)
Canvas.Text (method)
Page 3
E-Prime Reference Guide
Chapter 2: E-Basic
1.1.10 Error Handling
Err.Clear (method)
Err.Description (property)
Erl (function)
Error (statement)
Error (function)
Error$ (function)
Err.HelpContext (property)
Err.HelpFile (property)
Err.LastDLLError (property)
Err.Number (property)
On Error (statement)
Err.Raise (method)
Resume (statement)
Err.Source (property)
1.1.11 Experiment Control: Ports
SerialDevice.FlushInputBuffer (method)
SerialDevice.FlushOutputBuffer (method)
SerialDevice.Open (method)
SerialDevice.Peek (method)
IOPort.Read (method)
SerialDevice.ReadBytes (method)
SerialDevice.ReadInteger (method)
SerialDevice.ReadLong (method)
ReadPort (function)
SerialDevice.ReadString (method)
IOPort.Write (method)
SerialDevice.WriteBytes (method)
SerialDevice.WriteInteger (method)
SerialDevice.WriteLong (method)
WritePort (statement)
SerialDevice.WriteString (method)
1.1.12 Experiment Control: Stimulus
CellSpec.Add (method)
Context.Add (method)
FactorSpace.AddAttrib (method)
FactorTable.AddFactor (method)
Factor.AddLevel (method)
Order.Advance (method)
Context.AttribExists (method)
Deletion.Count (method)
Order.Count (method)
Context.GetAttrib (method)
Factor.GetAttrib (method)
FactorSpace.GetAttrib (method)
FactorSpace.GetAttribLogFlag (method)
Context.GetAttribNames (method)
Context.GetCellSpec (method)
Order.GetCurrent (method)
FactorSpace.GetCurrentAttrib (method)
Order.GetFactorSpace (method)
Context.GetLevel (method)
Context.GetLevelName (method)
Context.GetLogLevelName (method)
Order.GetNext (method)
FactorSpace.GetNextAttrib (method)
FactorSpace.GetPrevAttrib (method)
Order.GetPrevious (method)
FactorSpace.GetProc (method)
Order.IsEmpty (method)
Factor.Load (method)
Context.Log (method)
Context.LogHeader (method)
Order.PeekAhead (method)
FactorSpace.PeekAttrib (method)
Context.PopFrame (method)
Context.PushNewFrame (method)
FactorSpace.Reset (method)
RteRunnableObject.Run (method)
Context.SetAttrib (method)
Factor.SetAttrib (method)
Context.SetAttribAtSource (method)
FactorSpace.SetAttribLogFlag (method)
Context.SetLogLevelName (method)
Factor.SetNested (method)
FactorSpace.SetNested (method)
Factor.SetProc (method)
FactorSpace.SetProc (method)
Factor.SetWeight (method)
FactorSpace.Size (method)
FactorTable.Size (method)
FactorSpace.Terminate (method)
LatinSquares.TotalRunsNeeded (method)
LatinSquares.TotalSamplesNeeded (method)
Context.Update (method)
1.1.13 Experiment Control: Timing
GetNextTargetOnsetTime (function)
GetOSThreadPriority (function)
Clock.Read (method)
Clock.Read1000thMillisec (method)
Clock.Read100thMillisec (method)
Clock.Read10thMillisec (method)
Clock.ReadMicrosec (method)
Clock.ReadMillisec (method)
Clock.ResetScale (method)
SetNextTargetOnsetTime (statement)
SetOSThreadPriority (statement)
SetPcodeSleepDuration (statement)
SetPcodeSleepFrequency (statement)
Page 4
E-Prime Reference Guide
Chapter 2: E-Basic
1.1.14 File Input/Output
Close (statement)
Eof (function)
FreeFile (function)
Get (statement)
Input (function)
Input# (statement)
Input$ (function)
InputB (function)
InputB$ (function)
Line Input # (statement)
Loc (function)
Lock (statement)
Lof (function)
Open (statement)
Print # (statement)
Put (statement)
Reset (statement)
Seek (function)
Seek (statement)
Unlock (statement)
Width# (statement)
Write# (statement)
1.1.15 Input Device Control
InputDevice.CreateInputMask (method)
SRBoxDevice.Flush (method)
MouseDevice.GetCursorLimits (method)
MouseDevice.GetCursorPos (method)
InputDevice.InsertResponse (method)
MouseResponseData.IsButton1 (method)
MouseResponseData.IsButton2 (method)
MouseResponseData.IsButton3 (method)
MouseResponseData.IsButton4 (method)
MouseResponseData.IsButton5 (method)
MouseResponseData.IsButton6 (method)
MouseResponseData.IsButton7 (method)
MouseResponseData.IsButton8 (method)
MouseDevice.IsCursorVisible (method)
SRBoxDevice.KeyCount (method)
SRBoxDevice.Lamps (method)
KeyboardDevice.Open (method)
MouseDevice.Open (method)
PortDevice.Open (method)
SRBoxDevice.Open (method)
MouseDevice.SetCursorLimits (method)
MouseDevice.SetCursorPos (method)
MouseDevice.ShowCursor (method)
1.1.16 Math
Abs (function)
Atn (function)
Cos (function)
Exp (function)
Log (function)
Sgn (function)
Sin (function)
Sqr (function)
Tan (function)
1.1.17 Math: Financial
DDB (function)
FV (function)
IPmt (function)
IRR (function)
MIRR (function)
NPer (function)
NPV (function)
Pmt (function)
PPmt (function)
PV (function)
Rate (function)
SLN (function)
SYD (function)
1.1.18 Math: Randomization
PRNG.GetNext (method)
PRNG.GetPrev (method)
PRNG.GetSeed (method)
PRNG.Random (method)
Random (function)
Random (function)
Randomize (function)
Randomize (statement)
RandomizeArray (function)
PRNG.Reset (method)
Rnd (function)
PRNG.SetSeed (method)
SetSeed (statement)
Page 5
E-Prime Reference Guide
Chapter 2: E-Basic
1.1.19 Object Control
CreateObject (function)
GetObject (function)
Is (operator)
Nothing (keyword)
1.1.20 Operators
- (operator)
* (operator)
/ (operator)
\ (operator)
^ (operator)
+ (operator)
< (operator)
<= (operator)
<> (operator)
= (operator)
> (operator)
>= (operator)
And (operator)
Eqv (operator)
Imp (operator)
Mod (operator)
Not (operator)
Or (operator)
Xor (operator)
1.1.21 Program Control
RteCollection.Add (method)
Debug.Assert (method)
Call (statement)
Choose (function)
Device.Close (method)
Declare (statement)
Do...Loop (statement)
DoEvents (function)
DoEvents (statement)
End (statement)
Exit Do (statement)
Exit For (statement)
Exit Function (statement)
Exit Sub (statement)
For Each...Next (statement)
For...Next (statement)
Function...End (statement)
DeviceManager.GetDevice (method)
DeviceManager.GetDeviceCount (method)
Rte.GetObject (method)
Rte.GetObjectCount (method)
Device.GetState (method)
GetUserBreakState (function)
GoSub (statement)
Goto (statement)
If...Then...Else (statement)
IIf (function)
InputMask.IsPending (method)
InputMaskManager.IsPending (method)
DeviceManager.IsSuspended (method)
Main (statement)
Device.Open (method)
Debug.Print (method)
RteCollection.Remove (method)
RteCollection.RemoveAll (method)
InputMaskManager.Reset (method)
Device.Resume (method)
DeviceManager.Resume (method)
Return (statement)
Select...Case (statement)
SetUserBreakState (statement)
Sleep (statement)
Sleep (statement)
Sub...End Sub (statement)
Device.Suspend (method)
DeviceManager.Suspend (method)
Switch (statement)
InputMask.Terminate (method)
InputMaskManager.Terminate (method)
While...Wend (statement)
Page 6
E-Prime Reference Guide
Chapter 2: E-Basic
1.1.22 String Manipulation
& (operator)
Format (function)
Format$ (function)
InStr (function)
InStrB (function)
Item$ (function)
ItemCount (function)
LCase (function)
LCase$ (function)
Left (function)
Left$ (function)
LeftB (function)
LeftB$ (function)
Len (function)
LenB (function)
Like (function)
Line$ (function)
LineCount (function)
LSet (function)
LTrim (function)
LTrim$ (function)
Mid (function)
Mid (statement)
Mid$ (function)
Mid$ (statement)
MidB (function)
MidB (statement)
MidB$ (function)
MidB$ (statement)
Option Compare (statement)
Option CStrings (statement)
Right (function)
Right$ (function)
RightB (function)
RightB$ (functions)
RSet (statement)
RTrim (function)
RTrim$ (function)
Space (function)
Space$ (function)
StrComp (function)
StrConv (function)
String (function)
String$ (function)
Trim (function)
Trim$ (function)
UCase (function)
UCase$ (function)
Word$ (function)
WordCount (function)
1.1.23 Variable Control
= (statement)
ArrayDims (function)
ArraySort (statement)
Const (statement)
DefBool (statement)
DefCur (statement)
DefDate (statement)
DefDbl (statement)
DefInt (statement)
DefLng (statement)
DefObj (statement)
DefSng (statement)
DefStr (statement)
DefVar (statement)
Dim (statement)
Erase (statement)
Global (statement)
IsEmpty (function)
IsError (function)
IsMissing (function)
IsNull (function)
IsObject (function)
LBound (function)
Let (statement)
Option Base (statement)
Private (statement)
Public (statement)
ReDim (statement)
Set (statement)
Type (statement)
UBound (function)
VarType (function)
Page 7
E-Prime Reference Guide
Chapter 2: E-Basic
CHAPTER 4 : USING E-BASIC ____ ОШИБКА! ЗАКЛАДКА НЕ ОПРЕДЕЛЕНА.
4.1 Why Use E-Basic? ____________ Ошибка! Закладка не определена.
4.1.1 Before Beginning… ________________ Ошибка! Закладка не определена.
4.1.2 Basic Steps _______________________ Ошибка! Закладка не определена.
4.2 Introducing E-Basic ___________ Ошибка! Закладка не определена.
4.2.1 Syntax __________________________ Ошибка! Закладка не определена.
4.2.2 Getting Help ______________________ Ошибка! Закладка не определена.
4.2.3 Handling Errors in the Script _________ Ошибка! Закладка не определена.
4.3 Communicating with E-Prime Objects______ Ошибка! Закладка не
определена.
4.3.1 Context __________________________ Ошибка! Закладка не определена.
4.3.2 Object.Properties __________________ Ошибка! Закладка не определена.
4.3.3 Object.Methods ___________________ Ошибка! Закладка не определена.
4.3.4 Variable Declaration and Initialization _ Ошибка! Закладка не определена.
4.3.5 User Script Window vs. InLine Object _ Ошибка! Закладка не определена.
4.4 Basic Steps for Writing E-Prime Script _____ Ошибка! Закладка не
определена.
4.4.1 Determine the purpose and placement of the script ____ Ошибка! Закладка не
определена.
4.4.2 Create an InLine object and enter the script _________ Ошибка! Закладка не
определена.
4.4.3 Determine the scope of variables and attributes ______ Ошибка! Закладка не
определена.
4.4.4 Set or reference values in script _______ Ошибка! Закладка не определена.
4.4.5 Reference script results from other objects __________ Ошибка! Закладка не
определена.
4.4.6 Debug ___________________________ Ошибка! Закладка не определена.
4.4.7 Test _____________________________ Ошибка! Закладка не определена.
4.5 Programming: Basic __________ Ошибка! Закладка не определена.
Page 8
E-Prime Reference Guide
Chapter 2: E-Basic
4.5.1 Logical Operators__________________ Ошибка! Закладка не определена.
4.5.2 Flow Control _____________________ Ошибка! Закладка не определена.
4.5.3 Examples and Exercises _____________ Ошибка! Закладка не определена.
4.5.4 Additional Information _____________ Ошибка! Закладка не определена.
4.6 Programming: Intermediate____ Ошибка! Закладка не определена.
4.6.1 More on Variables _________________ Ошибка! Закладка не определена.
4.6.2 Writing Subroutines ________________ Ошибка! Закладка не определена.
4.6.3 Writing Functions _________________ Ошибка! Закладка не определена.
4.6.4 Additional Information _____________ Ошибка! Закладка не определена.
4.7 Programming: Advanced ______ Ошибка! Закладка не определена.
4.7.1 Arrays ___________________________ Ошибка! Закладка не определена.
4.7.2 Timing __________________________ Ошибка! Закладка не определена.
4.7.3 User-Defined Data Types ___________ Ошибка! Закладка не определена.
4.7.4 Examples ________________________ Ошибка! Закладка не определена.
4.7.5
Additional Information
Ошибка! Закладка не определена.
Page 9
E-Prime Reference Guide
E-Basic
This page intentionally left blank.
Download