View Full Version : thinBasic 1.11.7.0
ErosOlmi
22-02-2022, 21:59
2024.01.01 23:00 CET
by the end o Jan 2024 thinBasic version 1.12 will be out, I'm finalizing some parts I've developed and documenting them.
In the meantime have a look at this preview: https://www.thinbasic.com/projects/thinbasic/thinBasic_1.11.7.0_20231228.zip
There are many new feature and many bug fixed: https://help.thinbasic.com/index.html?version_1_11_3_0_version_1_12_0_0.htm
2022.12.23 18:00 CET
Update thinBasic 1.11.7.0
Some fixes
Many new features
New thinAir theme Nord
Among other things have a look at new $() interpolate function.
Download from: https://www.thinbasic.com/downloads.html#downloads
Features: https://help.thinbasic.com/index.html?version_1_11_3_0_version_1_11_7_0.htm
Developed under Windows 10
Tested under all Windows versions from Window 7 to Window 11
Still a lot of work to do especially to document new features
Will continue next weeks/months
2022.02.27 19:20 CET
Update thinBasic 1.11.7.0
Download from: https://www.thinbasic.com/downloads.html#downloads
Fixed thinAir Codetips handling
Released thinBasic 1.11.7.0
Download from: https://www.thinbasic.com/downloads.html#downloads
Features: https://help.thinbasic.com/index.html?version_1_11_3_0_version_1_11_7_0.htm
Developed under Windows 10
Tested under all Windows versions from Window 7 to Window 11
Still a lot of work to do especially to document new features
Will continue next weeks/months
Petr Schreiber
22-02-2022, 23:50
Eros did a fantastic job on bringing a whole arsenal of new modules and functionality. I am testing it for some time and find it really helpful - including the CURL wrapper, handy for REST API usage.
We also focused a lot on improving documentation of already existing functionality - more than 100 updates to topics such as OS, DT, TBASS but also for example Dialog pseudo-object in UI module and a lot of other additions here and there based on your feedback.
Then a lot of minor but handy changes such as PRINT / PRINTL able to print in multiple colors via single statement... and more and more.
Petr
ErosOlmi
23-02-2022, 11:15
Next weeks I will concentrate on bug fixing and finishing help topics: there are a lot of new feature still to be documented, sorry :oops:
I will try to update at least once every week in order to target a new official stable version as soon as possible.
Thanks for the new version,
but in the downloads page the file is thinBasic_1.11.1.0 while it is said thinBASIC version 1.11.7.0 BETA
can't check it until tonight
Edit:
i see now .. the Link on the pictire inder the title thinBASIC version 1.11.7.0 BETA is https://www.thinbasic.biz/projects/thinbasic/thinBasic_1.11.1.0.zip
but the link under the title File specifications is ... https://www.thinbasic.com/projects/thinbasic/thinBasic_1.11.7.0.zip
ErosOlmi
23-02-2022, 17:04
Sorry my fault: I didn't' update link connected to the image.
Now should be ok
ErosOlmi
27-02-2022, 20:27
2022.02.27 19:20 CET
Update thinBasic 1.11.7.0
Download from: https://www.thinbasic.com/downloads.html#downloads
Fixed thinAir Codetips handling
ReneMiner
08-03-2022, 02:46
thinair still unaware of rawtext.
Usage of multiline strings - the "quoted appearance of rawtext" also is limited through thinair.
Means, thinAir will not launch a script because of errors that are none.
ErosOlmi
09-03-2022, 21:46
Thanks René, will try to fix.
ErosOlmi
10-03-2022, 16:17
Updated 1.11.7.0
Let me know if it works.
https://www.thinbasic.com/downloads.html#downloads
ReneMiner
13-03-2022, 15:51
right now it seems ok of functionality - but i would appreciate if RAWTEXT were raw text visually too and not highlighted. just as default text.
It still highlights keywords within the rawtext-sections that could be eliminated by the lexer before any comments already and it would not botherto check for any missing "if" or "next" in that region . That would make it less busy too and more responsive since these locations were out of the masses of data that are still to check.
strange fo already few weeks - the size - what about dpi-awareness? previously all was too small but now everything is way to big ?
too many manifests? if each dll has one embedded- will it add them up?
Question: is it programmatically possible to detect if a function is located within a #Region?
is it possible to determine all regions theirs starting line is located outside of functions and types? Or will it require to run the tokenizer and count the lines?
Would that work on obfuscated and bundled sccripts?
ErosOlmi
24-12-2022, 10:31
2022.12.23 18:00 CET
Update thinBasic 1.11.7.0
Some fixes
Many new features
New thinAir theme Nord
Among other new features we added Evaluate(), Evaluate$() and $() interpolate functions.
See help and sample scripts under \thinBasic\SampleScripts\ path
Download from: https://www.thinbasic.com/downloads.html#downloads
Features: https://help.thinbasic.com/index.html?version_1_11_3_0_version_1_11_7_0.htm
Developed under Windows 10
Tested under all Windows versions from Window 7 to Window 11
Still a lot of work to do especially to document new features
Will continue next weeks/months
ReneMiner
30-03-2023, 01:46
somehow i am lucky able to log in again :D
Some about tokenizer module class: The functions
<classvar>.Token(index).GetPosStart
<classvar>.Token(index).GetPosEnd
<classvar>.Token(index).GetLen
<classvar>.Token(index).GetLine
seems are not introduced by loadLocalSymbols - help file lists them but runtime experience is
Error
5100: A method or property was not found in class.
Another - concerning
Uses "Console noAlloc"
how to achieve? How can i detect from my module if such a "switch" is present?
All i've found was the optional string parameter to Function LoadLocalSymbols contains the module-path - but nowhere is any hint about the parameter in "USES" - do i have to load and parse the script for that?
And by mentioning load and parse: i've fallen in love with thinbasic-core-functions
Function_GetBodyCode
Function_GetSourceCode
which brought me to some weird ideas - working already with support of an include-file: the interpreter can interpret script-changes in real-time ("console interactive-mode")
i use it for visual design of windows by typing in and instant display the changes at a window-prototype on screen and store the typed-in data as thinbasic-code when i type "cf" or "confirm" and you will not even come to the idea that the same moment the console-content is saved and a new (embedded) "script-process" is started - it's so incredible fast when the (already previously registered window-class) new changed window appears on the same location while the previous one runs out by a timer just 1/10 seconds later you would not notice a thing. Only if the changed windows position does not exactly cover the previous one the illusion of a constantly running program is disturbed...
On the run...a general UI-makeover, direction THINBASIC V 2.0
i use a lot of illusion, and often i read in one of your "OOP"-script-samples the sentence it were not easy to create something as "ME" in a callback. So let me share an idea that is proven to work very well:
Don't forget:
We create the illusion of something in a way that users feel it were real - even it's not - they will not bother or complain if it appears logical and is correct in its context.
i let the user create a local variable of an udt
(which ensures the variable is valid and available) -
use a pretty simple hack which works from modules as well as from thinbasic-script:
'######################################################################################################################
'### GetLastName - use from module-class-constructors to obtain the name of the dimensioned class variable ###
'######################################################################################################################
FUNCTION GetLastName(BYVAL sList AS STRING) AS STRING
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
' pass
// Thinbasic_VariableGetList( ,";")
' to parameter sList
'....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!....:....!
FUNCTION = RIGHT$( sList, LEN(sList) - INSTR(-1, sList, ";") )
'......................................................................................................................
END FUNCTION
(this is the module-version - in thinbasic you must watch for the stack-level - passing Function_GetStackLevel as parameter to the function is not recommended - since it evaluates to the stacklevel of the called function on its entrance - but stacklevel is required if using Thinbasic_VariableGetList from a script. )
I urge the user to exclude creation of objects outside of the TBMain-function in a way that
TBMain must be entered first,
from there a dedicated StartUp-function has to be called that returns True if StartUp was succesful.
(It will never return False but rather stops the execution in case of a problem)
my excuse is always:
Do not create local variables in TBMain because these variables are kind of special:
Such are persistant for duration of the scripts execution and theirs lifetime does not end before the script ends.
(Actually I intend to spread the idea that TBMain should not have "local" variables nor a "local scope" at all )
So i force to create an udt-variable local in a separate "Init + launch-procedure" and the user thinks,
his line:
Dim dlg_xyz As NewDialogOnDesktop
would really create the complete dialog - but what happens is:
Type tAnyDialogs_sharedAncestorType
hWnd As DWord ' (this just to have any property at all)
End Type
Type NewDialogOnDesktop _
Extends _
tAnyDialogs_sharedAncestorType
'....................................................................
UDT_Method _Create()
' here happens some real "MAGIC" !
End UDT_Method
'.....................................................................
End Type
abracadabra....
inside of udt-method NewDialogOnDesktop._create()
- it checks for the name of the users local variable ( "dlg_xyz")
- then app_inifile is checked for a section [dlg_xyz]
you can imagine what happens there...
- anyway the clue is: in NewDialogOnDesktop._create()
a new dialog named as the local user-variable in StartUp() is created.
- without the users knowledge i create a Hash-Table and
- store the hash-handle to the UI-object by
DIALOG SET USER 1, pHash
internally you should think of another place to hide it e.g. Api-function
setProp( hDlg, "secretPropertyname", mkDwd$(pHash) )
Always remember: if exit from function Startup the variable of type NewDialogOnDesktop will be destroyed.
What remains is a Dialog that
*** HAS THE SAME NAME ***
as the user named the local variable to create it.
(Remember this when you see *** again)
until here its already all doable, now...
The user will probably (for sure) store the "so important hDlg"
...
suggest 3+ New UI-module-functions:
DIALOG PROPERTY SET hDlg, <propertyname> As DataType [ = <initial_value>]
DIALOG PROPERTY LET hDlg, <propertyname> { = | , } <new_value>
DIALOG PROPERTY GET hDlg, <propertyname>
- where
<propertyname> is nothing but the key to a bucket of pHash
and SET creates it and tells you how to treat its content. LET to change and GET to obtain the value.
The very same functions should be accessible over the dialogs class using
<Dialogname>.Set <propertyname> As DataType
etc.
-since the "major-key" to the hash-table is attached to the class already-
And soon users can define their own properties to any dialog so very simple thanks to the hash-tables
Controls - i would consider - are dialogs major properties
theirs IDs in a hexadecimal format ($NUL can not be a hash-key)
... think that thought to your own end...
...simsalabim...
Anyway thinbasic should control the IDs (detect if a block "BEGIN CONTROLID- END CONTROLID" is present when USES "UI" = if none then thinbasic should allow the
<Dialogname>.Add<controlname> As <controlclassname>
check APP_Inifile or new UI_Inifile for a section matching
[<Dialogname>.<Controlname>]
and let the visual designer load and save this format = happy users...
if beginning a line with [ can have a meaning to UI-module? Maybe as a new Begin?
Begin UI
[<dialogname>]
Class=Dialog
Parent=DESKTOP ; or <Parentname>
Scaling=PIXELS
FontNames="Segoe UI","SpaceMono","Tahoma","Tahoma"
FontHeights=9, 10, 9, 11
FontStyles=0,0,0,1
Size=0.5, 0.4
Loc=0.25, 0.3
MinClientSize=240,160
ShowState=%SW_Normal
Style=%WS_DLGFRAME|%WS_CAPTION|%WS_SYSMENU|%WS_OVERLAPPEDWINDOW|%WS_CLIPCHILDREN|%WS_CLIPSIBLINGS
GradientType=<none>
GradientStart=0,0,0
GradientEnd=255,255,255
BGColor=0x20 0x40 0x80
FGColor=0xF0 0xB0 0x00
ImageFile=example.PNG
ImagePath=Media\Images\
ImageMode=Stretch
Caption="Am just a one-line-caption"
[<Dialogname>.<controlname>]
Class=Textbox
Text "Hello i am Text. I can be multiline"
Tooltip "Click on this object to experience something special"
Loc=4,4
Size=-8,-8
Resize=1,1,1,1
UseFont=2
End UI
relative meaning for sizes:
if a decimal dot (float value) is used the value is to multiply with the available client of the parent.
Size=0.5,0.4 means half of parents client width, 40% of parents client height.
thinkable: objects inside of other objects (viewports/tab-pages) can have multiple times theirs parents size. to prevent misunderstanding, if i set minsize 30,20 to something previously its units or pixels
but then i apply a size of 25,14.35 to this object its obviously no decimal point in the 25 but the minsize
of 30 clarifies: i want it 25 times the available client-size of the parent.
Size=-8, -8 negative sizes?
impossible to display this value - but to subtract it from parents available client size makes sense
same goes for locations...
This can be ini-file as well as thinbasic-ui-file
:D
Callback-functions names
*** WILL CONTAIN THE SAME NAME ***
in their first part as for example
callback function dlg_xyz_OnCallback()
However you did achieve that a callback-function has Callback-variables as CBHNDL, CBCTL etc.
(or as Type-functions would refer to ME)
you can create on entry of a callback a local layover to an udt
Type DialogInCallback _
Extends _
tAnyDialogs_sharedAncestorType
'..........................................................................................
UDT_Method _Create( byval pHash As Dword )
' creation-parameter is the handle of the hash-table that stored and
' contains the mostly user-defined properties and settings of the dialog
' that was created as NewDialogOnDesktop
End UDT_Method
End Type
when you manage to create this variable on entry of a callback-function and grab (by CBHNDL)
Dword pHash = getProp(CBHNDL, "secretpropertyname")
the pointer to the hash-table to pass as creation-parameter of the udt-variable that you can simply
name ME - since the functions name (required - unnamed - other - functions can not work!) already tells
the name.
It's not the same "Me" as in an udt but who will notice it? How?
Anyway the user can create a local variable from anywhere but tbMain and from a callback where you provide it already and avoid the usage of the global objects name in a local variable again by ME -
even for the case the user wants to exchange controls on a dialog - except making it a non-mdi which was mdi previously there are no limits.
i just hope the idea became visible as imagination
ReneMiner
30-03-2023, 02:05
i forgot:
Setting a Minsize / MinClientSize to a Dialog that contains a value of zero leads to
thinbasic no more responding.
there's no way to turn off the minsize-setting but setting it like "1,1"
which is not really "OFF" but just very small
the thought to turn it like
DIALOG SET MINSIZE hDlg, OFF, OFF
were much more logic
and to tokenizer again:
<varname>.Token(index).Data
( the only working - and most important one - of the <...>.Token(...).-methods )
is not even mentioned in the help-file
Very much annoying:
right-click in thinAir code window creates a line ----- not even commented
ErosOlmi
12-04-2023, 18:01
René you are like a river in flood! :D In a good way I mean.
A flood of ideas to evaluate and analyze.
I have already fixed some errors in the help.
I have to find the time to read your other evaluations, understand them and see what can be done.
ReneMiner
04-06-2023, 06:42
I don't know if not anyone uses it and nobody but me does have the problem with tb 1.11.7 from end of december 2022
I use a previous version because thinbasic refuses to run 4 of 5 scripts and always gives me an error-message: Missing quote!
I counted, examined, replaced, exchanged but:
Not a single nor double quote but 200 lines and above - i am going crazy
Error - missing quote!
Its not caused by thinAir for sure.
But its causing me getting angry- bit by bit... Ain't there a newer version available?
ErosOlmi
06-06-2023, 20:52
Ciao René
please download and install latest version I'm working on from this url: https://www.thinbasic.com/public/__ForRene__/
Let me know it it solve your problem.
Otherwise, please send me a minimum example having the problem you mentioned.
Ciao
Eros
ReneMiner
09-06-2023, 07:13
I've found already a previous thincore from january attached to another thread here. My problem was due to login did not work correct i could not access the download attached to it. I've found it 2 days ago and there was no message of a missing quote yet.
Now i will try the new posted one, just to make sure.
Some misbehaviour comes up in thinAir - caused by the auto-focus-changing of windows 11. When mousepointer hovers somewhere where is no code. but i type until the text caret passes by at the mousepointer that now points something that i just typed. And a codetip appears taking focus away from codewindow. While i type i concentrate , look at the keyboard, type 200 chars until i have finished my line but: thinAir did not receive my input. Instead the mouspointer points a codetip ... couldn't the codetips content be shown alternatively in one of the former boxes below coding-area or a make the statusbar multiline to display those? Or another alternative if still possible (Balloon-Tips in WinXp appearing in the taskbar-corner where is now "Action-Center" with "Notifications" - or let one of those many panels re-appear and make it dockable and hover without focus in a corner where i can decide it shall dislay it's wisdom. Maybe with a HOT-KEY binding - some that will not be used to type in ( like escape ,Scroll or the context-menu-key that acts like right mouse click and will set focus on the souffleur...
I mean i do not want the information to be hidden nor to cover the area while i type, moving the mousepointer out of thinAir is changing to another desktop or open window- so in order to type i must position the mouse over the control where i want to type in.
Now i will check out the new one...
ReneMiner
09-06-2023, 17:16
The missing quote bug is definetely gone.
But what annoys me very much is thinAir - since - a few years , half a decade at least the horizontal scroll of thinair is a burden that makes life not easier.
And the Real-time check for bugs suffers a weak regex and is the reason for thinair to get killed by the os.
Some of the parsers run themselves into the abyss and took my code there twice today.
1. do not start parsing for highlighting or bugs detection while i am typing. What happens is:
thinair fades to gray, the caption says "Not responding" - aint there someone not answering the callback?
In any case thinair never recovers, never returns to duty and becomes responsive again and after a while the os kills the task since it explodes the used ram to 930 MB - almost 1GB.
i did not test much more than typing and launching a few scripts. I feel typing itself reacts much faster than the previous versions
and for completeness my almost overwritten thinbasic_Start_End_Autoclose.
Btw. almost overwritten: if thinbasic installation would create a user-folder named as the current user where it places personal settings etc. it would never come to the problem of accidently overwriting data
Therefore - and for a couple more ideas how to improve (definetely AUTOSAVE when thinair loses focus!)
have a look at this thread :
https://www.thinbasic.com/community/showthread.php?13238-Multiplayer-Looking-towards-a-future&p=96396#post96396
;------------------------------------------------------------------------------------
;--- HELP ---
; SearchFor = [mandatory] Text to be searched at the beginning of line
; AutoCloseWith = [mandatory] Text to be inserted in editor
;------------------------------------------------------------------------------------
; $SPC will be substituted with space
; $CRLF will be substituted with carriage return and line feed
; $TAB will be substituted with tab
; $Cursor will move cursor at position
;------------------------------------------------------------------------------------
;
;[Example]
;SearchFor=MyKey$SPC
;AutoCloseWith=$TAB$Cursor$CRLFEnd MyKey
[Callback]
SearchFor=callback$SPC
AutoCloseWith=$TAB$Cursor$CRLFEnd Function$CRLF
[BeginConst]
SearchFor=Begin$SPCconst
AutoCloseWith=$TAB$Cursor$CRLFEnd Const$CRLF
[BeginControlid]
SearchFor=Begin$SPCcontrolid
AutoCloseWith=$TAB%IDC_$Cursor$CRLFEnd ControlID$CRLF
[IDC]
SearchFor=$TAB%IDC_
AutoCloseWith=$TAB%IDC_$Cursor$CRLF
[IDM]
SearchFor=$TAB%IDM_
AutoCloseWith=$TAB%IDM_$Cursor$CRLF
[Union]
SearchFor=union$SPC
AutoCloseWith=$TAB$Cursor$CRLFEnd Union$CRLF
[With]
SearchFor=With$SPC
AutoCloseWith=$TAB%.$Cursor$CRLFEnd With$CRLF
ErosOlmi
02-01-2024, 00:05
2024.01.01 23:00 CET
by the end o Jan 2024 thinBasic version 1.12 will be out, I'm finalizing some parts I've developed and documenting them.
In the meantime have a look at this preview: https://www.thinbasic.com/projects/thinbasic/thinBasic_1.11.7.0_20231228.zip
There are many new feature and many bug fixed: https://help.thinbasic.com/index.html?version_1_11_3_0_version_1_12_0_0.htm
Joe Caverly
03-01-2024, 01:07
I am getting "Error 404 - Not Found" on both links.
Joe
ErosOlmi
03-01-2024, 07:17
Thanks Joe, my fault :oops:
Links fixed
Joe Caverly
03-01-2024, 15:50
Thanks for the link corrections.
I'm getting a virus warning for the file;
1030910310
Joe
Windows 10 [Version 10.0.19045.3803]
BuildNumber Caption CSDVersion OSArchitecture Version
19045 Microsoft Windows 10 Pro 64-bit 10.0.19045
ErosOlmi
03-01-2024, 18:51
Thanks for letting me know.
Of course I can guarantee there are no virus in the setup.
I develop on a Win10 computer where security systems like TrendMicro and Cynet are acting.
Petr Schreiber, my friend and thinBasic co-developer, works for one of the major AV company in the world.
Using VirusTotal 6 vendors give security warning
https://www.virustotal.com/gui/file/81b42e4352be5426d9f2d017816c0baa0f94fa2b35858ea9e788c666c48f6af4/details
Can you confirm me what AV are you using? I suppose you are using Microsoft Defender
I'm searching for a possible cause.
I think it is related to InnoSetup operation done by thinBasic SetUp where Setup deletes some possible old obsolete thinBasic files
https://stackoverflow.com/questions/68834409/program-installed-with-inno-setup-seen-as-trojan-wacatac-bml
Joe Caverly
03-01-2024, 20:20
Thanks for letting me know.
Can you confirm me what AV are you using? I suppose you are using Microsoft Defender
You are correct.
I am using Microsoft Defender for my AV.
Joe
Petr Schreiber
03-01-2024, 22:35
Hi Joe,
thank you very much for letting us know.
The issue is that some approaches which would otherwise solve the false positives (signing the binary, for example), are not something we can do with thinBASIC, as it could enable less kind people to write malware with it and going under the radar.
My tip #1 would be what Eros tried, that is to scan with Virus Total.
My tip #2 would be to send the sample to AV product support, to double check if the file is really problematic.
With Avast / AVG and now Norton / Avira I submit the file to threatlabs for check and so far they always got back with information the file is clean.
I think we could consider submitting to Microsoft before release, in the meantime it should be possible via this approach:
Submit a file for malware analysis - Microsoft Security Intelligence (https://www.microsoft.com/en-us/wdsi/filesubmission)
Petr
ErosOlmi
03-01-2024, 22:56
I've already created more than 15 different setups with different options also changing Inno Setup to older versions.
Every submit to VirusTotal have different results but always 3 or 4 AV give errors.
Unfortunately Microsoft AV under VirusTotal is always giving timing at the moment so I'm not sure there will not be other false positive.
My local Windows 10 Defender is not giving any issue.
Anyway I'm working on it.
ErosOlmi
03-01-2024, 23:24
Updated https://www.thinbasic.com/projects/thinbasic/thinBasic_1.11.7.0_20231228.zip
Not 100% sure will solve Defender false positive but should.
Joe Caverly
04-01-2024, 02:43
Updated https://www.thinbasic.com/projects/thinbasic/thinBasic_1.11.7.0_20231228.zip
Not 100% sure will solve Defender false positive but should.
Just downloaded, unzipped, executed the .exe, and not anything from Microsoft Defender.
Thanks!
Joe
Lionheart008
04-01-2024, 05:23
Good morning... I Had some weeks ago some Trouble with Code Viewing but Not with this new Update... Works fine Here with window 10 on my Notebook thx Eros Happy new year regards Frank
ErosOlmi
04-01-2024, 07:15
Just downloaded, unzipped, executed the .exe, and not anything from Microsoft Defender.
Great, thanks.
For the moment I just downgraded InnoSetup from version 6.2.2 to version 6.0.2.
I tried some of the old InnoSetup versions and 6.0.2 seems the one working better so far.
I will investigate further: https://jrsoftware.org/isinfo.php
ErosOlmi
04-01-2024, 07:18
Good morning... I Had some weeks ago some Trouble with Code Viewing but Not with this new Update... Works fine Here with window 10 on my Notebook thx Eros Happy new year regards Frank
Thanks for the confirmation.
I will also see if there are alternatives to InnoSetup for the future.
I used it since many years and it is great but recently it seems false positive on setups created with it are increasing.