|
|
Desktop Icon Script
This allows you to run a script from a Desktop Icon without the necessity of starting up Ostendo.
To see how this works you can try the following exercise in which we will determine the number of Sales Orders created today.
Go into Sales>Sales Orders and create a couple of Orders
Go into File>Custom Scripts and add a new Custom Script called (say) SalesToday.
In the ‘Script’ tab enter the following:
// Define the Variable
Var
OrdersToday: String;
// You can then get the number of Sales Orders created today
Begin
OrdersToday := GetSQLResult('Select Count(*) from SalesHeader where OrderDate = ''now''');
Showmessage('There are ' + OrdersToday + ' Orders Today');
End.
To run the script from a Desktop Icon carry out the following. On your Desktop ‘Right Mouse’ on your existing Ostendo Icon that points to this 'DEMO' Company database and then copy and paste to create another Desktop Icon. On the copied Icon ‘Right Mouse’ and select ‘Properties’. In the ‘Target’ field extend the target reference to the following
"C:\Program Files\Ostendo\ostendo.exe" STARTUPID:DEMO SCRIPT=SalesToday
and save the changes
If you now double-click on the Icon it will run the script