Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Support

Pages: 1 ... 3 4 [5] 6 7 ... 12
61
Round Table / New Amazon Fire HD
« on: September 07, 2012, 09:29:13 AM »
Quote
Crippled Android

My biggest complaint about the Kindle Fire line is it's Android...under the hood. But you can't get under the hood without jail breaking the device. Android is so limited on these devices they shouldn't be allowed to call it Android. It should be called Kindroid. Android is entirely crippled on the Fire. If you are accustomed to a standard Android OS you will be disappointed with the functionality of the Fire version of Android.

Sounds like a challenge to me.  8)



The other side of the story

62
What's New / Android Desktop PC
« on: August 09, 2012, 01:49:55 PM »


P.S. Couldn't be happier with the new mouse interface to Android.  8)

63
What's New / C for Android
« on: July 11, 2012, 12:01:10 AM »
I installed the C4droid compiler and GCC plug-in. Here is my test Hello ScriptBasic compiled on my Samsung Galaxy Tab 2 10.1 tablet. Believe it or not, you can compile C programs on a non-rooted device. Using the /data/local/... gets around the requirement to use the /data/data/app_id directory structure for ownership and permissions management. I sure hope this doesn't change in future Android releases.

shell@android:/data/local/c4bin $ ls -l
-rwxrwxrwx app_101  app_101      3409 2012-07-11 00:51 c.out
shell@android:/data/local/c4bin $ ./c.out
Hello ScriptBasic
32|shell@android:/data/local/c4bin $

64
General Discussions / Android Linux
« on: July 06, 2012, 12:33:14 AM »
I thought I would start an Android Linux thread that isn't ScriptBasic specific. I ran into this link that explains the Android File System Hierarchy

I now have a rooted and unrooted Samsung Galaxy Tab 2 10.1 tablets to develop with. I will post my adventures in the world of root with rules. Android Linux is not your old man's Unix or even your brother's Linux. It's a prefab OS that comes with it's own set of rules.


65
Round Table / Samsung vs. Apple
« on: June 27, 2012, 11:34:05 AM »
Apple wins U.S. sales injunction against Samsung Galaxy Tab 10.1



Apple has prevailed in seeking a preliminary sales injunction against Samsung’s Galaxy Tab 10.1 tablet over the alleged infringement of the iPad’s patented design.

The win marks a major victory for Apple in the ongoing “thermonuclear war” against rival mobile operating system Google’s Android.

U.S. District Judge Lucy Koh previously rejected Apple’s attempt to block the tablet in the U.S., but was forced to reconsider her position following an appeals court ruling.

Once Apple posts a $2.6 million bond to protect Samsung against damages should the injunction be appealed and overturned, the sales ban can come into force.

Sure glad I got mine in time. You may want to run down to your favorite electronics store and pick one up before they are all gone. I bet the phone carriers selling the SGT2_10.1 are PISSED!!!  

Update

It looks like this injunction only covers the original Galaxy Tab and not the Galaxy Tab 2 10.1 tablet. Why would Apple go for an injunction on an obsolete device? The Tab 2 is almost a clone. (speakers now in front, and a few minor improvements over the original)

66
SQLite / SQLite3 SB ext. module
« on: June 13, 2012, 02:23:30 AM »
I have created a new board on the forum to make room for the new SQLite3 multi-platform extension module for ScriptBasic. Armando (AIR) has released a proof of concept as a sneak preview of what's to come.

Quote from: AIR
This is the .00000001 version, there are a lot more functions in the SQLite3 package.  Note that the actual SQLite3 package is statically linked into the library, thus the somewhat larger library size but the net result is that it doesn't require that SQLite3 be installed, which is a plus. All other libraries it needs are dynamically linked.

Code: [Select]
INCLUDE sqlite.bas

hdb=sqlite::open("testsql")
sqlite::execute(hdb,"create table demo (someval integer, sometxt text);")
sqlite::execute(hdb, "INSERT INTO demo VALUES (123,'hello');")
sqlite::execute(hdb, "INSERT INTO demo VALUES (234, 'cruel');")
sqlite::execute(hdb, "INSERT INTO demo VALUES (345, 'world');")

stmt = sqlite::query(hdb,"SELECT * FROM demo;")

while (sqlite::row(stmt) = 100)
    pr = pr & sqlite::row_value(stmt,0) & " - " & sqlite::row_value(stmt,1) & "\n"
wend

sqlite::close(hdb)

print pr

print "SQLite Version: ",sqlite::version(),"\n"

jrs@ip-10-166-185-35:~/tmp$ scriba sqltest.sb
123 - hello
234 - cruel
345 - world
SQLite Version: 3.7.12.1
jrs@ip-10-166-185-35:~/tmp$

67
What's New / Extention modules created with OxygenBasic
« on: May 18, 2012, 03:24:08 PM »
I'm please to announce that Charles has updated his efforts with using OxygenBasic to create ScriptBasic DLL extension modules. (early beta) Charles created a SQLite3 extension module as an example of wrapping standard libraries with the SB extension module interface.

Code: [Select]

  declare sub SQLite3_Demo        alias "sqlite3_demo"        lib "sqlite3_mdl"
  declare sub SQLite3_ErrMsg      alias "sqlite3_errmsg"      lib "sqlite3_mdl"
  declare sub SQLite3_Open        alias "sqlite3_open"        lib "sqlite3_mdl"
  declare sub SQLite3_Close       alias "sqlite3_close"       lib "sqlite3_mdl"
  declare sub SQLite3_Exec        alias "sqlite3_exec"        lib "sqlite3_mdl"
  declare sub SQLite3_Prepare_v2  alias "sqlite3_prepare_v2"  lib "sqlite3_mdl"
  declare sub SQLite3_Step        alias "sqlite3_step"        lib "sqlite3_mdl"
  declare sub SQLite3_Column_Text alias "sqlite3_column_text" lib "sqlite3_mdl"

  SQLITE_ROW = 100

  'print SQLite3_Demo()

  hdb=0
  dberr=0
  stmt=0
  pr="DataBase Listing:\n"
  result=0
  '
  sqlite3_open("testsql",hdb)
  '
  sqlite3_exec (hdb, "CREATE TABLE demo(someval INTEGER,  sometxt TEXT);", 0, 0, dberr)
  sqlite3_exec (hdb, "INSERT INTO demo VALUES (123, 'Hello');", 0, 0, dberr)
  sqlite3_exec (hdb, "INSERT INTO demo VALUES (234, 'cruel');", 0, 0, dberr)
  sqlite3_exec (hdb, "INSERT INTO demo VALUES (345, 'world');", 0, 0, dberr)
  '
  result = sqlite3_prepare_v2 (hdb, "SELECT * FROM demo;", -1, stmt, 0)
  '
  if dberr then
    print SQLite3_ErrMsg(dberr) & "\n"
  endif
  '
  while (sqlite3_step(stmt) = SQLITE_ROW)
    pr=pr & sqlite3_column_text(stmt, 0) & " - " & sqlite3_column_text(stmt, 1) & "\n"
  wend
  '
  sqlite3_close(hdb)

  print pr
  line input w

C:\scriptbasic\test>scriba sqlite3test.sb
DataBase Listing:
123 - Hello
234 - cruel
345 - world


C:\scriptbasic\test>

68
General Discussions / Build your own SL4A Facade
« on: May 16, 2012, 11:14:05 AM »
Quote from: Sergey Zelenev
I need to use a closed-source proprietary Java library with my SL4A standalone project (in form of APK).
I will need to expand the SL4A RPC API for that.

What would be a good example in the source on how to do that? I'm not too strong with Java, so something very basic would be helpful.

If you have a Java background, (Pete Verhas: do you have your ears on?) one could create their own Facade scripting extension to SL4A.

Quote from: anthony prieur
You need to create your own facade class and then add it to
FacadeConfiguration.java, like:

sFacadeClassList.add(MyCustomFacade.class);

FacadeConfiguration.class needs to be put out of script.jar and add it
to your project, see e.g.:
HERE

Simple facade you can use as base for yours:
HERE

69
What's New / ScriptBasic for Android
« on: April 07, 2012, 03:13:39 PM »
Armando Rivera and our new ScriptBasic developer Steve Dover were able to get scriba (ScriptBasic command line interpreter) working on Google Android Linux.



If you would like to run scriba on a unrooted device, you need to install it in the /data/data/jackpal.androidterm directory (or the directory your terminal app uses) to make it executable and read/write files.

Quote
It would be nice if you could put native binaries directly onto the SD card (either external or built-in) but you can't. Well, you can — but you won't be able to set execute permissions on them, which means they won't run. The SD card is mounted in such a way as to prohibit setting 'x' permissions. You can set execute permissions in the app storage area — that part of the filesystem that is rooted at /data/data. On an unrooted device you won't be able to create files just anywhere in this directory, because each app has its own security credentials — effectively each app runs as a different user. Only one directory under /data/data will be writeable by a specific app. Once you've found that directory, you can copy a binary into it, and run it at the terminal emulator prompt.

Quote
The results show that native C applications can be up to 30 times as fast as an identical algorithm running in Dalvik VM. Java applications can become a speed-up of up to 10 times if utilizing JNI.

70
Download / OSX Snow Leopard - ScriptBasic Installer
« on: February 20, 2012, 07:49:56 PM »
Quote from: Armando I. Rivera (AIR)
I wanted to see if SB would work under OSX Lion, and ran into a bunch of issues getting it to compile.  I wasn't able to work those out fully, so instead I compiled it under Snow Leopard.  Note that for maximum compatibility, I compiled it for 32bit.

One of the things that's always bugged me about SB's "installer" is the fact that by default the System bin and lib folders are used.  For any add-on, /usr/local should be used.  So I reconfigured SB to do just that.

One thing you will find is that without a proper installer, most Mac users won't bother trying it out.  Since I had to test a new package installer program for work, I decided to create a proper Mac installer for SB.  I placed the installer within a DMG file, which is like an ISO under other OS's, which Macs can mount directly with a double-click.

The installed folder structure looks like this:
Code: [Select]
/usr/local
   --bin
     --scriba
     --sbhttpd
  --lib
    --scriba
  --share
    --scriba
      --examples
      --include
      --source
      --Script Basic User Guide.pdf

/etc
  --scriba
    --basic.conf

Screen Shots











DOWNLOAD

71
Download / scribaw
« on: January 10, 2012, 07:09:47 PM »
Attached (see a few post down) is a 32 bit version of ScriptBasic for Windows that doesn't create a console window. Works great with IUP based GUI programs.

If you want to create a standalone Windows GUI executable without compiling, use the following command like switches with scribaw.

scribaw -Eo myGUIapp.exe myGUIapp.sb

This appends the script to the end of a copy of scribaw which always checks for an attached script before running anything passed to it on the command line.

Another option for small standalone executable scripts is compiling them with C.

scribaw -Co myGUIapp.c myGUIapp.sb

This will create a .exe GUI program in the range of 50 to 100K  and use libscriba.dll for the runtime library.


72
General Discussions / Installing ScriptBasic
« on: December 29, 2011, 12:22:06 PM »
If you are new to ScriptBasic and would like to give it a try, here are a few helpful tips to get you up and going with the Basic.

The following is based on using runtime versions of ScriptBasic.

Windows

1. Download the SB3 Windows 32 runtime.
2. Install it in a subdirectory of your choice. (I normally install SB in C:\scriptbasic)
3. Add C:\scriptbasic\bin to your search path
4. Create your scriba.conf file. (binary format)

This is a bare bones text version of scriba.conf I use.

scriba.conf.txt
Code: [Select]
dll ".dll"
module "c:\\scriptbasic\\modules\\"
include "c:\\scriptbasic\\include\\"
maxinclude 100
preproc (
  internal (
    dbg "c:\\scriptbasic\\modules\\dbg.dll"
    )
)
maxstep 0
maxlocalstep 0
maxlevel 3000
maxmem 0

To compile the ScriptBasic configuration file to a binary format, do the following at the console command line.

scriba -k scriba.conf.txt

This will create the binary version of your scriba.conf in your WINDOWS / WINXP system directory.
Hint: Move the binary version to the C:\scriptbasic\bin directory where you edited the text version and the binary will be created there from then on.

5. Download the latest IUP for Windows ZIP and put the iup.dll in the modules directory and the iup.bas in the include directory.

That should get you going with ScriptBasic.

I will post a Linux ScriptBasic install summary soon.


    

73
ScriptBasic Examples w/source / Hangman
« on: December 14, 2011, 07:38:49 PM »
Here is a hangman game I wrote for a job application programming test. The zip includes a Windows 32 and Linux 64 standalone executable with the common script source. I have attached the original spec. for the hangman game as well.

Code: [Select]
' Hangman - ScriptBasic


word[1]  = "COMPLY"
word[2]  = "THREE"
word[3]  = "VACATION"
word[4]  = "INFORMATION"
word[5]  = "TECHNOLOGY"
word[6]  = "ORLANDO"
word[7]  = "COMPUTER"
word[8]  = "ROUTER"
word[9]  = "PRINTER"
word[10] = "BUDGE"
word[11] = "SOFTWARE"
word[12] = "HARDWARE"
word[12] = "OBJECTIVE"
word[13] = "FILE"
word[14] = "EMPLOYEE"
word[15] = "SECURITY"
word[16] = "DATA"
word[17] = "REPORT"
word[18] = "PROPERTY"
word[19] = "OWNERSHIP"

hung_state[1] = """
 O

"""
hung_state[2] = """
 O
 |

"""
hung_state[3] = """
 O
\\|

"""
hung_state[4] = """
 O
\\|/

"""
hung_state[5] = """
 O
\\|/
 |

"""
hung_state[6] = """
 O
\\|/
 |
/

"""
hung_state[7] = """
 O
\\|/
 |
/ \\

"""

current_word = 0
guesses = 0

NEW_GAME:

IF current_word > UBOUND(word) THEN current_word = 0
current_word += 1
word_length = LEN(word[current_word])
partial_word = STRING(word_length, "_")

PRINTNL
PRINT "Welcome to hangman. You get seven chances to guess the mystery word.\n"
PRINTNL
temp_word = partial_word
GOSUB PRINT_OUT

AGAIN:

PRINT "Pick a letter (. to quit)--> "
LINE INPUT letter
letter = UCASE(TRIM(CHOMP(letter)))
IF letter = "." THEN
  PRINT "Good-bye!\n"
  END
END IF
IF LEN(letter) <> 1 OR ASC(letter) < 65 OR ASC(letter) > 90 THEN
  PRINT "You must enter a letter from A to Z\n"
  GOTO AGAIN
END IF

IF INSTR(selected_letters, letter) THEN
  PRINT "Sorry, you already guessed '" & letter & "'.\n"
  GOTO AGAIN
ELSE IF INSTR(word[current_word], letter) THEN
  FOR x = 1 TO word_length
    IF MID(word[current_word],x,1) = letter THEN
      partial_word = LEFT(partial_word, x-1) & letter & MID(partial_word, x+1)
    END IF
  NEXT
  IF word[current_word] = partial_word THEN
    temp_word = partial_word
    GOSUB PRINT_OUT
    PRINT "You guessed the word!\n"
    GOTO PLAY_AGAIN
  END IF  
ELSE
  guesses += 1
END IF
selected_letters &= letter

PRINT "Guessed letters: "
temp_word = selected_letters
GOSUB PRINT_OUT
IF guesses THEN PRINT hung_state[guesses]
temp_word = partial_word
GOSUB PRINT_OUT
IF guesses = 7 THEN
  PRINT "So sorry. You struck out.\n"
  PRINT "The mystery word was '",word[current_word],"'.\n"
  GOTO PLAY_AGAIN
END IF
GOTO AGAIN

PRINT_OUT:

FOR x = 1 TO LEN(temp_word)
  PRINT MID(temp_word, x, 1) & " "
NEXT
PRINTNL
PRINTNL
RETURN

PLAY_AGAIN:

PRINTNL
PRINT "New Game? <Y/N> "
LINE INPUT ng
ng = UCASE(CHOMP(ng))
IF ng = "Y" THEN
  selected_letters = ""
  guesses = 0
  GOTO NEW_GAME
END IF
END

74
Download / ScriptBasic CentOS 64
« on: November 28, 2011, 12:16:46 AM »
I have compiled and attached a runtime set of binaries for ScriptBasic running on CentOS 5 (Red Hat 5) 64 bit.

Let me know if you have any issues or questions using this release. ( support@scriptbasic.org )

75
IUP / IUP Linux and Windows
« on: November 03, 2011, 10:27:21 PM »
I'm glad that everyone is happy with GTK-Server but if you would have looked behind door #2, ...   ;)

The following is the status of the core IUP extension module. Functions that start with a * haven't been implemented yet. (stubs)

TODO List
  • Variable number of arguments for IUP functions that support it.
  • Return IUP name lists in an array. (like Iup::Info)
  • Bring callback handling internal to the extension module.
  • Add all the other IUP goodies (plot, GL, grids, ...)

IUP is an extensive library and wrapping it to work with ScriptBasic is going to take time. The SB macros help a lot but there is always something that crops up that puts the wagons in a circle.


System
Iup::Open
Iup::Close
Iup::Version
Iup::Load
Iup::LoadBuffer
Iup::SetLanguage
Iup::GetLanguage

Attribute
Iup::StoreAttribute
Iup::StoreGlobalAttribute
Iup::StoreAttributeId
Iup::StoreGlobalAttributeId
Iup::SetAttribute
Iup::SetGlobalAttribute
Iup::SetAttributeId
Iup::SetGlobalAttributeId
Iup::SetfAttribute
Iup::SetfAttributeId
Iup::SetfAttributeId2
Iup::SetAttributes
Iup::ResetAttribute
Iup::ResetGlobalAttribute
Iup::SetAtt
Iup::SetAttributeHandle
Iup::GetAttributeHandle
Iup::GetAttribute
Iup::GetAttributeId
Iup::GetAllAttributes
Iup::GetAttributes
Iup::GetFloat
Iup::GetFloatId
Iup::GetFloatId2
Iup::GetInt
Iup::GetInt2
* Iup::GetIntInt
Iup::GetIntId
Iup::GetIntId2
Iup::StoreGlobal
Iup::SetGlobal
Iup::GetGlobal

Events
GetEvent  (used internally)
Iup::MainLoop
Iup::MainLoopLevel
Iup::LoopStep
Iup::LoopStepWait
Iup::ExitLoop
Iup::Flush
Iup::GetCallback
Iup::SetCallback
* Iup::SetCallbacks
Iup::GetActionName
Iup::SetFunction
Iup::RecordInput
Iup::PlayInput

Layout
Iup::Create
Iup::Destroy
Iup::Map
Iup::Unmap
Iup::GetAllClasses
Iup::GetClassName
Iup::GetClassType
Iup::ClassMatch
Iup::GetClassAttributes
Iup::GetClassCallbacks
Iup::SaveClassAttributes
Iup::CopyClassAttributes
Iup::SetClassDefaultAttribute
Iup::Fill
Iup::Hbox
Iup::Vbox
Iup::Zbox
Iup::Radio
Iup::Normalizer
Iup::Cbox
Iup::Sbox
Iup::Split
Iup::Append
Iup::Detach
Iup::Insert
Iup::InsertTop
Iup::Reparent
Iup::GetParent
Iup::GetChild
Iup::GetChildPos
Iup::GetChildCount
Iup::GetNextChild
Iup::GetBrother
Iup::GetDialog
Iup::GetDialogChild
Iup::Refresh
Iup::RefreshChildren
Iup::Update
Iup::UpdateChildren
Iup::Redraw
Iup::ConvertXYToPos

Dialog
Iup::Dialog
Iup::Popup
Iup::Show
Iup::ShowXY
Iup::Hide
Iup::FileDlg
Iup::MessageDlg
Iup::ColorDlg
Iup::FontDlg
Iup::Alarm
Iup::GetFile
Iup::GetColor
* Iup::GetParam
Iup::GetText
* Iup::ListDialog
Iup::Message
Iup::LayoutDialog
Iup::ElementPropertiesDialog

Controls
Iup::Button
Iup::Canvas
Iup::Frame
Iup::Label
Iup::List
Iup::MultiLine
Iup::ProgressBar
Iup::Spin
Iup::Tabs
* Iup::Tabsv
Iup::Text
Iup::Toggle
Iup::Tree
Iup::Val

Resources
Iup::Image
Iup::ImageRGB
Iup::ImageRGBA
Iup::NextField
Iup::PreviousField
Iup::GetFocus
Iup::SetFocus
Iup::Item
Iup::Menu
* Iup::Menuv
Iup::Separator
Iup::Submenu
Iup::SetHandle
Iup::GetHandle
Iup::GetName
Iup::GetAllNames
Iup::GetAllDialogs
Iup::Clipboard
Iup::Timer
Iup::User
Iup::Help

Helper Functions
Iup::GetListText
Iup::Info


IUP Control Gallery

IUP Project Site

Pages: 1 ... 3 4 [5] 6 7 ... 12