Browser with download facilities

User avatar
Dav
Posts: 279
Joined: Tue Dec 30, 2014 5:12 pm
My devices: iPad Mini, iPod Touch.
Location: North Carolina, USA
Contact:

Re: Browser with download facilities

Post by Dav »

You may need to offer a "Save as" option, because many images, such as one attached in this forum, will show a filename like "file.php?id=2xxx" instead of an normal image filename. Perhaps you could look for the "=" or "?" symbols in the name and flag it as needing a "Save as" option, or something like that. There may be a javascript way of getting the image tag name instead and using it, I'll look into it.

- Dav

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Browser with download facilities

Post by Dutchman »

The browser will only download the links. We'll see what has to be done next ;)

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Browser with download facilities

Post by Dutchman »

A button has been added for downloading the pathnames of images on the current webpage. The images can then be downloaded with the utility "Download pics.sb".
The 'chain-symbol"-button for entering the url of a new webpage has been removed. Now the URL-field can be used to enter a word to search for on the web. Google-search will start with that word. In the google-search-field the search can then be refined. In this way other websites can be found and loaded. In future I will enable multiple word search.
With iPhone used vertically, the dump-buttons will be at the bottom of the screen.
In order to separate dumps, images etc., I have added new folders which will be generated automatically by the browser or its utilities. So it is necessary to update all files.
The attached files in the first post has been updated as well as the Dropbox-folder.

Survey of changes:
• URL added of original Dav's browser
• Made "preferences." include settings for other app
• "preferences." renamed to "preferences.default"
• Added SmallScreen-variable for iPhone simulation
• Flaws and errors corrected in several functions
• Renamed "Dopwnloads" folder for dumps to "Dumps"
• Added dump-button for images
• Utility "Download pics.sb" downloads the images
• Vertical iPhone will have dump-buttons at the bottom
• URL-button (chain-symbol) removed. Enter a search-word in the url-field instead. Multiword search will be made possible in later update

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Browser with download facilities

Post by Dutchman »

During the previous changes an error has been introduced such that download of links of attached files did not happen.
The error in the function DumpLink() has been corrected.
The index-numbers of the dump-files have now fixed length of 3. The files occur now in the correct numeric order in the folder-list.
The associated utility-programs have been changed accordingly.
Sorry for the inconvenience :)
I think it is now stable and no major changes will be made. 8-)

User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Re: Browser with download facilities

Post by GeorgeMcGinn »

Not only that, it also says:

"Don't provide an option to create local-only files. Users often expect all of their files to be available on all of their devices. Whenever possible, your app should support cloud-based file storage through a service such as iCloud."

So WT? is Apple's issue with Mr. K's use of Dropbox when they openly encourage it. I makes me want to hit my head up against a wall.
Dutchman wrote:
Thu Sep 14, 2017 1:47 pm
I made in Apple's "Human Interface Guidelines" the following screenshot:
Screenshot from Apple's Human Interface Guidelines.png
See https://developer.apple.com/ios/human-i ... -handling/
So it should be allowed for Smart Basic to share files with e.g. the Dropbox app, FileBrowser or other apps.
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Re: Browser with download facilities

Post by GeorgeMcGinn »

I'm just catching up on all this due to being smacked by Hurricaine Irma. The eye wall also passed right over my house. It was cool, but very destructive, winds at 120mph sustained with gusts up to 160mph.

I'm still having electrical issues as the flooding in some areas have yet to stop.

This, however, and the other post on Connect.sb is very interesting to me.

Thanks in advance as I work to catch up (Internet can be spotty at times as well, so I downloaded the entire thread so I can read it offline.

George
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

User avatar
Dav
Posts: 279
Joined: Tue Dec 30, 2014 5:12 pm
My devices: iPad Mini, iPod Touch.
Location: North Carolina, USA
Contact:

Re: Browser with download facilities

Post by Dav »

Hi Dutchman. I'm having a little problem running the browser. Maybe I have set it up wrong. I created a new folder for the browser, put all the files in it (removed the .txt extension from them all). When starting Browser.sb, a Syntax error occurs in the ButtonPressed(reset) Function on this line: "But.favorites=BUTTON_PRESSED("favorites")"

Also, I noticed some of the navigation icon characters display as an ? instead of icons in the code. Perhaps the character set is different on my ipad than others (US, English). The ones that don't show up are the 'stop', "pics", and "code" icons.

- Dav

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Browser with download facilities

Post by Dutchman »

Hello Dav.
I don't understand why "But.favorites=BUTTON_PRESSED("favorites")" gives an error. I downloaded Browser.sb.txt from the website and the syntax is completely correct. Can you give a screenshot of the error-message?
I did not realize that the icons had to be available as a font. On my iPad I have the Dutch, Emoji, Greek and English keyboards available. I can not remember if I bought 'Emoji' but it's not in the keyboard list, so I can only recommend you to download an emoji keyboard from the appstore. I will have to make a solution for the future for image files to place on the keys, if that keyboard costs money or yields wrong results. :?
Maybe you can find icons on your iPad which could be used. That would be the best solution. ;)

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Browser with download facilities

Post by Dutchman »

I discovered two major problems.
For testing download code from the website, I use the website of Dav's browser: http://bit.ly/1PpeSOS
After clarifying, it appeared to be corrupt. It contained HTML-code which is not present in the code-section of the webpage. So I have no explanation for that error. (Is it an Apple pitfall?) Therefore I made a program to extract the code from the 'dumped' webpage. That program "Code from webpage.sb" also clarifies the extracted code and generates executable code. It has to be adapted yet for multiple code-sections.

The second problem was that posted images did not download, only pictures which are part of the website. After studying the code in the webpage-dump, it appeared that the posted images were embedded in the HTML code as class: "postimage". It took some time, but eventually I got the download done. So now the download of images results in 'pics' and/or 'images'. Read "Browser.info" for further details.

Also, I corrected a mistake in refreshing the URL-field and added a "clear" button for that field which can be used before entering text.

The following screenshot is from "Download pics selection.sb"
Select and save.PNG
Select and save.PNG (485.95 KiB) Viewed 3919 times
Survey, including less important changes:
20170919 changed:
• Input-file existence-test added to utilities
"Clarify code.sb" and "Download files.sb"
• Added "images.dump-……" for posted 'images'
See info on 'images' and 'pics' in "Browser.info"
• Renamed "links.dump-……" to "files.dump-……" for attached files
See preferences: Page$, Code$, Link$, Img$ and Pics$
So "preferences.default" has also been changed
• Utility "Download images.sb" added for downloading
'images' from "images.dump-…" to correct filename
• Error in running update of url-field corrected
• Clear-button added to the URL-field. If touched, then
that field will be cleared and cursor set to the field.
• Utility "Code from webpage.sb" added

User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Browser with download facilities

Post by Dutchman »

The problem with the Icon-buttons has been solved. The buttons are now realised with sprites. That opens also the possibility to use images as button. The new version of the browser uses the SB-icon and Dav's-avatar as preliminary example. Consider it a temporary tribute to this browser's spiritual father :D
The function of these buttons is under development and will change in future, together with the button-images.
Read "Browser.info" for further info on these buttons.

To generate the sprites button, I have created a program: "ButtonSprite.sb". I will post it after some improvements.
The number of system files is increased to such extent that they are moved to the "SYSTEM"-folder. This folder will contain four files after program run. Additionally, it contains the "ButtonPics"-folder containing 13 images and a file "But-list.DATA" which is used as the include-file in the program to generate the sprites for the buttons.
In my opinion the generation of buttons and their handling is much improved with this approach. It can be completely automatic with the DATA file. The positioning is still a craft. I'm curious how other users think about it.

Survey of changes:
'20170922 changed:
• Errors in URL-field handling corrected
• Buttons changed to sprites with images generated by "ButtonSprites.sb"
• SB- and PB-buttons introduced. Functions are under development.

Post Reply