wxBasicscript - script language for Xdialog
wxBasicscript - script language for Xdialog
Xdialog is part of puppy.
You can easily create "grafical" programs with it.
But not everybody is comfortable with the complex Shell-Syntax.
So I slightly modified the very small (53 kb) command line version of wxBasic to work perfect with Xdialog.
This DotPup includes the small interpreter "wxbasicscript" and an example program.
A wxBasic-"script" is executable like a shellscript.
You can choose to open it with a texteditor in the Demo.
Visit http://xdialog.dyns.net/ to see, how Xdialog can be used to display many other dialogs.
Here is a .tgz for other Linuxes than puppy:
http://noforum.de/dotpups/wxBasicscript03.tgz
Mark
You can easily create "grafical" programs with it.
But not everybody is comfortable with the complex Shell-Syntax.
So I slightly modified the very small (53 kb) command line version of wxBasic to work perfect with Xdialog.
This DotPup includes the small interpreter "wxbasicscript" and an example program.
A wxBasic-"script" is executable like a shellscript.
You can choose to open it with a texteditor in the Demo.
Visit http://xdialog.dyns.net/ to see, how Xdialog can be used to display many other dialogs.
Here is a .tgz for other Linuxes than puppy:
http://noforum.de/dotpups/wxBasicscript03.tgz
Mark
- Attachments
-
- wxBasicscript03.pup
- (59.74 KiB) Downloaded 969 times
-
- wxbasicshxdialog.jpg
- (48.29 KiB) Downloaded 4411 times
Last edited by MU on Wed 14 Sep 2005, 23:21, edited 7 times in total.
Version 02
I wrote some more functions for easier usage.
Now you can use code like this:
or
Mark
I wrote some more functions for easier usage.
Now you can use code like this:
Code: Select all
//////////////////////////////////////////////////////////////////////
// Simple Message
xmessage ( "I am a Xmessage" )
//////////////////////////////////////////////////////////////////////
// User-defined Buttons
choice = xmessage( "-buttons 'yes','no','something else' 'your choice?'" )
if choice != nothing then
xmessage( choice )
end if
Code: Select all
//////////////////////////////////////////////////////////////////////
// menue
dialog = "--title 'MENU BOX' "&
" --menu 'Hi, this is a menu box. "&
" Choose the OS you like:' 0 0 10 "&
" 'Linux' 'The Great Unix Clone for 386/486' "&
" 'MSDOS' 'Microsoft DOS'"
result , choice = xdialog ( dialog )
if result = 0 then
dialog = "--title 'info' --msgbox '" & choice & " GOODBYE :-)' 0 0"
else
dialog = "--title 'info' --msgbox 'dismissed' 0 0"
end if
result , choice = xdialog ( dialog )
Mark
Last edited by MU on Wed 14 Sep 2005, 23:21, edited 1 time in total.
There was a small bug in setting the Path.
Uploaded 02 again.
For the 2 people who downloaded the old Pup: replace this function in the examplescript (or download again):
I also added a function to add Gtkdialog.
It allows to create Windows with XML.
This is not tested a lot, as I am new to this.
Example:
Mark
Uploaded 02 again.
For the 2 people who downloaded the old Pup: replace this function in the examplescript (or download again):
Code: Select all
function getstartpath()
full = command(2)
if left ( full , 1 ) != "/" then return "./"
return cutright( full , "/" )
end function
It allows to create Windows with XML.
This is not tested a lot, as I am new to this.
Example:
Code: Select all
//######################
//# test gtkdialog
//#
//######################
thewindow="DemoWindow='\n"&
" <hbox>\n"&
" <text>\n"&
" <label>This small window demontrates how Gtkdialog might be used in wxBasicSH. - Button: Show Xcalendar and exit</label>\n"&
" </text>\n"&
" <button>\n"&
" <input file>/usr/local/lib/X11/mini-icons/wizard16.xpm</input>\n"&
" <action>/usr/X11R6/bin/xcalendar &</action>\n"&
" <action>exit</action>\n"&
" </button>\n"&
" </hbox>\n"&
"'\n"
choice = gtkdialog ( thewindow )
xmessage ( "Returnvalue from Gtkdialog was: " & choice )
Hi,
wxbasic myprogram.wxb
or
wxbasicsh myprogram.wxbsh
wxbasic is the grafical version with "inbuilt" Windows.
wxbasicsh is a comandlineversion optimized for usage with xmessage and xdialog.
According to your name I suggest you are german?
You can find a small introduction to wxbasic here:
http://wxbasic.noforum.de
You also might add the line
#!/usr/bin/wxbasic
as the first line to main.wxb, and make it executable:
chmod 755 main.wxb
Then you can start it like a "main.exe":
./main.wxb
(or click on it in rox)
Mark
wxbasic myprogram.wxb
or
wxbasicsh myprogram.wxbsh
wxbasic is the grafical version with "inbuilt" Windows.
wxbasicsh is a comandlineversion optimized for usage with xmessage and xdialog.
According to your name I suggest you are german?
You can find a small introduction to wxbasic here:
http://wxbasic.noforum.de
You also might add the line
#!/usr/bin/wxbasic
as the first line to main.wxb, and make it executable:
chmod 755 main.wxb
Then you can start it like a "main.exe":
./main.wxb
(or click on it in rox)
Mark
Barry,
there also is english documentation on the web, but it is somewhat outdated (was written for wxBasic 0.5, current version is completely rewritten version 2 Alpha).
David Cuny plans to release wxBasic2 as "final" release this month (maybe next), including some new documentation.
You can download the wxbasic for windows (preview) including some very basic new documentation here:
http://wxbasic.sourceforge.net/bleed.php
The Linux-version is nearly identical to the windows-version, I just added some patches and new functions as David currently has messed up his Linux testing some new libraries (wxBasic is statically compiled with wxwidgets, http://wxwidgets.org . It uses 2.4.2, as 2.6.1 makes some problems).
Greets, Mark
there also is english documentation on the web, but it is somewhat outdated (was written for wxBasic 0.5, current version is completely rewritten version 2 Alpha).
David Cuny plans to release wxBasic2 as "final" release this month (maybe next), including some new documentation.
You can download the wxbasic for windows (preview) including some very basic new documentation here:
http://wxbasic.sourceforge.net/bleed.php
The Linux-version is nearly identical to the windows-version, I just added some patches and new functions as David currently has messed up his Linux testing some new libraries (wxBasic is statically compiled with wxwidgets, http://wxwidgets.org . It uses 2.4.2, as 2.6.1 makes some problems).
Greets, Mark
German? Close, but not quite I'm Belgian, Flemish to be precise. I know Dutch, English and French, but my German sucks Same as my LatinMU wrote:Hi,
wxbasic myprogram.wxb
or
wxbasicsh myprogram.wxbsh
wxbasic is the grafical version with "inbuilt" Windows.
wxbasicsh is a comandlineversion optimized for usage with xmessage and xdialog.
According to your name I suggest you are german?
You can find a small introduction to wxbasic here:
http://wxbasic.noforum.de
You also might add the line
#!/usr/bin/wxbasic
as the first line to main.wxb, and make it executable:
chmod 755 main.wxb
Then you can start it like a "main.exe":
./main.wxb
(or click on it in rox)
Mark
Anyways, I've also given the Windows version a try. I get the same errors. I must be doing something stupid. Here's a screenie.
Hm.. maybe you grabbed the old version, it is totally out of date.
You will need this one:
http://wxbasic.sourceforge.net/download/wxb2.zip
This is the alpha-version, that will become the "official" one this or next month.
David just tries to add a debugger and documentation, but it should be stable so far.
Greets to Belgium, Mark
You will need this one:
http://wxbasic.sourceforge.net/download/wxb2.zip
This is the alpha-version, that will become the "official" one this or next month.
David just tries to add a debugger and documentation, but it should be stable so far.
Greets to Belgium, Mark
I renamed wxbasicsh to wxbasicscript, because it is not a shell, but a scriptlanguage.
Files now end with .wxbs
I added new functions to the interpreter and the "Helpfunctions".
The "Helpfunctions" now are included as a seperate file "basefunctions.inc", so you can keep your own scripts small.
Improvements:
You now easily can read in files to a list, to add them to a menue for example.
This short code is a complete grafical Partition-Display:
The last version 02 had a disadvantage.
You could not simply copy&paste XDialog/Gtkdialog-examples, because wxBasic does not allow to spread strings over multiple lines.
So you had to add them in ""& ,like:
In Version 03, you can save your Xdialog or Gtk-dialog-Code to "template-files", where you don't need to adapt the code.
gtkdialog-test.tpl
test.wxbs
I also added more examples to the example-script, e.g. how to move windows "remote".
Mark
Files now end with .wxbs
I added new functions to the interpreter and the "Helpfunctions".
The "Helpfunctions" now are included as a seperate file "basefunctions.inc", so you can keep your own scripts small.
Improvements:
You now easily can read in files to a list, to add them to a menue for example.
This short code is a complete grafical Partition-Display:
Code: Select all
#!/usr/bin/wxbasicscript
include "basefunctions.inc"
//##################################
//# display partitions as a menue
//#
//##################################
shell( "probepart > /tmp/wxbdemo-partitions.txt" )
mypartitions = readfiletolist( "/tmp/wxbdemo-partitions.txt" )
removefile( "/tmp/wxbdemo-partitions.txt" )
dialog = " --title 'MENU BOX' --menu 'these are your partitions: ' 0 0 10"
counter = 1
for i = 0 to count( mypartitions ) -1
if left( mypartitions[i] , 1 ) = "/" then
dialog &= " '" & counter & "' '" & mypartitions[i] & "'"
counter += 1
end if
next
// display the menue
result , choice = xdialog ( dialog )
You could not simply copy&paste XDialog/Gtkdialog-examples, because wxBasic does not allow to spread strings over multiple lines.
So you had to add them in ""& ,like:
Code: Select all
dialog="DemoWindow='\n"&
" <hbox>\n"&
" <text>\n"&
gtkdialog-test.tpl
Code: Select all
DemoWindow='
<hbox>
<text>
<label>This small window is a Gtkdialog-window loaded from a file. The Button will start Xcalendar.</label>
</text>
<button>
<input file>/usr/local/lib/X11/mini-icons/wizard16.xpm</input>
<action>/usr/X11R6/bin/xcalendar &</action>
<action>exit</action>
</button>
</hbox>
'
Code: Select all
#!/usr/bin/wxbasicscript
include "basefunctions.inc"
dialog = readtemplate( "gtkdialog-test.tpl" )
choice = gtkdialog ( dialog )
xmessage ( "--nearmouse Returnvalue from Gtkdialog was: " & choice )
Mark
Last edited by MU on Thu 15 Sep 2005, 14:07, edited 1 time in total.
There currently just is this document:
http://noforum.de/dotpups/wxbasic.rtf
You can open it with abiword.
My version supports all commands except the "wx"-commands.
It also has some more, here is an overview of all commands taken from buitin.h:
{"abs", wBuiltinAbs, 1, 0},
{"acos", wBuiltinACos, 1, 0},
{"andbits", wBuiltinAndBits, 2, 0},
{"append", wBuiltinAppend, 2, 0},
{"append$", wBuiltinAppend, 2, 0},
{"argc", wBuiltinArgc, 0, 0},
{"argv", wBuiltinArgv, 1, 0},
{"asc", wBuiltinAsc, 1, 0},
{"asin", wBuiltinASin, 1, 0},
{"atan", wBuiltinATan, 1, 0},
{"chdir", wBuiltinChDir, 1, 0},
{"chr", wBuiltinChr, 1, 0},
{"chr$", wBuiltinChr, 1, 0},
{"clone", wBuiltinClone, 1, 0},
{"command", wBuiltinCommand, 0, 1},
{"connect", wBuiltinConnect, 3, 1},
{"count", wBuiltinCount, 1, 0},
{"cos", wBuiltinCos, 1, 0},
{"date", wBuiltinDate, 0, 0},
{"datevalue", wBuiltinTimeValue, 1, 0},
{"day", wBuiltinDay, 1, 0},
{"hasdir", wBuiltinDir, 0, 0},
{"direxists", wBuiltinDirExists, 1, 0},
{"disconnect", wBuiltinDisconnect, 2, 1},
{"eof", wBuiltinEof, 1, 0},
{"exp", wBuiltinExp, 1, 0},
{"fclose", wBuiltinFClose, 1, 0},
{"fgets", wBuiltinFGets, 1, 0},
{"fileexists", wBuiltinFileExists, 1, 0},
{"fix", wBuiltinFix, 1, 0},
{"floor", wBuiltinFix, 1, 0},
{"fopen", wBuiltinFOpen, 2, 0},
{"format", wBuiltinFormat, 1, 20},
{"format$", wBuiltinFormat, 1, 20},
{"fputs", wBuiltinFPuts, 2, 0},
{"frac", wBuiltinFrac, 1, 0},
{"freefile", wBuiltinFreeFile, 0, 0},
{"gettype", wBuiltinTypeOf, 1, 0},
{"getwxapp", wBuiltinGetWxApp, 0, 0},
{"getwxhandle", wBuiltinGetWxHandle, 1, 0},
{"haskey", wBuiltinHasKey, 2, 0},
{"hex", wBuiltinHex, 1, 0},
{"hour", wBuiltinHour, 1, 0},
{"indexes", wBuiltinIndexes, 1, 0},
{"insert", wBuiltinInsert, 3, 0},
{"isnothing", wBuiltinIsNothing, 1, 0},
{"isnumeric", wBuiltinIsNumeric, 1, 0},
{"insertat", wBuiltinInsert, 2, 0},
{"instr", wBuiltinInstr, 2, 1},
{"instr$", wBuiltinInstr, 2, 1},
{"int", wBuiltinInt, 1, 0},
{"kill", wBuiltinKill, 1, 0},
{"lcase", wBuiltinLCase, 1, 0},
{"lcase$", wBuiltinLCase, 1, 0},
{"left", wBuiltinLeft, 2, 0},
{"left$", wBuiltinLeft, 2, 0},
{"len", wBuiltinLen, 1, 0},
{"length", wBuiltinLen, 1, 0},
{"loc", wBuiltinLoc, 1, 0},
{"lof", wBuiltinLof, 1, 0},
{"log", wBuiltinLog, 1, 0},
{"lbound", wBuiltinLBound, 2, 0},
{"ltrim", wBuiltinLTrim, 1, 0},
{"ltrim$", wBuiltinLTrim, 1, 0},
{"mid", wBuiltinMid, 2, 1},
{"mid$", wBuiltinMid, 2, 1},
{"minute", wBuiltinMinute, 1, 0},
{"mkdir", wBuiltinMkDir, 1, 0},
{"month", wBuiltinMonth, 1, 0},
{"monthname", wBuiltinMonthName, 1, 0},
{"monthname$", wBuiltinMonthName, 1, 0},
{"notbits", wBuiltinNotBits, 1, 0},
{"now", wBuiltinNow, 0, 0},
{"orbits", wBuiltinOrBits, 2, 0},
{"prepend", wBuiltinPrepend, 2, 0},
{"quicksort", wBuiltinQuickSort, 3, 0},
{"randomize", wBuiltinRandomize, 0, 1},
{"readbyte", wBuiltinReadByte, 1, 0},
{"rename", wBuiltinRename, 2, 0},
{"repeat", wBuiltinRepeat, 2, 0},
{"repeat$", wBuiltinRepeat, 2, 0},
{"replace", wBuiltinReplace, 3, 1},
{"replace$", wBuiltinReplace, 3, 1},
{"reverse", wBuiltinReverse, 1, 0},
{"reverse$", wBuiltinReverse, 1, 0},
{"rinstrev", wBuiltinRInstr, 2, 1},
{"right", wBuiltinRight, 2, 0},
{"right$", wBuiltinRight, 2, 0},
{"rinstr", wBuiltinRInstr, 2, 1},
{"rmdir", wBuiltinRmDir, 2, 0},
{"rnd", wBuiltinRnd, 0, 1},
{"round", wBuiltinRound, 1, 0},
{"rtrim", wBuiltinRTrim, 1, 0},
{"rtrim$", wBuiltinRTrim, 1, 0},
{"run", wBuiltinRun, 1, 0},
{"second", wBuiltinSecond, 1, 0},
{"seek", wBuiltinSeek, 1, 1},
{"sgn", wBuiltinSgn, 1, 0},
{"shell", wBuiltinShell, 1, 0},
{"sin", wBuiltinSin, 1, 0},
{"slice", wBuiltinSlice, 3, 0},
{"space", wBuiltinSpace, 1, 0},
{"space$", wBuiltinSpace, 1, 0},
{"sqr", wBuiltinSqr, 1, 0},
{"sqrt", wBuiltinSqr, 1, 0},
{"str", wBuiltinStr, 1, 0},
{"str$", wBuiltinStr, 1, 0},
{"strf", wBuiltinStrF, 4, 0},
{"substr", wBuiltinSubStr, 3, 0},
{"tally", wBuiltinTally, 2, 0},
{"tan", wBuiltinTan, 1, 0},
{"ticks", wBuiltinTicks, 0, 0},
{"time", wBuiltinTime, 0, 0},
{"tostring", wBuiltinStr, 1, 0},
{"tostring$", wBuiltinStr, 1, 0},
{"timevalue", wBuiltinTimeValue, 1, 0},
{"trace", wBuiltinTrace, 1, 0},
{"trim", wBuiltinTrim, 1, 0},
{"trim$", wBuiltinTrim, 1, 0},
{"typeof", wBuiltinTypeOf, 1, 0},
{"ubound", wBuiltinUBound, 2, 0},
{"ucase", wBuiltinUCase, 1, 0},
{"ucase$", wBuiltinUCase, 1, 0},
{"val", wBuiltinVal, 1, 0},
{"weekday", wBuiltinWeekday, 1, 0},
{"weekdayname", wBuiltinWeekdayName, 1, 0},
{"weekdayname$", wBuiltinWeekdayName, 1, 0},
{"writebyte", wBuiltinWriteByte, 2, 0},
{"xorbits", wBuiltinXorBits, 2, 0},
{"year", wBuiltinYear, 1, 0},
{"xwin_usleep", wBuiltin_xwin_usleep, 1, 0},
{"xwin_createsimplewindow", wBuiltin_xwin_createsimplewindow, 0, 0},
{"xwin_listwindows", wBuiltin_xwin_listwindows, 0, 0},
{"xwin_listicons", wBuiltin_xwin_listicons, 0, 0},
{"xwin_listiconsofworkspace", wBuiltin_xwin_listiconsofworkspace, 1, 0},
{"xwin_listiconids", wBuiltin_xwin_listiconids, 0, 0},
{"xwin_listiconidsofworkspace", wBuiltin_xwin_listiconidsofworkspace, 1, 0},
{"xwin_activate", wBuiltin_xwin_activate, 1, 0},
{"xwin_iconify", wBuiltin_xwin_iconify, 1, 0},
{"xwin_toggle_fullscreen", wBuiltin_xwin_toggle_fullscreen, 1, 0},
{"xwin_move", wBuiltin_xwin_move, 3, 0},
{"xwin_resize", wBuiltin_xwin_resize, 3, 0},
{"xwin_info", wBuiltin_xwin_info, 1, 0},
{"xwin_classinfo", wBuiltin_xwin_classinfo, 1, 0},
{"xwin_select", wBuiltin_xwin_select, 0, 0},
{"xwin_select_1", wBuiltin_xwin_select_1, 0, 0},
{"xwin_multiselect", wBuiltin_xwin_multiselect, 0, 0},
{"xwin_screensize", wBuiltin_xwin_screensize, 0, 0},
{"xwin_getworkspaces", wBuiltin_xwin_getworkspaces, 0, 0},
{"xwin_getworkspace", wBuiltin_xwin_getworkspace, 0, 0},
{"xwin_setworkspace", wBuiltin_xwin_setworkspace, 1, 0},
{"xwin_movetoworkspace", wBuiltin_xwin_movetoworkspace, 2, 0},
{"xwin_notitlenoborder", wBuiltin_xwin_notitlenoborder, 1, 0},
{"xwin_hastitleandborder", wBuiltin_xwin_hastitleandborder, 1, 0},
{"xwin_titleandborder", wBuiltin_xwin_titleandborder, 1, 0},
{"xwin_setlayer", wBuiltin_xwin_setlayer, 2, 0},
{"xwin_setwmstruts", wBuiltin_xwin_setwmstruts, 5, 0},
{"xwin_exec", wBuiltin_xwin_exec, 1, 0},
The "Xwin"-functions were written by me.
They usually take a window-id as an argument ("0x0000001").
Some few functions like quicksort do not work, but there are functions written in wxbasic itself that do the same, search in the coding board for examples:
http://wxbasic.sourceforge.net/phpBB2/viewforum.php?f=3
(or ask me, and I will try to add it)
Someone is working on an authoring-system in wxBasic, that will be part of the official release.
He already converted the rtf to wxHelp(HTML)-Format, but did not release it yet.
Mark
http://noforum.de/dotpups/wxbasic.rtf
You can open it with abiword.
My version supports all commands except the "wx"-commands.
It also has some more, here is an overview of all commands taken from buitin.h:
{"abs", wBuiltinAbs, 1, 0},
{"acos", wBuiltinACos, 1, 0},
{"andbits", wBuiltinAndBits, 2, 0},
{"append", wBuiltinAppend, 2, 0},
{"append$", wBuiltinAppend, 2, 0},
{"argc", wBuiltinArgc, 0, 0},
{"argv", wBuiltinArgv, 1, 0},
{"asc", wBuiltinAsc, 1, 0},
{"asin", wBuiltinASin, 1, 0},
{"atan", wBuiltinATan, 1, 0},
{"chdir", wBuiltinChDir, 1, 0},
{"chr", wBuiltinChr, 1, 0},
{"chr$", wBuiltinChr, 1, 0},
{"clone", wBuiltinClone, 1, 0},
{"command", wBuiltinCommand, 0, 1},
{"connect", wBuiltinConnect, 3, 1},
{"count", wBuiltinCount, 1, 0},
{"cos", wBuiltinCos, 1, 0},
{"date", wBuiltinDate, 0, 0},
{"datevalue", wBuiltinTimeValue, 1, 0},
{"day", wBuiltinDay, 1, 0},
{"hasdir", wBuiltinDir, 0, 0},
{"direxists", wBuiltinDirExists, 1, 0},
{"disconnect", wBuiltinDisconnect, 2, 1},
{"eof", wBuiltinEof, 1, 0},
{"exp", wBuiltinExp, 1, 0},
{"fclose", wBuiltinFClose, 1, 0},
{"fgets", wBuiltinFGets, 1, 0},
{"fileexists", wBuiltinFileExists, 1, 0},
{"fix", wBuiltinFix, 1, 0},
{"floor", wBuiltinFix, 1, 0},
{"fopen", wBuiltinFOpen, 2, 0},
{"format", wBuiltinFormat, 1, 20},
{"format$", wBuiltinFormat, 1, 20},
{"fputs", wBuiltinFPuts, 2, 0},
{"frac", wBuiltinFrac, 1, 0},
{"freefile", wBuiltinFreeFile, 0, 0},
{"gettype", wBuiltinTypeOf, 1, 0},
{"getwxapp", wBuiltinGetWxApp, 0, 0},
{"getwxhandle", wBuiltinGetWxHandle, 1, 0},
{"haskey", wBuiltinHasKey, 2, 0},
{"hex", wBuiltinHex, 1, 0},
{"hour", wBuiltinHour, 1, 0},
{"indexes", wBuiltinIndexes, 1, 0},
{"insert", wBuiltinInsert, 3, 0},
{"isnothing", wBuiltinIsNothing, 1, 0},
{"isnumeric", wBuiltinIsNumeric, 1, 0},
{"insertat", wBuiltinInsert, 2, 0},
{"instr", wBuiltinInstr, 2, 1},
{"instr$", wBuiltinInstr, 2, 1},
{"int", wBuiltinInt, 1, 0},
{"kill", wBuiltinKill, 1, 0},
{"lcase", wBuiltinLCase, 1, 0},
{"lcase$", wBuiltinLCase, 1, 0},
{"left", wBuiltinLeft, 2, 0},
{"left$", wBuiltinLeft, 2, 0},
{"len", wBuiltinLen, 1, 0},
{"length", wBuiltinLen, 1, 0},
{"loc", wBuiltinLoc, 1, 0},
{"lof", wBuiltinLof, 1, 0},
{"log", wBuiltinLog, 1, 0},
{"lbound", wBuiltinLBound, 2, 0},
{"ltrim", wBuiltinLTrim, 1, 0},
{"ltrim$", wBuiltinLTrim, 1, 0},
{"mid", wBuiltinMid, 2, 1},
{"mid$", wBuiltinMid, 2, 1},
{"minute", wBuiltinMinute, 1, 0},
{"mkdir", wBuiltinMkDir, 1, 0},
{"month", wBuiltinMonth, 1, 0},
{"monthname", wBuiltinMonthName, 1, 0},
{"monthname$", wBuiltinMonthName, 1, 0},
{"notbits", wBuiltinNotBits, 1, 0},
{"now", wBuiltinNow, 0, 0},
{"orbits", wBuiltinOrBits, 2, 0},
{"prepend", wBuiltinPrepend, 2, 0},
{"quicksort", wBuiltinQuickSort, 3, 0},
{"randomize", wBuiltinRandomize, 0, 1},
{"readbyte", wBuiltinReadByte, 1, 0},
{"rename", wBuiltinRename, 2, 0},
{"repeat", wBuiltinRepeat, 2, 0},
{"repeat$", wBuiltinRepeat, 2, 0},
{"replace", wBuiltinReplace, 3, 1},
{"replace$", wBuiltinReplace, 3, 1},
{"reverse", wBuiltinReverse, 1, 0},
{"reverse$", wBuiltinReverse, 1, 0},
{"rinstrev", wBuiltinRInstr, 2, 1},
{"right", wBuiltinRight, 2, 0},
{"right$", wBuiltinRight, 2, 0},
{"rinstr", wBuiltinRInstr, 2, 1},
{"rmdir", wBuiltinRmDir, 2, 0},
{"rnd", wBuiltinRnd, 0, 1},
{"round", wBuiltinRound, 1, 0},
{"rtrim", wBuiltinRTrim, 1, 0},
{"rtrim$", wBuiltinRTrim, 1, 0},
{"run", wBuiltinRun, 1, 0},
{"second", wBuiltinSecond, 1, 0},
{"seek", wBuiltinSeek, 1, 1},
{"sgn", wBuiltinSgn, 1, 0},
{"shell", wBuiltinShell, 1, 0},
{"sin", wBuiltinSin, 1, 0},
{"slice", wBuiltinSlice, 3, 0},
{"space", wBuiltinSpace, 1, 0},
{"space$", wBuiltinSpace, 1, 0},
{"sqr", wBuiltinSqr, 1, 0},
{"sqrt", wBuiltinSqr, 1, 0},
{"str", wBuiltinStr, 1, 0},
{"str$", wBuiltinStr, 1, 0},
{"strf", wBuiltinStrF, 4, 0},
{"substr", wBuiltinSubStr, 3, 0},
{"tally", wBuiltinTally, 2, 0},
{"tan", wBuiltinTan, 1, 0},
{"ticks", wBuiltinTicks, 0, 0},
{"time", wBuiltinTime, 0, 0},
{"tostring", wBuiltinStr, 1, 0},
{"tostring$", wBuiltinStr, 1, 0},
{"timevalue", wBuiltinTimeValue, 1, 0},
{"trace", wBuiltinTrace, 1, 0},
{"trim", wBuiltinTrim, 1, 0},
{"trim$", wBuiltinTrim, 1, 0},
{"typeof", wBuiltinTypeOf, 1, 0},
{"ubound", wBuiltinUBound, 2, 0},
{"ucase", wBuiltinUCase, 1, 0},
{"ucase$", wBuiltinUCase, 1, 0},
{"val", wBuiltinVal, 1, 0},
{"weekday", wBuiltinWeekday, 1, 0},
{"weekdayname", wBuiltinWeekdayName, 1, 0},
{"weekdayname$", wBuiltinWeekdayName, 1, 0},
{"writebyte", wBuiltinWriteByte, 2, 0},
{"xorbits", wBuiltinXorBits, 2, 0},
{"year", wBuiltinYear, 1, 0},
{"xwin_usleep", wBuiltin_xwin_usleep, 1, 0},
{"xwin_createsimplewindow", wBuiltin_xwin_createsimplewindow, 0, 0},
{"xwin_listwindows", wBuiltin_xwin_listwindows, 0, 0},
{"xwin_listicons", wBuiltin_xwin_listicons, 0, 0},
{"xwin_listiconsofworkspace", wBuiltin_xwin_listiconsofworkspace, 1, 0},
{"xwin_listiconids", wBuiltin_xwin_listiconids, 0, 0},
{"xwin_listiconidsofworkspace", wBuiltin_xwin_listiconidsofworkspace, 1, 0},
{"xwin_activate", wBuiltin_xwin_activate, 1, 0},
{"xwin_iconify", wBuiltin_xwin_iconify, 1, 0},
{"xwin_toggle_fullscreen", wBuiltin_xwin_toggle_fullscreen, 1, 0},
{"xwin_move", wBuiltin_xwin_move, 3, 0},
{"xwin_resize", wBuiltin_xwin_resize, 3, 0},
{"xwin_info", wBuiltin_xwin_info, 1, 0},
{"xwin_classinfo", wBuiltin_xwin_classinfo, 1, 0},
{"xwin_select", wBuiltin_xwin_select, 0, 0},
{"xwin_select_1", wBuiltin_xwin_select_1, 0, 0},
{"xwin_multiselect", wBuiltin_xwin_multiselect, 0, 0},
{"xwin_screensize", wBuiltin_xwin_screensize, 0, 0},
{"xwin_getworkspaces", wBuiltin_xwin_getworkspaces, 0, 0},
{"xwin_getworkspace", wBuiltin_xwin_getworkspace, 0, 0},
{"xwin_setworkspace", wBuiltin_xwin_setworkspace, 1, 0},
{"xwin_movetoworkspace", wBuiltin_xwin_movetoworkspace, 2, 0},
{"xwin_notitlenoborder", wBuiltin_xwin_notitlenoborder, 1, 0},
{"xwin_hastitleandborder", wBuiltin_xwin_hastitleandborder, 1, 0},
{"xwin_titleandborder", wBuiltin_xwin_titleandborder, 1, 0},
{"xwin_setlayer", wBuiltin_xwin_setlayer, 2, 0},
{"xwin_setwmstruts", wBuiltin_xwin_setwmstruts, 5, 0},
{"xwin_exec", wBuiltin_xwin_exec, 1, 0},
The "Xwin"-functions were written by me.
They usually take a window-id as an argument ("0x0000001").
Some few functions like quicksort do not work, but there are functions written in wxbasic itself that do the same, search in the coding board for examples:
http://wxbasic.sourceforge.net/phpBB2/viewforum.php?f=3
(or ask me, and I will try to add it)
Someone is working on an authoring-system in wxBasic, that will be part of the official release.
He already converted the rtf to wxHelp(HTML)-Format, but did not release it yet.
Mark
I uploaded another (very small , good for learning) example, a small File-unzipper.
You will need the first example too (or Dotpupdownloader03), as this one here does not include the interpreter from new.
The unzipper works, I also added a non-functional "demo-tree" just for testing.
This requires Gtkdialog 0.59.8, which is included, but will remain in the demo-directory, because it is incompatible with older versions.
So DO NOT rename/copy it to /usr/sbin, or pupget and other tools will no longer work!!
But in the demo-folder there is no problem.
Mark
You will need the first example too (or Dotpupdownloader03), as this one here does not include the interpreter from new.
The unzipper works, I also added a non-functional "demo-tree" just for testing.
This requires Gtkdialog 0.59.8, which is included, but will remain in the demo-directory, because it is incompatible with older versions.
So DO NOT rename/copy it to /usr/sbin, or pupget and other tools will no longer work!!
But in the demo-folder there is no problem.
Mark
- Attachments
-
- unzipdemo.jpg
- (28.36 KiB) Downloaded 4591 times
-
- wxbasicscript-unzipdemo.pup
- (42.73 KiB) Downloaded 869 times
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Mark,
could you kindly post the source tarball for version 03, or whatever is the latest?
It is so interesting having such a small Basic that works with Xdialog and gtkdialog, and will be great in Puppy as an alternative for people not comfortable
with Tcl/Tk or Bash/Ash.
I want to compile it myself and create a Unleashed package. I'm gradually creating Puppy Sourcerer which has the source packages for Puppy and build scripts, and wxbasicscript will go into that.
Also, when wxbasicscript does go into Puppy, a doc file will be required...
and I was thinking, since this will be an easier programming alternative,
the doc file will need to be fairly comprehensive. ...I know that's asking a lot,
maybe that can be targetted as something we need sometime and for now
we just put in a very basic doc file.
could you kindly post the source tarball for version 03, or whatever is the latest?
It is so interesting having such a small Basic that works with Xdialog and gtkdialog, and will be great in Puppy as an alternative for people not comfortable
with Tcl/Tk or Bash/Ash.
I want to compile it myself and create a Unleashed package. I'm gradually creating Puppy Sourcerer which has the source packages for Puppy and build scripts, and wxbasicscript will go into that.
Also, when wxbasicscript does go into Puppy, a doc file will be required...
and I was thinking, since this will be an easier programming alternative,
the doc file will need to be fairly comprehensive. ...I know that's asking a lot,
maybe that can be targetted as something we need sometime and for now
we just put in a very basic doc file.
Barry, very fine, it is good to see wxBasic getting more interest
It is a nice small language, but relatively unknown.
I attach the source.
Extract and run ./_compileconsole.sh
This will compile wxbasicscript.
Compiling the "big" version is more complicated, see here: http://wxbasic.sourceforge.net/phpBB2/v ... .php?t=911
Ok, I will try to write a small introduction to it next week.
Thanks, Mark
It is a nice small language, but relatively unknown.
I attach the source.
Extract and run ./_compileconsole.sh
This will compile wxbasicscript.
Compiling the "big" version is more complicated, see here: http://wxbasic.sourceforge.net/phpBB2/v ... .php?t=911
Ok, I will try to write a small introduction to it next week.
Thanks, Mark
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
In the Puppy documentation, reference is made to X11 Basic and we have also considered Freebasic. However now that we have a Basic (WxBasic) that is being used AND that will be included in Puppy, hopefully a new layer of Puppy programmers will become invloved.
Good news Anyone up to doing a WxBasic page on the wiki? Perhaps with a Puppy specific tutorial?
Have created a stub here . . .
http://www.goosee.com/puppy/wikka/WxBasic
Good news Anyone up to doing a WxBasic page on the wiki? Perhaps with a Puppy specific tutorial?
Have created a stub here . . .
http://www.goosee.com/puppy/wikka/WxBasic
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Lobster,
You are our original Basic programming guru!
So you are the obvious choice to do some extra intro docs.
If Mark writes an overview of the features of wxbasic, someone (such as
yourself) can write a beginner's guide etc.
...we may attract a whole new bunch of people, writing gui apps for Puppy!
As this is looking like a "goer", I will probably remove Gambas pupget to avoid
confusion. It's a big bloated thing anyway.
You are our original Basic programming guru!
So you are the obvious choice to do some extra intro docs.
If Mark writes an overview of the features of wxbasic, someone (such as
yourself) can write a beginner's guide etc.
...we may attract a whole new bunch of people, writing gui apps for Puppy!
As this is looking like a "goer", I will probably remove Gambas pupget to avoid
confusion. It's a big bloated thing anyway.
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Shame about Gambas
I played with it and liked it but Wxbasic is being used (big difference)
Looks like I have been volunteered. I have been following Marks efforts with a lot of interest..
The first thing I need to be clear about . . .
is wxbasicscript (the run time interpreter) gonna be in 1.0.5 - 1.0.6? or will the full wxbasic be available?
Who is up for some simple Basic programming and testing? - We might write a Puppy wxBasic tutorial in wxbasic . . .
I played with it and liked it but Wxbasic is being used (big difference)
Looks like I have been volunteered. I have been following Marks efforts with a lot of interest..
The first thing I need to be clear about . . .
is wxbasicscript (the run time interpreter) gonna be in 1.0.5 - 1.0.6? or will the full wxbasic be available?
Who is up for some simple Basic programming and testing? - We might write a Puppy wxBasic tutorial in wxbasic . . .