Share My Creation B4Script - On device basic programming

qsrtech

Active Member
Licensed User
Longtime User
Forgive me but I seem to be a little confused. Does this library allow you to execute new code within an app such that you wouldn't have to update the app if you wanted to execute something? For example, if I wanted to be able to make my app more "programmable", I could use "pushes" and send a script to be executed, which could hopefully use existing variables, procedures, etc. Is this possible?
 

agraham

Expert
Licensed User
Longtime User
It's a library that can execute Basic language scripts with whatever level of integration with your app that you care to program as you can see from the IDE that is the subject of this thread. The rest of your question is too broad to be readily answerable.
 

qsrtech

Active Member
Licensed User
Longtime User
Sorry if my initial question is kinda vague. Basically if I send a push or even an intent to my app with a "script" to execute such as:
Let's say my app has an activity called "main" with a global variable called "somevariable". Could I run something like "somevariable=1000" and now the app will use the new value assigned to "somevariable"?

How about if I have a sub called "dosomething" in my main activity, can I run this sub with this library? Basically I'd like to try and incorporate as much of my app's code in scripts stored in a DB such that if I need to make a change to something it's a simple matter of updating the script in the db and the app get's the new code without needing to be updated.
 

qsrtech

Active Member
Licensed User
Longtime User
Well I've managed to get my app to "push" a call to a sub within the app, but I'm having trouble figuring out how to get/set global variables within the calling activity. Also, is it not possible to call subs in other modules?
 
Last edited:

agraham

Expert
Licensed User
Longtime User
The limitations on calling Subs from a script are the same as those for using CallSub in the module that initialized the library object, for the same technical reasons.

If you can call a B4A Sub then you should just be able to do anything you want in that Sub and return String values from it.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…