Source language: Translate to:

Beta Testing NeoThinBasic Plugin

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Tue Oct 01, 2013 2:37 pm

Hi all,

I'm working on a ThinBasic plugin.

ThinBasic ( http://www.thinbasic.com ) is a Basic interpreter that runs as a rocket.

It can run programs with no interface, console, dialogs or special windows ( like openGL )

Syntax is very similar to VBScript, but with a lot of more capabilities.

At this moment, plugin does:

a) Load a ThinBasic Script ( .tBasic ) file
b) Set nested parameters before Run
c) Run the script
d) Get the ThinBasic Variables after run
e) Send Commands to the callback function of the Script ( if exists )

Instalation package could be downloaded at:

https://app.box.com/s/dml7usmb94fh1uxxbkxl

I provided +300 script files.
The script files ( .tBasic ) are text plain and could be edited with any editor ( like notepad )

I provided to 3 NeoBook .PUB Samples

* DemoTB.PUB: is a sample that learns howto load a script, set parameters values, run the script and get the resulting variables. Uses the test.tBasic script file.

* Dialog into Rectangle.PUB: Runs a script (RMChart Graphics) into a rectangle. Also, tne original menu is changed for a NeoBook Menu, that sends commands to the callback function for the script file. Sample uses the \samples\RMChart\NeoDemoRMChart.tBasic script file

* RunScripts.PUB: Allow to select any sample script and run then.

Notes:

Not all scripts were tested. if you receive a error message, you can edit the .tBasic file and do the changes needed to put in work the script. Usually, most common errors are for "File not found", check and change the paths where the script goes to get the file.

Some console scripts produces runtime errors. I think there are good samples, but we dont need do console programs...

Sometimes you will receive errors because the previous script are not corrected release from memory. Close the NeoBook Runscript program and Run it again and test the script again.

All help and tutorial files are included on the ZIP File.

There are a good suggestion you download the latest version of thinBasic engine.

The can find the donwload link at:

http://www.thinbasic.com/community/show ... hp?t=12212


Please, tell me your experience with this plugin (and your OS version too )
Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Tue Oct 01, 2013 9:06 pm

Plugin Updated to 1.01

Download Link:

https://app.box.com/s/68tzknfz0ni936mx3wva

Replace the install package plugin with this one

Fixes:

* ThinBasic Structures remains into memory after release. Now, you can open and run any .tBasic script file without need to close the RunScripts program.

Tips:

When you run a console program, usually at exit, close the console with the Upper Right X. it causes an error that closes the NeoBook program.

To fix this, add after the (usually) last line of the script CONSOLE_WAITKEY (similar to "press any key to exit") the following function:

CONSOLE_FREE

This fix the error, and script resumes correctly to NeoBook program

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Tue Oct 01, 2013 9:46 pm

If you have problems with the paths of needed files into any script, beware with the defined thinBasic functions for path

APP_SourcePath
and
APP_ScriptPath

Because both functions return the path to the NeoBook EXE program, not the path of the script.
You can build the correct path based on this info.

you can check this creating a .tBasic script file with this function:

Code: Select all
msgbox(0,"APP_SourcePath: " & APP_SourcePath & chr$(13,10) & "APP_ScriptPath: " & APP_ScriptPath)


Save as TestPath.tBasic Script, and run it with the RunScripts.EXE program

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Wed Oct 02, 2013 9:42 am

Updated RMChart PUB and tScript sample.

Donwload link:

https://app.box.com/s/7m40oh9cpcocqkzpxj0i

Put each file in it corresponding folder.

* Added: Save as PNG and Print capabilities.
* Fixed: Donut Chart does not show back image.
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Wed Oct 02, 2013 11:47 am

This sample is for extract any images within an EML email archive:

(Save as ExtractImages.tBasic)

Code: Select all
USES "FILE"

Global infile as string
Global outfile as string


dim i as long
dim Texto as string
dim cuantos_tag as long
dim src as string
dim tags as string
dim found as string

'-----------------------------------------
' this lines are for NeoBook compatibility
'<<<infile>>>
'<<<outfile>>>
'-----------------------------------------

'-----------------------------------------
' uncomment this lines for direct thinBasic execution
'infile = "demo.eml"
'outfile = "out.eml"
'-----------------------------------------

texto = FILE_LOAD(infile)


cuantos_tag = parseCount(texto,"<img")

if cuantos_tag > 1 then
  for i = 2 to cuantos_tag
    tags = parse$(texto,"<img",i)
    src = parse$(tags,"src=",2)
    found = parse$(src,chr$(34),2)
    Texto = REMOVE$(Texto, found)
  Next i   
End if

FILE_SAVE(outfile, Texto)


Use it with the DemoTB.PUB Program

* Change into the "1.- Reset and Load" Button the:
ae_TB_LoadScript "[Pubdir]Test.tBasic" "F" action
for
ae_TB_LoadScript "[Pubdir]ExtractImages.tBasic" "F"

* Set the parameters InFile (any email.eml that has images within) and outFile (with another non-exist eml file)
* run the script

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Thu Oct 03, 2013 11:57 am

This sample is for check the diferent perfomances between NeoBook and thinBasic.

Download link:

https://app.box.com/s/pj2vd8jy8aax6hyiy1e7

Both samples executes exactly the same code. Result is exactly the same.

You can see this with the PUB and the tBasic files.

Both languages are interpreted.

See you the diferences

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Fri Oct 04, 2013 7:05 pm

New Sample:

Download link:

https://app.box.com/s/qpwoozscripotimf4jw8

Integrating NeoBook, thinBasic & OpenGL

Menu actions are launched by NeoBook.
Client Area is handled by thinBasic.
Render image is performed by OpenGL

WOW !

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Tue Oct 08, 2013 11:47 am

Hi all,

After a week of the first post, nobody has nothing to say ... (?)

Nobody interested ?

Is the plugin pretty confusing ?

Are anybody alive overthere ?

...
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby shx » Tue Oct 08, 2013 2:07 pm

Avast anti virus says that
thinbasic_math.dll is infected with win32:evo-gen
- Steven
User avatar
shx
 
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Beta Testing NeoThinBasic Plugin

Postby shx » Tue Oct 08, 2013 2:07 pm

Avast anti virus says that
thinbasic_math.dll is infected with win32:evo-gen
- Steven
User avatar
shx
 
Posts: 167
Joined: Sun Apr 03, 2005 5:49 am

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Tue Oct 08, 2013 2:41 pm

Hi shx,

See:
http://www.thinbasic.com/community/show ... php?t=9457

Thanks!
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Thu Oct 17, 2013 11:57 pm

New Sample to test: NeoMidi

Image


Download link:

https://app.box.com/s/j0r0va7zaslzf82lwh4r

Features: ( it is not perfect, but is mine... :lol: )

* Midi composer
* Can select between 127 instruments for each hand.
* 8 octaves for each instrument
* Can play chords.
* Can play different instruments for each hand
* Left hand: is handled by keyboard
* Right hand: is handled by mouse
* Allow to create sequence of notes into the input box (and play its once or forever)
* you can change the tempo for the sequence of notes.
* You can save your own sequence of notes into a .Notes file , and play them as rhythm or complement

Tips:

Unzip the ZIP package into any folder.
Preserve the folder structure !
Source code is included.
Recompile with another name, or you will loose the registered Midi.exe
All plugins used are included (see Plugins Folder)

You can change everything into the PUB file and the PlayNote.tBasic file
Do not produce changes into the Module MidiOut.tBasic !

Enjoy it !

PS: I'M STILL WAITING FOR YOUR COMMENTS ABOUT NEOTHINBASIC PLUGIN....

( as you can see, you can do everything you imagine with the combo NeoBook - NeoThinBasic )

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby David de Argentina » Tue Oct 22, 2013 4:13 pm

Hi all,

The plugin is allmost complete now.

Functions:

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.

b) at ThinBasic side:

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.

Download address for plugin and sample:

https://app.box.com/s/p39o3ybaamr3tvaz98l9

Tips:
In order to work properly, you must set the compile mode with this settings:

At the "Compile / Publish" Dialog, set the tab "Files"
You must set the RadioButton "Compile the files that NOT need to be extracted (ideal for CD)"

At the "Compile / Publish" Dialog, set the tab "Advanced"
You must set the RadioButton "Same Folder of the Compiled Publication"
You must uncheck the "Hide Extracted Files" CheckBox.

Enjoy it !
David de Argentina

PS: Dave: I think there is a good idea add into the "NeoBook Functions - VBScript & JavaScript" Forum a Topic (or SubForum) for NeoThinBasic Script Engine, because the diversity and potenciality is incredible....
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Beta Testing NeoThinBasic Plugin

Postby Neosoft Support » Thu Oct 24, 2013 9:35 am

PS: Dave: I think there is a good idea add into the "NeoBook Functions - VBScript & JavaScript" Forum a Topic (or SubForum) for NeoThinBasic Script Engine, because the diversity and potenciality is incredible....


OK, I'll add a subforum.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 1 guest