18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

Value<br />

Description<br />

0 Success.<br />

-1 Wrong number of parameters.<br />

-2 Wrong parameter types.<br />

-3 Invalid directory.<br />

-4 Second parameter cannot be empty.<br />

-5 Wrong format / invalid option for third parameter.<br />

-6 Failed to save file.<br />

-7 Failed to create compatible bitmap.<br />

-10000 Project is not running. (This typically happens when you try to use the function<br />

in the Database Spy.) See note.<br />

Notes<br />

For this function to be properly executed, the project must be running and the Viewer task must be started.<br />

The function can be called by the Background Tasks task — that is, by a Script or Math worksheet — but it<br />

will fail if the Viewer task is not also started. This is because the Viewer task is needed to actually render the<br />

screen.<br />

Examples<br />

Save the currently active screen to \projectname\Web\ScreenShot.JPG:<br />

SaveScreenShot()<br />

Save the screen file main.scr to \projectname\Web\main.JPG:<br />

SaveScreenShot( "main.scr" )<br />

Save the currently active screen as a BMP with the name of the currently logged user:<br />

SaveScreenShot( "", UserName, 0 )<br />

SetDecimalPoints<br />

Sets the number of decimal places to be displayed, for a specified range of real numbers. This setting will<br />

be used by all screen objects and animations that have the Auto Format option enabled, as well as by the<br />

AutoFormat function.<br />

Function Group Execution Windows Embedded Thin Client<br />

SetDecimalPointsGraphic Synchronous Supported Supported Supported<br />

Syntax<br />

SetDecimalPoints(numBaseValue,numDecimalPoints)<br />

numBaseValue<br />

The base value of the range of real numbers. For negative values, the range includes all real<br />

numbers less than or equal to that value. For positive values, the range includes all real<br />

numbers greater than or equal to that number. (You can set the other limit of the range by<br />

calling the function again with a new set of parameters.)<br />

numDecimalPoints<br />

<strong>InduSoft</strong> Web Studio Page 651

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!