POISE-SkyLite User Guide - Palmer College of Chiropractic, Intranet ...
POISE-SkyLite User Guide - Palmer College of Chiropractic, Intranet ...
POISE-SkyLite User Guide - Palmer College of Chiropractic, Intranet ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
ADVANCED SKYLITE CHAPTER 4<br />
OLE Automation<br />
OLE automation is an industry standard that enables applications to expose their OLE<br />
objects to applications that support OLE, such as Visual Basic for Applications (VBA),<br />
the Excel Macro Language, Visual C++, and Delphi.<br />
<strong>SkyLite</strong> is an automation-enabled object. This means that you can open <strong>SkyLite</strong> sessions<br />
and make use <strong>of</strong> the macro language from within applications that are OLE automation<br />
controllers such as VBA. The commands listed below can be used in Visual Basic<br />
programs to start and close <strong>SkyLite</strong> sessions and run macro scripts.<br />
Command Description Parameter Parameter<br />
Description<br />
session.setting<br />
The name given to<br />
<strong>SkyLite</strong> in the<br />
Windows registry.<br />
- -<br />
<strong>SkyLite</strong>.LoadSession<br />
<strong>SkyLite</strong>.ScriptExec<br />
Loads a <strong>SkyLite</strong><br />
session.<br />
Executes the <strong>SkyLite</strong><br />
script line.<br />
“String”,<br />
“String”,<br />
bool<br />
“String”<br />
Session File name<br />
including path.<br />
Unused.<br />
Unused.<br />
A valid <strong>SkyLite</strong> macro<br />
command.<br />
<strong>SkyLite</strong>.StartScript Runs a macro file. “String” A macro filename<br />
including the full path.<br />
<strong>SkyLite</strong>.StartSession<br />
Starts or restarts a - -<br />
loaded session.<br />
<strong>SkyLite</strong>.Unload Unloads <strong>SkyLite</strong>. - -<br />
<strong>SkyLite</strong>.EndSession<br />
Ends <strong>SkyLite</strong><br />
session.<br />
- -<br />
VBA Example<br />
The following example shows how some <strong>of</strong> these commands can be used to load and<br />
start a <strong>SkyLite</strong> session using Visual Basic for Applications.<br />
Rem Define the variable <strong>SkyLite</strong> as the data type object.<br />
Rem This represents the <strong>SkyLite</strong> application when used for<br />
Rem OLE automation<br />
Dim <strong>SkyLite</strong> As object<br />
Rem Create an OLE object that corresponds to <strong>SkyLite</strong>.<br />
Rem We will use this object to invoke<br />
Rem published automation methods.<br />
Set <strong>SkyLite</strong> = GetObject("", "Session.Setting")<br />
Rem Start a session with the given name<br />
result = <strong>SkyLite</strong>.LoadSession("TEST.SES", "", True)<br />
Rem Once <strong>SkyLite</strong> has loaded, tell it to print something<br />
Rem on the terminal window.<br />
result = <strong>SkyLite</strong>.ScriptExec("print ""hello world""")<br />
Rem Close the <strong>SkyLite</strong> session<br />
<strong>SkyLite</strong>.endsession<br />
Rem Unload/Exit <strong>SkyLite</strong><br />
<strong>SkyLite</strong>.unload<br />
54 <strong>POISE</strong>-<strong>SkyLite</strong> <strong>User</strong> <strong>Guide</strong>