Inline Data Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Variable Definitions and Operations >

Inline Data Commands

 

What is "Inline Data"?

Inline-Data is Data that represents a picture, Password or Login Credentials, Text, or any other collection of Bytes.

"Inline" means that it is not an external file, but it is part of the Code.

 

You can now add Inline Data to any SPR-Script. The easiest way is to just enter the Inline-Data as Dezimal Numbers.

If you have ever used "BASIC" Language you may remind yourself to "READ and DATA" Commands.

 

With the SPR there is no separate READ and DATA Commands.

We only need the VDA. Command that starts the Block with Data, and then we need the VDE.-Command that ends the Block with Data.

 

Technically when you jump to the Line with the Data, the Data is been put into the Variable after the VDA.- Command.

 

So the esiest way to use Inline Data is, to just enter it.

 

1. Just write your Data in dezimal numbers separated by ",".

This way you can manually enter data.

 

VDA.$$DTA|$$FIN=

64,65,255,0,21

VDE.

 

 

For all 3 further Options you will need to use the Datamaker.exe - Utility, which is in your SPR-Package included.

 

clip0066

You can simply drag and drop files on to the Datamaker-Tool, to have them converted into Inline-Code.

 

The important Point is that the VDA.-Commands supports 4 Data-Types and additionally 2 Options.

You can simply set them in the Datamaker-Tool, the rest is done automatically.

 

So lets take a look on the Datamaker-Tool.

 

The Datamaker-Tool can get your Data from 3 Sources:

1. You can drag any file(s) into the Datamaker, they will then appear in the blue List-Box.

2. You can take Textual Data from your Clipboard and insert it into the upper black Box, using the PASTE-Button on the right side,.

3. You can insert a Picture from your Clipboard directly into the Datamaker. Use the blue "Paste Picture" Button for that.

   I can recommend the "Greenshot" Freeware Utility to generate these pictures from Screenshots.

  Using Greenshot you can directly put Screenshots into the Clipboard and make them to Inline-Data with just one Click.

  Without saving it as a file.

 

Encryption and Compression

clip0073

You can then process the Data according to the Checkmarks/Radiobuttons on the right side.

Therefore you can encrypt the Data (Good to hide Passwords). You can compress the Data (fast compression).

You do not need to worry on how to get the original data back, this is all done under the Hood from VDA.

 

Further all Data is checksummed from the datamaker tool. The checksum is included in the data, so simple changes in the data will prevent the VDA. from unpacking the data. This will help you to keep your data safe.

Here is a hint: The encryption is always the same, with the same system, so it only to prevent people from reading the data visually.

Anybody who can let the script run, will of course get the original data out, by simply using VDA.

 

Further Options

clip0074

You can further select if you want the processed files to be deleted from the blue List, or not ("Keep Source").

This will also influence the behavior of the Source Textbox.

In case you have dropped multiple files into the List, then you can convert them all in one strike.

For this you need to remove the "New Output" Checkmark, as this will generally clean the Output-Textbox before adding any new Code.

 

The Line-Lentgh for the Inline-Data

clip0075

You can further decide the Line-Lenght of the Inline-Code. For this simply change the number in the white Edit-Box.

Default is generally 64, but you can make larger Lines. I did not test where the limit is.

Internally the Preprocessor will anyway connect all Inline-Data lines and store them in one place, so this may not have significant impact on the Runtime-behavior. You can change that for cosmetical reasons anyway. I suggest not to make lines longer then 255 Bytes because of the SPR-Editor (its something you can try).

clip0068The Middle grey Button with the  Symbol is the "Convert to Inline Data" Button.

All items in the blue List will be processed according to the checkmarks when you click on it.

 

clip0069With Pictures from the Clipboard this is different. Because we can store the binary data easily, the pictures are immediately processed when you click on the "Paste Pic" Button.

 

There are currently 3 Types of Inline-Data supported. These are:

clip0071

Generally prefer the "Text-Data" for most compact and fast processing.

 

Supported Data-Formats:

 

General comments:

As you can see, Dezimal Data starts with the Sequence "`?D". Then there is a 0,1 which means the Data is compressed but not encrypted. All this is done automatically if you use the Datamaker-Tool. The Data that has been created using the Datamaker-Tool also includes the Original Filename of the File - which will be in $$FIN - and a checksum to make sure that your data was not changed.

The chacksum is automatically calculated when the data is extracted. If the Data was changed, the VDA. will not extract the data and set the Timeout Flag..

 

1. Manually entered Dezimal Data: These are dezimal numbers between 0 and 255 separated by a ",".

This way you can manually enter data. $$FIN will be empty because this data can never contain a filename.

 

VDA.$$DTA|$$FIN=

64,65,255,0,21

VDE.

 

2. Dezimal Data: These are dezimal numbers between 0 and 255 separated by a ",". Each number represents 1 Byte of Data.

   As you can see, Dezimal Data starts with the Sequence "`?D".

 

 Looks like this:

 

' $$DTA = Data

' $$FIN = Filename of Sourcefile

' Length:  386 Bytes in  7 Lines.

VDA.$$DTA|$$FIN=

?D0,1,110,0,0,0,74,81,236,212,59,216,196,99,142,123,50,231,210,17,63,

92,23,69,204,17,252,33,210,155,44,235,50,194,135,6,208,22,59,220,

54,112,63,212,166,150,66,0,107,254,33,79,44,112,112,48,228,80,57,

66,0,107,123,27,22,136,95,124,168,167,215,151,155,168,210,137,135,

92,42,62,194,173,226,6,148,10,42,36,169,15,60,40,235,88,44,96,229,

181,175,53,99,103,6,66,152,10,13,86,58,70,1

VDE.

 

 

3. Headezimal data. These are Hexadezimal numbers, where each uses 2 Digits therefore there is no Separation between them.

  Hexadezimal Data starts with the Sequence "`?H".

 

' F:\00_MR\PB_MiniRobots-Editoren\SPRE 02\Source\Sample Scripts\Tests\File.txt

' $$DTA = Data

' $$FIN = Filename of Sourcefile

' Length:  232 Bytes in  5 Lines.

VDA.$$DTA|$$FIN=

?H00016E0000004A51ECD43BD8C4638E7B32E7D2113F5C1745CC11FC21D29B2CEB32

C28706D0163BDC36703FD4A69642006BFE214F2C707030E4503942006B7B1B1688

5F7CA8A7D7979BA8D289875C2A3EC2ADE206940A2A24A90F3C28EB582C60E5B5AF

3563670642980A0D563A4601

VDE.

 

4. Text-Coded data.

This Format starts with "?M". This Format uses least Space because it uses all Textual Charactes to store the Information.

Please prefer this datatype for larger Data-Amounts, as it unpacks very efficiently and uses least space.

 

' F:\00_MR\PB_MiniRobots-Editoren\SPRE 02\Source\Sample Scripts\Tests\File.txt

' $$DTA = Data

' $$FIN = Filename of Sourcefile

' Length:  154 Bytes in  3 Lines.

VDA.$$DTA|$$FIN=

?MAAFuAAAASlHs1DvYxGOOezLn0hE/XBdFzBH8IdKbLOsywocG0BY73DZwP9SmlkIA

a/4hTyxwcDDkUDlCAGt7GxaIX3yop9eXm6jSiYdcKj7CreIGlAoqJKkPPCjrWCxg

5bWvNWNnBkKYCg1WOkYB

VDE.

 

 

If Data that was created using the Datamaker-Tool was changed and therefore the included checksum does not match, you will get in $$DTA the Text "VDA. can not retrieve Data.".

 

 

' Sample that leads to the Error Message "VDA. can not retrieve Data."

' This data is invalid therefore it will not be extracted.

GSB.Laa

MBX.$$DTA

ENR.

'-----------------------------------------------------------

:Laa

' F:\00_MR\PB_MiniRobots-Editoren\SPRE 02\Source\Sample Scripts\Tests\File.txt

' $$DTA = Data

' $$FIN = Filename of Sourcefile

' Length:  154 Bytes in  3 Lines.

VDA.$$DTA|$$FIN=

?MAAFuAAAASlHs1DvYxGOOezLn0hEdw/XBdFzBH8IdKbLOsywocG0BY73DZwP9SmlkIA

a/4hTyxwcDDkUDlCAGt7GxaIX3yop9eXm6jSiYdcKj7CreIGlAoqJKkPPCjrWCxg

5bWvNWNnBkKYCg1WOkYB

VDE.

RET.

 

clip0067