Date   
Re: BBC BASIC for SDL 2.0 v0.20a released

Mark Hannah <mark-hannah@...>
 


Hi I purchased BBC4W when it first became available as I was interested in web data scraping and thought I could extract data from web elements using BBC code. I have since discovered  Python and Ruby do this. I would like to web scrape using BBC as I don't want o learn a new programming language at this time. Can you tell me if data scraping web pages is possible using BBC4W and if so can you provide a link to tutorials.

Thanx

I have been using Autohotkey com objects to achieve this thus far:-

eg..

Var:= pwb.document.getElementsByClassName("tv-symbol-header-quote__value tv-symbol-header-quote__value--large js-symbol-last")[0].innerText

all help to do this via BBC4W would be much appreciated

Mark.



From: bb4w@groups.io <bb4w@groups.io> on behalf of Paul Marshall <paulmarshall2020@...>
Sent: 06 February 2018 17:03
To: bb4w@groups.io
Subject: Re: [bb4w] BBC BASIC for SDL 2.0 v0.20a released
 
On Tue, Feb 6, 2018 at 06:09 am, Richard Russell wrote:
 why wouldn't you want to reserve f5 for 'Step Line' and f6 for 'Run to Cursor' and the rest? 
I didnt think about, i dont use those keys whereas f3 is widely used in many programs for Find Next and I use it all the time.
Perhaps you might want to consider f2 for zoom out and Shift+f2 for zoom in, or some similar combination that only 'uses up' one function key.
One nice possibility would be CTRL - Mousewheel which zooms several programs I use regularly. The trouble with f keys is knowing that the functions are there.
Ideally I would like to be able to set a default font size.
Why, given that the size is remembered? 
I didnt know that until today when I saw CFGfile$ !

Anyway           WHEN 146: Zoom% +=1001
            WHEN 148: Zoom% -=1001
works, thank you.

Re: BBC BASIC for SDL 2.0 v0.20a released

Richard Russell
 

So that I can 'put it to bed' I've made f2 'zoom out', Shift+f2 'zoom in' and implemented Ctrl+mousewheel when running in Windows, Linux or Mac OS (not that you would normally run touchide on a desktop machine, but you can).  I have no idea whether the Ctrl+mousewheel will work in Android.

Richard.

Re: BBC BASIC for SDL 2.0 v0.20a released

Richard Russell
 

On Tue, Feb 6, 2018 at 09:14 am, Paul Marshall wrote:
One nice possibility would be CTRL - Mousewheel which zooms several programs I use regularly.
I thought we were discussing keyboard control.  Mouse control is an entirely different kettle of rodents, and I don't even know whether you can detect mousewheel events in Android.  Simple mouse actions, such as clicks and drags, work because they map to touchscreen gestures, but that's not necessarily the case with the wheel.  Since I don't own a Bluetooth mouse myself I can't do the test.

If you do find that you can detect the mousewheel then of course mapping it in the way you suggest is fine, but that doesn't resolve the problem of how to change the zoom from the keyboard.   I'm sure a lot of people have Bluetooth keyboards, like I have, that can be used with an Android device, and being able to control the zoom is just as valuable for them.  I hardly need say that any modifications I may make to touchide in the next release are not for you, they are for everybody!

I didnt know that until today when I saw CFGfile$ !
In the instructions for touchide it says: "A pinch changes the size of the font. The new size will be remembered in subsequent sessions".  I make no apologies for assuming that if you're making modifications to the program you will have read the help documentation first!

Richard.

Re: BBC BASIC for SDL 2.0 v0.20a released

Paul Marshall
 

On Tue, Feb 6, 2018 at 06:09 am, Richard Russell wrote:
 why wouldn't you want to reserve f5 for 'Step Line' and f6 for 'Run to Cursor' and the rest? 
I didnt think about, i dont use those keys whereas f3 is widely used in many programs for Find Next and I use it all the time.
Perhaps you might want to consider f2 for zoom out and Shift+f2 for zoom in, or some similar combination that only 'uses up' one function key.
One nice possibility would be CTRL - Mousewheel which zooms several programs I use regularly. The trouble with f keys is knowing that the functions are there.
Ideally I would like to be able to set a default font size.
Why, given that the size is remembered? 
I didnt know that until today when I saw CFGfile$ !

Anyway           WHEN 146: Zoom% +=1001
            WHEN 148: Zoom% -=1001
works, thank you.

locked Re: Splash Screen

Richard Russell
 

I have locked the Splash Screen thread(s) because the decision is made - it's done and dusted.  Indeed I've now released a version of BBCSDL with the splash screen incorporated, and it would make no sense to revisit it after three months (when the next release - if there is one - is due) because by then everybody will be thoroughly used to it.

Richard.

Re: BBC BASIC for SDL 2.0 v0.20a released

Richard Russell
 

On Tue, Feb 6, 2018 at 07:02 am, Jeremy Nicoll wrote:
I've used systems in the past where one F-key acted as a sort of toggle, and
each time you pressed it the definitions on a range of other F-keys were
changed from, say, set 2, to set 3.
That only makes sense if the function keys are labelled, so that you can see what their current functions are.  That doesn't apply in this case.  May I ask if you have actually installed and run BBC Basic on an Android device?   It's not a suggestion I would have expected if you have.

Richard.

Re: BBC BASIC for SDL 2.0 v0.20a released

 

On Tue, 6 Feb 2018, at 14:09, Richard Russell wrote:
On Tue, Feb 6, 2018 at 05:59 am, Paul Marshall wrote:


Definitely!  f2 and f4 dont sit well so maybe f4 & f5. 
The trouble with that idea is that if you want to reserve f3 for 'Find
Next' why wouldn't you want to reserve f5 for 'Step Line' and f6 for
'Run to Cursor' and the rest?  The only 'spare' function keys - i.e. not
already allocated to functions in BB4W and the desktop versions of
BBCSDL - are f2, f4, f11 and f12 (and f11, f12 are mirrored by Shift+Tab
and Ctrl+Home).

Perhaps you might want to consider f2 for zoom out and Shift+f2 for zoom
in, or some similar combination that only 'uses up' one function key.
I've used systems in the past where one F-key acted as a sort of toggle, and
each time you pressed it the definitions on a range of other F-keys were
changed from, say, set 2, to set 3. Shift- might decrement the set number.

I tended then to organise sets of key definitions around types of activity.

--
Jeremy Nicoll - my opinions are my own.

locked Re: Splash Screen

Richard Russell
 

On Tue, Feb 6, 2018 at 06:13 am, daveinspain101 wrote:
Richard, the splash screen works on both my Android 5.1 tablet and Android 7.0 phone however, it only displays for half a second or less (once I saw it for 2-3 seconds but can't repeat this).
It should always (and in my tests does) display for at least one second.

I would suggest that it stays on until the screen is tapped.
I have tried dozens of Android apps to see how their splash screens behave and NOT A SINGLE ONE works that way.  The purpose of the splash screen is twofold: firstly to identify the app and its version number and secondly to display something whilst it is initialising.  For the first, a display period of one second is plenty, which is why that is set as the minimum.  For the second, it displays at least until initialisation is complete if longer.

The chosen screen is too "busy" to view if less than one second.
You are not expected to "view" the screen; it is not a work of art!

For my liking, displaying the splash screen for a whole second is too long.  I have got used to BBC BASIC starting 'instantly' on my very fast phone, and having to wait for the splash screen to disappear annoys me.   But I recognise that most people's devices are slower than mine and probably take at least a second to start up anyway, and some kind of 'title' screen will be a requirement if it is ever to qualify for the App Store.

Would it be possible to supply all three screens so that we can choose the one we want?
Technically possible?  Of course.  Something I would consider?  Not a chance!

Richard.

locked Splash Screen

DaveinSpain
 

Richard, the splash screen works on both my Android 5.1 tablet and Android 7.0 phone however, it only displays for half a second or less (once I saw it for 2-3 seconds but can't repeat this). I would suggest that it stays on until the screen is tapped. The chosen screen is too "busy" to view if less than one second. For this reason I would have chosen the Roundel. I tried to vote but somehow found that I couldn't.

Would it be possible to supply all three screens so that we can choose the one we want?

Well done, Richard, on a remarkable product.

Dave N

On Feb 3, 2018 01:27, Richard Russell <news@...> wrote:
Looks like we have a clear favourite; here are the aggregated votes from the forum and the group:

Rocket: 5
Roundel: 7
Slate: 13

So congratulations to Paul Marshall (author of Dibley) who submitted the Slate design.

I admit it's probably not the choice I would have made (I didn't vote) because green text on a black background reminds me too much of old VDUs from the pre-BBC Micro era - not exactly the impression of a 21st Century product I might have preferred!

But what do I know? I will go along with the 'will of the majority' as seems to be the trend these days - at least it's not an irreversible decision that will have an adverse effect lasting for decades..... grin

Richard.

Re: BBC BASIC for SDL 2.0 v0.20a released

Richard Russell
 

On Tue, Feb 6, 2018 at 05:59 am, Paul Marshall wrote:
Definitely!  f2 and f4 dont sit well so maybe f4 & f5. 
The trouble with that idea is that if you want to reserve f3 for 'Find Next' why wouldn't you want to reserve f5 for 'Step Line' and f6 for 'Run to Cursor' and the rest?  The only 'spare' function keys - i.e. not already allocated to functions in BB4W and the desktop versions of BBCSDL - are f2, f4, f11 and f12 (and f11, f12 are mirrored by Shift+Tab and Ctrl+Home).

Perhaps you might want to consider f2 for zoom out and Shift+f2 for zoom in, or some similar combination that only 'uses up' one function key.

Ideally I would like to be able to set a default font size.
Why, given that the size is remembered?  Once you've set it to your preferred zoom it will, of course, start the same way every time.

Richard.

locked Re: Splash Screen Poll #poll

maurice
 

In the 1980's I was introduced to GW Basic ,courtesy of Alan Sugar and his student's notepad. It became a valuable tool in pursuit of my hobby of Amateur Radio. Formulas that were in constant use were quickly coded and saved. The notepad stayed off while practical work proceeded and starting from switching it on any value could be formulated in seconds. I voiced the opinion on Facebook that this simple device and its use of the BASIC language was, and still is superior and faster (from "off") in every way to modern devices and spreadsheets.  I am delighted to be acquainted with the language once again and am making good use of it. Many young people think that coding is out of their league, they are wrong.

Re: BBC BASIC for SDL 2.0 v0.20a released

Paul Marshall
 

On Tue, Feb 6, 2018 at 04:35 am, Richard Russell wrote:
keep f3 available for potential future use as 'Find Next'?
Definitely!  f2 and f4 dont sit well so maybe f4 & f5. 

Ideally I would like to be able to set a default font size. My quick workaround is :
        IF (@platform% AND &FF) = 3 THEN
          GUIFont$ = FNgetINIstring(CFGfile$, "guifont", "FreeSans,48")
          EditFont$ = FNgetINIstring(CFGfile$, "editfont", "FreeMono,48")
to change 48 to 24 then the font size is a comfortable 80 (a guess)  columns.

I had failed so far because i was changing Zoom% by 1 or -1. Will try again.
 

Re: BBC BASIC for SDL 2.0 v0.20a released

Richard Russell
 

On Tue, Feb 6, 2018 at 04:15 am, Richard Russell wrote:
To use f2 and f3 (f1 is currently reserved as 'return to menu'
Or would you rather use f2 and f4 to keep f3 available for potential future use as 'Find Next'?

Richard.

Re: BBC BASIC for SDL 2.0 v0.20a released

Richard Russell
 

On Tue, Feb 6, 2018 at 03:50 am, Paul Marshall wrote:
I'm looking at the possibility of zooming with f1 and f2 in place of pinching or  to add a zoom % option to the long-press menu. 
I would prefer the former; adding an item to the 'touch' menu which isn't needed when using touch control isn't desirable.

The function key approach is easier to implement too.  To use f2 and f3 (f1 is currently reserved as 'return to menu' if you get stuck in immediate mode) is as simple as adding this code to both of the key-code CASE statements:

          WHEN 146: Zoom% -= 1001
          WHEN 147: Zoom% += 1001

I'll modify my master version accordingly.

Richard.

Re: BBC BASIC for SDL 2.0 v0.20a released

Paul Marshall
 

I'm looking at the possibility of zooming with f1 and f2 in place of pinching or  to add a zoom % option to the long-press menu. 

I could not get  SDL_StopTextInput to work at removing the onscreen keyboard. I have found though that by switching from 'leanback' to 'Multilingual'  onscreen keyboard it works as it should. 

Re: BBC BASIC for SDL 2.0 v0.20a released

Richard Russell
 

On Mon, Feb 5, 2018 at 08:41 am, Paul Marshall wrote:
Is there a mod i can do to make the display 80 columns?
It's not set to any specific initial number of columns; it will depend on the display resolution.  If yours is working out at 40 columns it's a fluke, not by design.  On a touch screen you can use the standard 'pinch' zoom gesture to change the font size (it is 'touchide' after all).  There's no keyboard control - indeed there isn't in BB4W either - but no doubt that could be added if a suitable combination of keys can be found.

Richard.

Re: BBC BASIC for SDL 2.0 v0.20a released

Paul Marshall
 

thanks i will try that.  Is there a mod i can do to make the display 80 columns? I've looked at touchide.bbc but not managed to figure it out.

locked Re: Splash Screen Poll #poll

Chris Shipman
 

I would certainly not support the view that programming is now only relevant to 'a technically minded few'. In a world where the Arduino platform has transformed hobby electronics beyond recognition, it's clear that there is a huge potential user base, provided that there is a clear incentive / purpose in programming.

As for whether there is a place for BASIC, the popularity of MS Office VBA seems to suggest that there's life in the old language yet. BBC BASIC remains extraordinarily versatile and powerful. It can't be impossible to gain widespread interest in BBC SDL, though I'm not saying that it's easy.

I think that the 'killer app' concept is the right one, with the additional thought that the key might be a real world application  (in the sense of 'purpose') rather than just a striking piece of software.

I for one would hate to see such an excellent development of such a fine language to fade away due to lack of interest. 

Chris Shipman. 

locked Re: Splash Screen Poll #poll

Richard Russell
 

On Mon, Feb 5, 2018 at 03:59 am, Paul Marshall wrote:
none of the small number of children I know have any interest in computing
You mean 'programming' I assume: the 'smartphone generation' can hardly survive without "computing"!  Not everybody is going to be interested in programming, any more than they are going to retain a specific interest in any other subject they are taught at school.  But some will, and Python is probably the language they will have learned; there really isn't that much difference between Python and (modern) BBC BASIC.

Ceefax, Mode 7 demos etc might excite us oldies but mean nothing to the younger generation.
I don't disagree, but demo programs need to appeal to a wide range of ages and interests. It would not, in my opinion, be sensible to target one specific demographic (e.g. the "younger generation") in the selection of demo programs.  And to respond to an earlier comment I do actually choose to read the news via the CEEFAX program because I find it easier to digest without all the distracting adverts and images.

David Williams FOD is exactly what we need but sadly is a bit big to bundle
His Dropperz game is bundled with BBC BASIC and there may be others small enough to include if he will grant permission.

It was to be honest a bit of a pain to install FOD on the TV
I can't speak for your TV but it's pretty straightforward to get it onto a phone or tablet.  First, download the ZIP file (e.g. FODSDL.zip) onto your PC and extract the contents into their own folder (that is usually the default extract action).  Now connect the PC to your Android device using a USB lead - generally the supplied charging lead is suitable.  Finally, move the FODSDL folder into BBC BASIC's @usr$ directory using cut-and-paste or drag-and-drop in Windows File Explorer.  Disconnect the USB lead and the job's done!

If you want to do it 'wirelessly', without needing a PC, you can do the same thing on the Android device itself with the help of an app like ES File Explorer to extract the ZIP.

Richard.

locked Re: Splash Screen Poll #poll

Paul Marshall
 

Richard 
Sorry to appear so negative. I am pleased it is still taught in schools - how would I know but none of the small number of children I know have any interest in computing - and I am not surprised at all that there are still niche markets for professional software.  I am excited about the future of BBC Basic on the Android platform and RPI  (I'm not a Apple or Linux user) Thats why I spend time on my tablet, amazon Fire and now my Android TV. Being able to play from the comfort of my armchair appeals!  I am however trying to promote a debate on how we can make it appeal to the younger person. Ceefax, Mode 7 demos etc might excite us oldies but mean nothing to the younger generation. David Williams FOD is exactly what we need but sadly is a bit big to bundle. Therefore we could do with a  more efficient way to download programs to the device and have them appear in the programs list. It was to be honest a bit of a pain to install FOD on the TV.  Having done so yes it was a bit sluggish but still playable and a brilliant demo of the capabilities nonetheless.