Open Forum > What's New

Script BASIC Windows 32 bit - Download Available

(1/4) > >>

support:
I have finally assembled an Inno install for Script BASIC for Windows 32 bit with extension modules and their dependencies included. This is my first public release in this format and would appreciate any feedback you're willing to offer to make Script BASIC even better for everyone.

If you plan on using the MySQL extension module or use the SBHTTPD proxy web server, I highly recommend installing the 32 bit version of the XAMPP package (and any of the other free packages they offer) for your local  database and Apache web server environment.

Script BASIC Examples and Source


Note: Download is currently being rebuilt to add new features. Check Back Again Soon.

support:
I was able to use SBT and run multiple IUP GUI threads.

iup_3buttonsboot.sb

--- Code: Script BASIC ---IMPORT sbt.sbiIMPORT iup.sbi sb1 = SB_ThreadStart("iup_3buttons_1.sb",undef,"C:/Windows/SCRIBA.INI")SB_msSleep(2500)sb2 = SB_ThreadStart("iup_3buttons_2.sb",undef,"C:/Windows/SCRIBA.INI") LINE INPUT wait Iup::Close() SB_Destroy(sb1)SB_Destroy(sb2) 
iup_3buttons_1

--- Code: Script BASIC ---' IUP Button / Event Example IMPORT iup.sbi SUB Btn1_clicked  PRINT "Thread 1 - Button 1\n"END SUB SUB Btn2_clicked  PRINT "Thread 1 - Button 2\n"END SUB SUB Btn3_clicked  PRINT "Thread 1 - Button 3\n"END SUB SUB Win_exit  Iup::ExitLoop = TRUEEND SUB Iup::Open()win = Iup::Create("dialog")Iup::SetAttributes(win, "TITLE=\"IUP Thread 1\", SIZE=300x")horzbox = Iup::Create("hbox")Iup::SetAttributes(horzbox, "GAP=5")btn1 = Iup::Create("button")Iup::SetAttributes(btn1, "TITLE=Button1, EXPAND=HORIZONTAL")btn2 = Iup::Create("button")Iup::SetAttributes(btn2, "TITLE=Button2, EXPAND=HORIZONTAL")btn3 = Iup::Create("button")Iup::SetAttributes(btn3, "TITLE=Button3, EXPAND=HORIZONTAL")Iup::Append(horzbox, btn1)Iup::Append(horzbox, btn2)Iup::Append(horzbox, btn3)Iup::Append(win, horzbox)Iup::SetCallback(win,"CLOSE_CB",ADDRESS(Win_exit()))Iup::SetCallback(btn1,"ACTION",ADDRESS(Btn1_clicked()))Iup::SetCallback(btn2,"ACTION",ADDRESS(Btn2_clicked()))Iup::SetCallback(btn3,"ACTION",ADDRESS(Btn3_clicked()))Iup::Show(win)Iup::MainLoop() 
iup_3buttons_2

--- Code: Script BASIC ---' IUP Button / Event Example IMPORT iup.sbi SUB Btn1_clicked  PRINT "Thread 2 - Button 1\n"END SUB SUB Btn2_clicked  PRINT "Thread 2 - Button 2\n"END SUB SUB Btn3_clicked  PRINT "Thread 2 - Button 3\n"END SUB SUB Win_exit  Iup::ExitLoop = TRUEEND SUB Iup::Open()win = Iup::Create("dialog")Iup::SetAttributes(win, "TITLE=\"IUP Thread 2\", SIZE=300x")horzbox = Iup::Create("hbox")Iup::SetAttributes(horzbox, "GAP=5")btn1 = Iup::Create("button")Iup::SetAttributes(btn1, "TITLE=Button1, EXPAND=HORIZONTAL")btn2 = Iup::Create("button")Iup::SetAttributes(btn2, "TITLE=Button2, EXPAND=HORIZONTAL")btn3 = Iup::Create("button")Iup::SetAttributes(btn3, "TITLE=Button3, EXPAND=HORIZONTAL")Iup::Append(horzbox, btn1)Iup::Append(horzbox, btn2)Iup::Append(horzbox, btn3)Iup::Append(win, horzbox)Iup::SetCallback(win,"CLOSE_CB",ADDRESS(Win_exit()))Iup::SetCallback(btn1,"ACTION",ADDRESS(Btn1_clicked()))Iup::SetCallback(btn2,"ACTION",ADDRESS(Btn2_clicked()))Iup::SetCallback(btn3,"ACTION",ADDRESS(Btn3_clicked()))Iup::Show(win)Iup::MainLoop() 

support:
You can start a SB thread in two ways. The first method gives you the option to run a script from a string and just load the script without running it.

sbt_2ways.sb

--- Code: Script BASIC ---IMPORT sbt.sbi ' Thread 1sb1 = SB_New()SB_Configure sb1, "C:/Windows/SCRIBA.INI"SB_Load sb1, "hellothread.sb"SB_Run sb1, "" ' Thread 2sb2 = SB_ThreadStart("hellothread.sb",undef,"C:/Windows/SCRIBA.INI") SB_Destroy(sb2)SB_Destroy(sb1) 
hellothread.sb

--- Code: Script BASIC ---PRINT "Hello world from a thread\n" 

C:\ScriptBASIC\examples>scriba sbt_2ways.sb
Hello world from a thread
Hello world from a thread

C:\ScriptBASIC\examples>

support:
I was thinking of putting together a Windows 64 bit Script BASIC Inno install but I haven't received any feedback on the 32 bit version I have already posted. Would you put forth the effort if you were me?

AlyssonR:
I haven't had a chance to do much with the 32-bit install yet (real life intrudes) but it is both blisteringly fast, and a very easy install. I have seen no problems at all with what little I have done.


Given that I am running windows 7 Pro 64-bit on a moderately scaled workstation:

I think that I would only bother with a 64-bit version if it were available for the other operating systems, and if there were some genuine advantage to a 64-bit version - such as speed, extended precision maths, storage etc. Game writers might have more to say about that, though. I'm not sure what advantages might be available with a 64-bit install.

Going forward, I can see backward compatability with 32-bit processors going the way 16-bit support in Windows has been dropped (and woe betide anyone who actually has 8-bit software for a PC  ??? ) - and at that time, I guess a 64-bit version will be necessary.

While I would like to install a 64-bit version, right now, the 32-bit version of SB is perfectly sufficient. (mind you, all of my development is using 32-bit software - VB6, mainly).


My bottom line: I believe that a 64-bit SB install will be necessary at some point, so now is probably a good time to get started - before it becomes the only version acceptable under Windows 11, 12 or whatever. No rush.

Navigation

[0] Message Index

[#] Next page

Go to full version