Where to Start with Plugins / Scripting?

General programming discussions for Developer users.

Moderators: SwiftWiz, BET, SwiftGuy, SwiftBB, SwiftCoder

Where to Start with Plugins / Scripting?

Postby mduff » Thu Mar 01, 2012 1:30 pm

It seems like scripting plugins makes things happen within the PS interface - like opening dialog boxes, adding items, managing properties, etc. Is that right? What are the differences between “Shell Execute”, “Executable” and “Script Code” plugins?

In the "help" files, you give suggest copy & pasting Delphi scripts into the PS scripting editor. Do we have to write scripts in Delphi syntax? I tried to run the example for NewForm() in the Scripting -> Forms folder and got this error: “Unknown identifier or variable is not declared: ‘clearoutput’. Source position 48, 14.

When we’re looking at a PS scripting reference, how do we know to which PS versions they apply? Where are the references for scripting syntax and general routine design? Are they “compiled” by PS? Can they access external resources (i.e., SQL Server)?
mduff
 
Posts: 3
Joined: Thu Mar 01, 2012 9:29 am

Re: Where to Start with Plugins / Scripting?

Postby BET » Thu Mar 01, 2012 3:26 pm

Hello Mduff,

To answer your first question.
Shell Execute will Execute an external application stored somewhere on your computer. An example is Microsoft Notepad or Microsoft Excel.... (Something that has a stationary exe location)

Executeable: Will copy the .exe file to the planswift plugin.... you would use this to incorporate a plugin you have created through a development platform outside of planswift. such as Visual Studio or Delphi.

Script: Will open the planswift internal scripting engine. and allow you to create a custom script.

The scripting reference is currently being updated. As of right now I would not recommend copy and paste the information from the reference to the scripter.

As of right now the scripter defaults to Pascal.... you can change this to vb (visual basic) by clicking on the advance button. then right clicking on the "Script Code" Property and choosing "Properties" in the properties change the syntax to vb.
then press ok. and press the "Edit" button at the end of the script code property.

an example below is how you would call the new form


Code: Select all
form := newform(200,200,'Custom Form Name');
okbtn := newbutton(20,20,'Ok',mrok);
if form.showmodal <> mrok then exit;


Hope this helps.
BET
SuperSwift
 
Posts: 672
Joined: Mon Jan 07, 2008 11:21 am


Return to SDK and OLE Automation

Who is online

Users browsing this forum: No registered users and 1 guest

cron