That's really good, I never knew that thinBASIC could do those kind of things.
Imagine you have to download multiple pages from internet. Some files, some pages, some FTP ...
Here an example you can amend as you prefer.
Create a text file with the following lines and name it "Sites.txt".
It will contain the list of the downloads you need to perform. Just an example:
[code=thinbasic]http://www.thinbasic.com/
http://www.codingmonkeys.com
ftp://ftp.suse.com/pub/projects/tcl/README
[/code]
And this is the thinBasic script
[code=thinbasic] Uses "File" '---Load File module needed for File_Load function
Uses "iNet" '---Load iNet module needed for iNet_UrlDownload function
'---Loads all file lines
DIM Sites AS STRING = File_Load(App_SourcePath & "Sites.txt")
'---Determine the number of lines
DIM nLines AS LONG = PARSECOUNT(Sites, $CRLF)
'---This function will parse the input string for $CRLF delimiters
' filling and dimensioning sLines array
DIM sLines() AS STRING
PARSE Sites, sLines, $CRLF
'---Now scan the array in order to find whatever string
' If string is found, corresponding line will be appended
' to output buffer
DIM Count AS LONG
DIM Ret AS LONG
FOR Count = 1 TO nLines
Ret = INET_URLDownLoad(sLines(Count), APP_SOURCEPATH + "FileOut" & Count & ".txt")
IF Ret <> %TRUE THEN
msgbox(0, "Error code for line " & Count & ": " + Ret)
END IF
NEXT
'---End
MSGBOX 0, "End of the script"
[/code]
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
That's really good, I never knew that thinBASIC could do those kind of things.
Operating System: Windows 10 Home 64-bit
CPU: Intel Celeron N4000 CPU @ 1.10GHz
Memory: 4.00GB RAM
Graphics: Intel UHD Graphics 600
Hi Matthew,
there are a lot of things that ThinBASIC is able to do easily, unfortunatly it take a lot of time develop, document and maintain them so often there ins't time left to show how to ... make with ThinBasic.
I think that it should be a very good thing have an online script repository where user can search script ready to use or code to adapt, but for now this ins't our first priority target.
Ciao,
Roberto
http://www.thinbasic.com
That is a great idea Roberto, and maybe a wiki should be used for this. You guys can have all the help keywords as an outline and then users who scripts that would be good examples of useage of those keywords could put up their scripts.
Or setup a way to upload a script and have a utility that scans all the keywords used and uses them as tags to help find useage of that command.
Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server
Hi guys,
I think there is way to do it, but it has not been used for ages:
http://scripts.thinbasic.com/
Bye,
Petr
EDIT: Eros was faster in other thread
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Yes, I think the scripts repository should be used for this. I will try to add stuff too!
Bookmarks