PDA

View Full Version : User tools



DirectuX
23-01-2020, 10:38
Hi,

thinAir seems limited to list only the five first tools specified in thinAir_Tools.ini.
Five slots, three of them are already used by thinClippy, thinDownload and ressource editor.

I have thinternational, gitPrepare and thinRad(nya). Please, could it be possible to have like 2 more slots ?

ErosOlmi
24-01-2020, 06:58
Next update will have up to 20 user tool menu items.
Also it will load configuration from user file \thinBasic\thinAir\Tools\thinAir_Tools_Usr.ini that is actually just ignored :oops:

10117

Petr Schreiber
24-01-2020, 08:55
That would be superb, thanks a lot!


Petr

DirectuX
24-01-2020, 09:17
thanks a lot!

ReneMiner
08-08-2020, 05:53
For that: small suggest to enable user-configurability to bit more order:

How 'bout open XML-Style ?




<?xml version="1.0" encoding="whatever needed"?>

<!-- this is a non-configurable dummy which is only to display names etc.
this is meant to be only a copy of the built-In thinAir_menu.xml to find in
App_Path & "thinAir\local\" and probably named alike "thinAir_Menu.English.XML" -->

<thinAir local="english" />

<!-- supposed to work as the "default.theme.xml" but this one will not be used by thinAir
the default-settings of thinAir with english captions should be hidden deep inside and not
accessible for the user. All we have to do if we like to return to shipping-defaults is to remove/rename our self-created thinAir_Menu.USER.xml file which anyone can create from this template in his native language. I am not sure if that requires ANSI or is it possible
using UTF-8? You know for sure...-->


<thinAir menubar>
<popup>
<item name="popup_file" text="&File" />
<string>
<item name="file_new" text="&New..." accel="vk_N" ctrl="true" />
</string>
<popup>
<item name="file_New_User" />
<!-- not visible because no text. the user can write inside "thinAir_Menu.User.XML" something that gives it a text to open his personalized submenu at this position -->
</popup>
<separator/>
<string>
<item name="file_Open" text ="&Open..." accel="vk_O" ctrl="true" />
</string>
<popup>
<item name="file_Openrecentfile" text="Open &recent files..."/>
<strings>
<slots used="22" number="0" max=30 />
<repeat incr="%slots number%" until="%slots used%"
<item name="file_SlotRecentfile{1}" text="{1} {2}" 2="$recentfile({1})$" 1="%slots number%" />
</repeat>
</strings>
</popup>
<popup>
<item name="file_openrecentPath" text="Open from recent paths..."/>
<strings>
<slots used="12" number="0" max="20" />
<repeat incr="%slots number%" until="%slots used%"
<item name="file_SlotRecentPath{1}" text="{1} {2}" 2="$recentpath({1})$" 1="%slots number%" />
</repeat>
</strings>
</popup>
<popup>
<item name="file_OpenUser" />
<!-- another currently invisible popup to node something user-defined right before the separator, just requires a text -->
</popup>
<separator/>
<!-- i will not complete it here. It serves for the idea, just repeat that pattern. ----------------------< -->


its a start to have thinAir localized to any language - this is what users can do on their own - and attach translations here in the
thinAir-forum-section somewhere. I am nosy how many different languages it will count...

But there is - oh how could you know - more to it.

menu-Icons for tools-files should be obtained directly from the files or the associated editor if "tools"-files are documents- sometimes we have a helpfile, html or pdf containing the information we currently need.

Mentioning documents- especially htm/html/mhtml/chm should be easy to display in thinAir and even for pdf/fdf there are dlls to
use it in browser - all it requires were to use the webbrowser-control instead of scintilla in a modified mdi-child of thinair- while
such mdi-child is displayed the file-listview could add the file-pattern - to "*.tBasic*" & "*.inc" it could also show html-help or pdf-pages while the codebrowser/explorer could enable tabpage3 and display navigation of the help.
Even F1 on hovering above Keyword and codetips could display full help in that area if the user likes to.

But actually i am looking to find information about scripting thinAir - am searching how to display and highlight a certain token, how to make thinAir to save or reload a file or if it has to be the hard way to send bulk keys to select a keyword?
If it could reply for example what is the control-handle within the mdi-child that currently displays a certain script, give a list of all the opened scriptfiles and to open and display a certain row & column without to force an error by saving a copy of the script to show with the name of the currently running and from within thinair started script where i fake the error-log just to display something in another instance - its not satisfying- especially when i try to rename some object that is referenced 100 times or more often. The way the previous thinAir did it ("Run script inside thinAir") was neither the solution that could convince me.

i imagine that thinAir provides a few functions like if running a script as this:


Uses "thinAir"

Dim tA as New thinAir(getCurrentInstance[, Using {Direct|File ="c:\test\filename.txt"|Clipboard|Heap}])
' make sure it will not open a new one
' Direct: revive the "direct-tabpage" to display a textbox as StdIn/StdOut
' for "1-line-scripts" that will be fired when Enter-key is pressed
' File : returned results appended as new Line to the given file
' Heap: returned results will be stored at Heap and it will only return a pointer.

? tA.ListFiles ' in Direct-mode print names of currently loaded files directly to the built-in console-alike-textbox
' in file-mode each item gets saved on a seperate line
' clipboard would contain a string delimited by newLine chars
' pointed heap(HHHH) contains a list of pointers (equal to an array of dword) as
' Heap_Get(HHHH) returns "PTR1PTR2PTR3PTR4PTR5etc."
' Heap_Get(PTR1) returns 1st open filename, Heap_Get(PTR2) the second in the list ...
'
? tA.Show(sFilename, Row, Col) to make the current instance of thinAir display the file at the specified position
? tA.Backup(sFilename) to save sFilename & "_backup_" & Replace$(Now, Any ":'",".") & sFileExt '
? tA.SelectAt(sFilename, StartRow, StartCol, {SelLength| EndRow, EndCol})
? tA.SelectToken(sFilename, Row, Col, sToken[, collate Ucase])
? tA.Reload(sFileName[, createBackupBeforeReload])
? tA.ReplaceAt, replaceToken, InsertAt, InsertBeforeToken, InsertAfterToken
? ta.MoveSelection(newRow, newCol)

tA.AddTabPage(
' so it allows to use any thinBasic-functions until i type:
STOP

Requesting function results without any variables like using "?" at times when we were proud to own a computer thats memory
just was 64kB and colon was a command seperator while semicolon meant to continue output still on the same line...