Recent Posts

Pages: 1 ... 7 8 [9] 10
81
What's New / Re: Script BASIC Windows 32 bit - Thread Start Options
« Last post by Support on February 20, 2017, 05:06:33 PM »
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
  1. IMPORT sbt.sbi
  2.  
  3. ' Thread 1
  4. sb1 = SB_New()
  5. SB_Configure sb1, "C:/Windows/SCRIBA.INI"
  6. SB_Load sb1, "hellothread.sb"
  7. SB_Run sb1, ""
  8.  
  9. ' Thread 2
  10. sb2 = SB_ThreadStart("hellothread.sb",undef,"C:/Windows/SCRIBA.INI")
  11.  
  12. SB_Destroy(sb2)
  13. SB_Destroy(sb1)
  14.  

hellothread.sb
Code: Script BASIC
  1. PRINT "Hello world from a thread\n"
  2.  


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

C:\ScriptBASIC\examples>

82
General Discussions / Re: ISAM - An appeal
« Last post by AlyssonR on February 19, 2017, 01:46:02 PM »
I haven't, but I will.

Thanks!
83
What's New / Re: Script BASIC Windows 32 bit - IUP Threading
« Last post by Support on February 17, 2017, 11:12:52 PM »
I was able to use SBT and run multiple IUP GUI threads.

iup_3buttonsboot.sb
Code: Script BASIC
  1. IMPORT sbt.sbi
  2. IMPORT iup.sbi
  3.  
  4. sb1 = SB_ThreadStart("iup_3buttons_1.sb",undef,"C:/Windows/SCRIBA.INI")
  5. SB_msSleep(2500)
  6. sb2 = SB_ThreadStart("iup_3buttons_2.sb",undef,"C:/Windows/SCRIBA.INI")
  7.  
  8. LINE INPUT wait
  9.  
  10. Iup::Close()
  11.  
  12. SB_Destroy(sb1)
  13. SB_Destroy(sb2)
  14.  

iup_3buttons_1
Code: Script BASIC
  1. ' IUP Button / Event Example
  2.  
  3. IMPORT iup.sbi
  4.  
  5. SUB Btn1_clicked
  6.   PRINT "Thread 1 - Button 1\n"
  7. END SUB
  8.  
  9. SUB Btn2_clicked
  10.   PRINT "Thread 1 - Button 2\n"
  11. END SUB
  12.  
  13. SUB Btn3_clicked
  14.   PRINT "Thread 1 - Button 3\n"
  15. END SUB
  16.  
  17. SUB Win_exit
  18.   Iup::ExitLoop = TRUE
  19. END SUB
  20.  
  21. Iup::Open()
  22. win = Iup::Create("dialog")
  23. Iup::SetAttributes(win, "TITLE=\"IUP Thread 1\", SIZE=300x")
  24. horzbox = Iup::Create("hbox")
  25. Iup::SetAttributes(horzbox, "GAP=5")
  26. btn1 = Iup::Create("button")
  27. Iup::SetAttributes(btn1, "TITLE=Button1, EXPAND=HORIZONTAL")
  28. btn2 = Iup::Create("button")
  29. Iup::SetAttributes(btn2, "TITLE=Button2, EXPAND=HORIZONTAL")
  30. btn3 = Iup::Create("button")
  31. Iup::SetAttributes(btn3, "TITLE=Button3, EXPAND=HORIZONTAL")
  32. Iup::Append(horzbox, btn1)
  33. Iup::Append(horzbox, btn2)
  34. Iup::Append(horzbox, btn3)
  35. Iup::Append(win, horzbox)
  36. Iup::SetCallback(win,"CLOSE_CB",ADDRESS(Win_exit()))
  37. Iup::SetCallback(btn1,"ACTION",ADDRESS(Btn1_clicked()))
  38. Iup::SetCallback(btn2,"ACTION",ADDRESS(Btn2_clicked()))
  39. Iup::SetCallback(btn3,"ACTION",ADDRESS(Btn3_clicked()))
  40. Iup::Show(win)
  41. Iup::MainLoop()
  42.  

iup_3buttons_2
Code: Script BASIC
  1. ' IUP Button / Event Example
  2.  
  3. IMPORT iup.sbi
  4.  
  5. SUB Btn1_clicked
  6.   PRINT "Thread 2 - Button 1\n"
  7. END SUB
  8.  
  9. SUB Btn2_clicked
  10.   PRINT "Thread 2 - Button 2\n"
  11. END SUB
  12.  
  13. SUB Btn3_clicked
  14.   PRINT "Thread 2 - Button 3\n"
  15. END SUB
  16.  
  17. SUB Win_exit
  18.   Iup::ExitLoop = TRUE
  19. END SUB
  20.  
  21. Iup::Open()
  22. win = Iup::Create("dialog")
  23. Iup::SetAttributes(win, "TITLE=\"IUP Thread 2\", SIZE=300x")
  24. horzbox = Iup::Create("hbox")
  25. Iup::SetAttributes(horzbox, "GAP=5")
  26. btn1 = Iup::Create("button")
  27. Iup::SetAttributes(btn1, "TITLE=Button1, EXPAND=HORIZONTAL")
  28. btn2 = Iup::Create("button")
  29. Iup::SetAttributes(btn2, "TITLE=Button2, EXPAND=HORIZONTAL")
  30. btn3 = Iup::Create("button")
  31. Iup::SetAttributes(btn3, "TITLE=Button3, EXPAND=HORIZONTAL")
  32. Iup::Append(horzbox, btn1)
  33. Iup::Append(horzbox, btn2)
  34. Iup::Append(horzbox, btn3)
  35. Iup::Append(win, horzbox)
  36. Iup::SetCallback(win,"CLOSE_CB",ADDRESS(Win_exit()))
  37. Iup::SetCallback(btn1,"ACTION",ADDRESS(Btn1_clicked()))
  38. Iup::SetCallback(btn2,"ACTION",ADDRESS(Btn2_clicked()))
  39. Iup::SetCallback(btn3,"ACTION",ADDRESS(Btn3_clicked()))
  40. Iup::Show(win)
  41. Iup::MainLoop()
  42.  

84
What's New / Script BASIC Windows 32 bit - Download Available
« Last post by Support on February 14, 2017, 02:57:04 PM »
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.
85
Download / Re: ScriptBasic 2.1 Linux
« Last post by Support on February 13, 2017, 01:51:22 PM »
Thanks Peter!

Quote
Greetings, I made an AUR package for the Arch linux users,

I'm assuming this is a 64 bit Arch Linux distribution?

I will be posting soon a Script BASIC for Windows 32 bit Inno setup file for testing and feedback.
86
Download / Re: ScriptBasic 2.1 Linux
« Last post by delmadord on February 13, 2017, 01:29:30 PM »
Greetings, I made an AUR package for the Arch linux users, in case someone is interested. Hope someone would be able to provide some feedback :)

https://aur.archlinux.org/packages/scriptbasic/
87
General Discussions / Re: ISAM - An appeal
« Last post by Support on February 12, 2017, 07:11:05 PM »
Have you looked at the HASH extension module as a basis for your ISAM index engine?

Quote
The module uses the same hash algorithm as the ScriptBasic symbol table handling routine. This is routine comes from the page 436 of the dragon book.

The dragon book:
Aho-Sethi-Ulman : Compilers
     Principles, techniques, and Tools
Addison-Wesley Publishing Company 1986

88
General Discussions / Re: ISAM - An appeal
« Last post by AlyssonR on December 19, 2016, 12:22:17 PM »
I couldn't agree more concerning Oracle.  ::)

Somewhere, I have a standalone copy of MyISAM, but it's for 16-bit systems and is thus Not A Lot of Use™ A bit like the 8-bit Viewdata system I sill have somewhere in the archive (probably the same place as Windows 1.1 and Word 1.0 )
89
General Discussions / Re: ISAM - An appeal
« Last post by Support on December 19, 2016, 11:53:56 AM »
Sometimes you need to reassure yourself that you didn't make a bad decision. (BerkleyBD & PostgreSQL ext. modules)

Everything Oracle touches turns to crap. About the only thing I still use Oracle related is VirtualBox.



90
General Discussions / Re: ISAM - An appeal
« Last post by AlyssonR on December 19, 2016, 11:17:14 AM »
OUCH! :o

That wasn't even a consideration when I was making the decision to roll my own.

At least with my approach, it will be guaranteed operable with SB as a local file process rather than depending upon an external service.

Thanks for trying, though - it IS appreciated.
Pages: 1 ... 7 8 [9] 10