# Class ScriptManager

java.lang.Object
org.jmol.script.ScriptManager

All Implemented Interfaces:
  `JmolScriptManager`

public class ScriptManager extends Object implements JmolScriptManager

## Field Summary

Fields
Modifier and Type
Field
Description
`Lst<Lst<Object>>`
`scriptQueue`

## Constructor Summary

Constructors
Constructor
Description
`ScriptManager()`

## Method Summary

Modifier and Type
Method
Description
`BS`
`addHydrogensInline(BS bsAtoms, Lst<Atom> vConnections, P3[] pts, Map<String,Object> htParams)`
Add hydrogens to a model
`boolean`
`checkHalt(String str, boolean isInsert)`
`void`
`clear(boolean isAll)`
`void`
`clearCommandWatcherThread()`
`void`
`clearQueue()`
`void`
`evalCallback(String strScript, Object[] params, boolean doWait)`
`String`
`evalFile(String strFilename)`
`String`
`evalFileArgs(String strFilename, String args)`
`String`
`evalStringQuietSync(String strScript, boolean isQuiet, boolean allowSyncScript)`
`Object`
`evalStringWaitStatusQueued(String returnType, String strScript, String statusList, boolean isQuiet, boolean isQueued)`
`BS`
`getAtomBitSetEval(JmolScriptEvaluator eval, Object atomExpression)`
`Lst<Object>`
`getScriptItem(boolean watching, boolean isByCommandWatcher)`
`Lst<Lst<Object>>`
`getScriptQueue()`
`boolean`
`isQueueProcessing()`
`boolean`
`isScriptQueued()`
`void`
`queueThreadFinished(int pt)`
`void`
`runScriptFromThread(Lst<Object> scriptItem)`
`void`
`runScriptNow()`
`Object`
`scriptCheckRet(String strScript, boolean returnContext)`
`static void`
`setStateScriptVersion(Viewer vwr, String version)`
`JmolScriptEvaluator`
`setViewer(Viewer vwr)`
`void`
`startCommandWatcher(boolean isStart)`
`void`
`waitForQueue()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### scriptQueue

public Lst<Lst<Object>> scriptQueue

## Constructor Details

### ScriptManager

public ScriptManager()

## Method Details

### getScriptQueue

public Lst<Lst<Object>> getScriptQueue()

Specified by:
  `getScriptQueue` in interface `JmolScriptManager`

### isScriptQueued

public boolean isScriptQueued()

Specified by:
  `isScriptQueued` in interface `JmolScriptManager`

### setViewer

public JmolScriptEvaluator setViewer(Viewer vwr)

Specified by:
  `setViewer` in interface `JmolScriptManager`

### clear

public void clear(boolean isAll)

Specified by:
  `clear` in interface `JmolScriptManager`

### clearQueue

public void clearQueue()

Specified by:
  `clearQueue` in interface `JmolScriptManager`

### waitForQueue

public void waitForQueue()

Specified by:
  `waitForQueue` in interface `JmolScriptManager`

### isQueueProcessing

public boolean isQueueProcessing()

Specified by:
  `isQueueProcessing` in interface `JmolScriptManager`

### getScriptItem

public Lst<Object> getScriptItem(boolean watching, boolean isByCommandWatcher)

Specified by:
  `getScriptItem` in interface `JmolScriptManager`

### startCommandWatcher

public void startCommandWatcher(boolean isStart)

Specified by:
  `startCommandWatcher` in interface `JmolScriptManager`

### clearCommandWatcherThread

public void clearCommandWatcherThread()

### queueThreadFinished

public void queueThreadFinished(int pt)

Specified by:
  `queueThreadFinished` in interface `JmolScriptManager`

### runScriptNow

public void runScriptNow()

### evalFile

public String evalFile(String strFilename)

Specified by:
  `evalFile` in interface `JmolScriptManager`

### evalFileArgs

public String evalFileArgs(String strFilename, String args)

Specified by:
  `evalFileArgs` in interface `JmolScriptManager`

### evalStringWaitStatusQueued

public Object evalStringWaitStatusQueued(String returnType, String strScript, String statusList, boolean isQuiet, boolean isQueued)

Specified by:
  `evalStringWaitStatusQueued` in interface `JmolScriptManager`

### evalStringQuietSync

public String evalStringQuietSync(String strScript, boolean isQuiet, boolean allowSyncScript)

Specified by:
  `evalStringQuietSync` in interface `JmolScriptManager`

### checkHalt

public boolean checkHalt(String str, boolean isInsert)

Specified by:
  `checkHalt` in interface `JmolScriptManager`

### getAtomBitSetEval

public BS getAtomBitSetEval(JmolScriptEvaluator eval, Object atomExpression)

Specified by:
  `getAtomBitSetEval` in interface `JmolScriptManager`

### scriptCheckRet

public Object scriptCheckRet(String strScript, boolean returnContext)

Specified by:
  `scriptCheckRet` in interface `JmolScriptManager`

### setStateScriptVersion

public static void setStateScriptVersion(Viewer vwr, String version)

### addHydrogensInline

public BS addHydrogensInline(BS bsAtoms, Lst<Atom> vConnections, P3[] pts, Map<String,Object> htParams) throws Exception
Add hydrogens to a model

Specified by:
  `addHydrogensInline` in interface `JmolScriptManager`
Parameters:
  `bsAtoms` - at least one atom, for identification of a model index
  `vConnections` - return list of atoms added
  `pts` - list of point positions for the added hydrogens?
Throws:
  `Exception`

### evalCallback

public void evalCallback(String strScript, Object[] params, boolean doWait)

Specified by:
  `evalCallback` in interface `JmolScriptManager`

### runScriptFromThread

public void runScriptFromThread(Lst<Object> scriptItem)