|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kapsi.util.OSAScript
OSAScript is a simple scripting interface for Apple's Open Scripting Architecture (OSA).
Constructor Summary | |
OSAScript(java.io.File file)
Loads a precompiled .scpt file |
|
OSAScript(java.lang.String source)
Creates a new OSAScript from the passed source code. |
Method Summary | |
void |
compile()
Compiles the script |
AEDesc |
execute()
Executes the script and returns the results as byte-array. |
AEDesc |
execute(java.lang.String subroutine)
Executes a specific subroutine of the script and returns the results as byte-array. |
AEDesc |
execute(java.lang.String subroutine,
java.lang.String[] args)
Executes a specific subroutine of the script with optional parameters and returns the results as byte-array. |
protected void |
finalize()
|
byte[] |
getBytes()
Returns the binaries of this Script or null if script is not compiled. |
java.lang.String |
getSource()
Returns the source of this script or null if script was loaded from a file. |
boolean |
isCompiled()
Returns true if script is compiled |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OSAScript(java.lang.String source) throws java.lang.UnsatisfiedLinkError, OSAException
OSAScript os = new OSAScript("tell application \"Finder\"\nactivate\nend tell");
os.execute();
public OSAScript(java.io.File file) throws java.lang.UnsatisfiedLinkError, java.io.IOException, OSAException
Method Detail |
public java.lang.String getSource()
public boolean isCompiled()
public byte[] getBytes() throws OSAException
OSAException
public void compile() throws OSAException
OSAException
public AEDesc execute() throws OSAException
OSAException
public AEDesc execute(java.lang.String subroutine) throws OSAException
The name of the subroutine must be written in lower case!
OSAException
public AEDesc execute(java.lang.String subroutine, java.lang.String[] args) throws OSAException
The name of the subroutine must be written in lower case!
OSAException
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |