Main Menu
 Login  |  Register! 
plugins is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)
Plug-Ins » Function Library » NeoThinBasic
Plug-Ins

NeoThinBasic  v1.06  
Download Now (0 Bytes) Read User Reviews of NeoThinBasic
NeoThinBasic is a plugin that works as "Bridge" between NeoBook and ThinBasic.
ThinBasic is an interpreted language, like NeoBook.
ThinBasic syntax is like VBScript, but very very very more robust.
ThinBasic run its programs like a rocket, specially indicated for very complex or recursive process.
ThinBasic has the capability to work in Console Mode, Windowed Mode or Special Window Mode, such as OpenGL programs.
You can run programs without any kind of interface also.
ThinBasic has a very big set of functions, you can learn about them with the help file or using the online help at:
http://www.thinbasic.org/public/applications/thinbasic/onlyforyoureyes/HTML/index.html?introducingthinbasic.htm

The download link of the plugin is:
https://app.box.com/s/vjm9bx240m354wzfbjgp

Features

At this moment, you can do the following actions:

a) at NeoBook side:

ae_TB_Reset: Resets all ThinBasic engine.
ae_TB_Init: Inits the ThinBasic engine.
ae_TB_LoadScript: Loads a *.tBasic file.
ae_TB_GetParametersList:  Gets the Global variables of the .tBasic file Before Run.
ae_TB_SetVar: Changes / Assigns value to a ThinBasic variable
ae_TB_Run: Runs the ThinBasic .tBasic program file.
ae_TB_GetScriptVariables: Gets a list of the Script Variables After Run.
ae_TB_GetVar: Get the value of a ThinBasic variable After Run.
ae_TB_SendCommand: Interacts with ThinBasic CallBack Function, sending commands.

*.tBasic files are the source code of thinBasic, like the *.PUB into NeoBook.
This files are plain text, and can be edited using any text editor, like notepad.

b) at ThinBasic side:

In order to use this functions, you need declare into your tBasic program the following lines:
 
Declare SUB PlayScript Lib "<<<LIBRARYLOCATION>>>" (BYVAL Script as string)
Declare SUB SetVariable Lib "<<<LIBRARYLOCATION>>>" (BYVAL Variable as String, BYVAL sValue as String)
Declare FUNCTION GetVariable Lib "<<<LIBRARYLOCATION>>>" (ByRef VarName AS STRING) as String
Declare FUNCTION GetObjectHandle Lib "<<<LIBRARYLOCATION>>>" (ByRef sname AS STRING) AS LONG

PlayScript: Sends Actions to be executed by NeoBook.
SetVariable: Sets / Changes a NeoBook variable value.
GetVariable: Gets the Value of a NeoBook Variable.
GetObjectHandle: Get the handle of a NeoBook Object.


a brief explanation of the mode of use of each action:

ae_TB_Reset
Purpose: Reset all ThinBasic engine.
Usage: ae_TB_Reset 
Arguments: None
Returns: [ae_TB_InitStatus] Variable. Could be "Ok" or "Error"

ae_TB_Init
Purpose: Init ThinBasic engine.
Usage: ae_TB_Init
Arguments: None
Returns: [ae_TB_InitStatus] Variable. Could be "Ok" or "Error"

ae_TB_LoadScript
Purpose: load a ThinBasic source code from file or variable.
Usage: ae_TB_LoadScript "FileName or Text" "F or V or X"
Arguments: 
FileName or Text: the fullpath to the.tBasic file or the variable with the thinBasic source code
Input Type: F for File or V for Variable (or string directly) or X for Encrypt File. Usage only one letter: F or V or X
Returns: None

ae_TB_GetParametersList
Purpose: Get a List of the parameters used into the thinBasic source code BEFORE RUN
The parameters are the variables you need set before run the script.
you could add any parameters adding into the thinBasic source code the following format
'<<<ParameterName>>>
Note the single quote at the begin of the text. 
thinBasic example:
 
Global YourName as string  'Always declare as Global the variable before use it
'<<<YourName>>>
MsgBox (0, "Hello " & YourName)
 
Usage: ae_TB_GetParametersList "ReturnVar" "Delimiter"
Arguments: 
ReturnVar: Is the name of the NeoBook Variable to put the list of parameters
Delimiter: is the character to separate the Parameters. Usually [#13][#10] (best to use into a ListBox)
Returns: [ReturnVar] NeoBook Variable.


ae_TB_SetVar
Purpose: Changes / Assigns value to a ThinBasic variable
You must declare the variable previous to set the value
 
Global YourName as string  'Always declare as Global the variable before use it
'<<<YourName>>>
 
Usage: ae_TB_SetVar "VarName" "VarValue" "VarType" 
Arguments: 
VarName: The Name of the ThinBasic Variable (in the sample: "YourName"
VarValue: The value for the ThinBasic Variable, like "David", "John Doe", etc
VarType: N for Numeric variable, S for string Variable.
Using previous sample, the function should be something like:
ae_TB_SetVar "YourName" "John Doe" "S"
Returns: [ae_TB_Data] Variable, with all ThinBasic source addapted with the new variable value


ae_TB_Run
Purpose: Run the ThinBasic program
Usage: ae_TB_Run "Registration Key"
Arguments: 
Registration Key: is the key i provide you.
Returns: No variables. is program-dependant.

ae_TB_GetScriptVariables
Purpose: Get a List of the parameters used into the thinBasic source code  AFTER RUN
Usage: ae_TB_GetScriptVariables "ReturnVar" "Delimiter" 
Arguments: 
ReturnVar: Is the name of the NeoBook Variable to put the list of parameters
Delimiter: is the character to separate the Parameters. Usually [#13][#10] (best to use into a ListBox)
Returns: [ReturnVar] NeoBook Variable.

ae_TB_GetVar
Purpose: Get the value of a thinBasic Variable after run
Usage: ae_TB_GetVar "ThinBasicVar" "NeoReturnVar"
Arguments: 
ThinBasicVar: is the name of the ThinBasic variable
NeoReturnVar: is the name of the NeoBook Return Variable
Returns: 
[NeoReturnVar.Type] Variable. Could be "S" for String or "N" for Numeric
[NeoReturnVar.Value] Variable. The value of the variable

ae_TB_SendCommand
Purpose: Interacts with the Callback thinBasic function, sending commands. Is the way to run functions within the thinBasic program.
Usage: ae_TB_SendCommand "ThinBasicWinHandle" "Message" "Value"
Arguments: 
ThinBasicWinHandle: is the handle of the ThinBasic dialog or window
Message: is the command you send to the Callback function. usually "273" (WM_COMMAND)
Value: the number of message that be processed by the Callback function.
Returns: None. is program-dependant

PlayScript
Purpose: Execute a NeoBook Action or SubRoutine
Usage: PlayScript "NeoBookAction"
Arguments: 
NeoBookAction: Like: "Gosub " + $DQ + "NeoFunction" + $DQ
Example:
 
Local sAction as string
sAction = "AlertBox " + $DQ + "ThinBasic Executes NeoBook" + $DQ + " " + $DQ + "Hello World, Hello NeoBook" + $DQ
PlayScript(sAction)
 
Returns: None. is program-dependant

SetVariable
Purpose: Change / assign value to a NeoBook Variable
Usage: SetVariable "NeoBookVar" "Value"
Arguments: 
NeoBookVar: The NeoBook Variable
Value: The value to store into
Example:

SetVariable("NeoVar", "Hello World")
Returns: None

GetVariable
Purpose: Get the value from a NeoBook Variable
Usage: ThinBasicVar = GetVariable "NeoBookVar"
Arguments: 
NeoBookVar: The NeoBook Variable
Example:
 
Local ReturnString as string
ReturnString = GetVariable("NeoVar")
Returns: ThinBasicVar

GetObjectHandle
Purpose: Get the handle of a NeoBook Object
Usage: ThinBasicVar = GetObjectHandle "NeoBookObject"
Arguments: 
NeoBookObject: The NeoBook Object, like "Button1"
Example:
 
Local ReturnLong as Long
ReturnLong = GetObjectHandle("Button1")
Returns: ThinBasicVar

Structure of a ThinBasic Program
This help does not replace the Help File, please read it for detailed explanations

First Directive: USES
Tells to a ThinBasic what kind of services you need into the program
Examples:
Uses "Console"
Uses "UI"  (For windowed programs)
Uses "Math" (for combination or permutations)
Uses "OS" (for OS enviroment functions)
etc

Second directive:
Declare (if needed) the 4 functions for communication with NeoBook
 
Declare SUB PlayScript Lib "<<<LIBRARYLOCATION>>>" (BYVAL Script as string)
Declare SUB SetVariable Lib "<<<LIBRARYLOCATION>>>" (BYVAL Variable as String, BYVAL sValue as String)
Declare FUNCTION GetVariable Lib "<<<LIBRARYLOCATION>>>" (ByRef VarName AS STRING) as String
Declare FUNCTION GetObjectHandle Lib "<<<LIBRARYLOCATION>>>" (ByRef sname AS STRING) AS LONG
 
let <<<LIBRARYLOCATION>>>  as is, Plugin assigns the correct path

Third Directive: Declare all Global Variables you must use in combination with NeoBook
 
Global sVarName as string
Global nVarAge as long
Global sVarAddress as string
'<<<sVarName>>>
'<<<nVarAge>>>
'<<<sVarAddreess>>>


Fourth directive: Your main program goes here.

Fiveth directive: the callback function (if any) goes here

With all this settings you can do your own tBasic programs.
I will put a lot of samples on the following posts.

Have fun !
David de Argentina

Version History:

 

 

 

Plugin NeoThinBasic 1.06 is available.

Plugin Download Link:
https://app.box.com/s/dml7usmb94fh1uxxbkxl

Replace the previous plugin with this one.

Plugin Full Package download link:
https://app.box.com/s/9vbdj8p75ayc0v5tahuo

The ZIP includes:
Distribution Folder
|_ NeoThinBasic.NBP: The plugin itself.
|_ ThinCore.DLL: The ThinBasic core library. Must be on the same folder of the plugin
|_ SDK.PUB: Sample of the use the exported functions of the plugin
|_ SDK.tBasic: Associated .tBasic (source code) of the SDK.PUB
|_ BIN Folder: here goes your own Libraries (DLL's) if you have any
|_ HELP Folder: All Help Files of ThinBasic
|_ INC Folder: here goes all include files (.INC) to declare functions of Libraries (.DLL's)
|_ LIB Folder: here goes all aditional ThinBasic DLL's called by USES "LIBNAME"
|_ MOD Folder: here goes your own modules called by MODULE "MODNAME"

Samples Package Download link:
https://app.box.com/s/b0eeol19cwoq2lmpj0yn
ZIP includes 300+ categorized samples.

Major Changes:

* Plugin works fine on Debug Time and Execution Time. No error Messages.

* Now the plugin could be compiled into the executable program. 
You only need include the thinCore.dll and the LIB folder (and your own files, too) for your programs distribution

* Added a third option to ae_TB_LoadScript action: Load an encrypted file (ideal for patches, updates for your programs that you don't like source code be visible)

Usage: 
ae_TB_LoadScript "SDKX.tBasic" "X" <-- the "X" parameters means the file is encrypted.

* New Debug Mode interface, to be more friendly with the users.

* Added a new Function: ae_TB_EncryptFile
Purpose: Convert an human readeable .tBasic source file to an encrypted .tBasic source file.

Usage:
ae_TB_EncryptFile ".tBasic Source File" ".tBasic Target File"

Where:
.tBasic Source File: is the normal (readeable) ThinBasic Source File to convert
.tBasic Target File: is the encrypted file converted

Example:
ae_TB_EncryptFile "SDK.tBasic" "SDKX.tBasic"

* Now, the .tBasic could be readed from [embedded] mode directly.
Using this mode, you don't need to let visible the .tBasic file.

Example: (assume you had embedded the SDK.tbasic file)


GetObjectHandle "Boton1" "[h]"
FileToVar "[Embedded]SDK.tBasic" "[Variable]"
ae_TB_Reset
ae_TB_Init
ae_TB_LoadScript "[Variable]" "V"
ae_TB_SetVar "NeoBook" "True" "S"
ae_TB_Run "Reg_Key"


* Some minor changes

Version:  1.06
Updated On:  5 Feb 2015
Downloads:  490
File Size:  0 Bytes
Publisher:  Aplicaciones Especiales
Home Page:  Special Apps
Price:  $19.95
Platform:  NeoBook 4/5
License:  Shareware
Limitations:  Nag Screen
User Rating: 
[Not Rated] Rate It!
Submitted By:  David_de_Argentina

User Reviews (1) | Rate this Plug-In | Report Broken Link | Recommend

Other Plug-Ins submitted by David_de_Argentina:




New Plug-Ins
New Pubs
Search