Jump to content
c.haslam

AutoRelate Help: script to link native to UDF pages

Recommended Posts

c.haslam

Version 1.1 submitted.

Changes

Added more checking of settings, initialize dialog, optimization of links; fixed bug in removing multiple links from a native .txt file

Version 1.1 readme.txt

This script provides an automated way of adding and updating links from help for native functions to help for UDF Management
groups and functions.

The script searches for links to UDF Management and function .htm files that can be placed in Related section
of native function .txt files.

The code and settings have been tested extensively with 3.3.13.20 .txt files.

The main script is driven by settings in the Settings .au3 file. There are no settings in the main au3 file (except
those in the initialization dialog), and almost no code in the main au3 file.

The main script reads the .hhc files and updates txtFunctions\*.txt files

Documentation is provided in both the main au3 file and, for settings, in the Settings au3 file.

Thanks to Melba23, the main script calls on his script (also in the zip) for multi-column sorting.

The search settings, as delivered, work well, so they can be expected to work well for 3.3.15.x. If tuning is desired,
only the Settings file needs to be changed.

In the zip file, the top-level directory is english. It expects the subdirectories to be those in the current beta
docs.zip file.

Various reports are produced, which provide information on what the script intends to link to what, and why.
The final report tells what links the script has inserted into .txt files.

There are two actions which are set in the initialization dialog:

  • Update, which updates links in native .txt files, adding and removing them per the search
  • Remove, which removes all links to libfunctions from the .txt files.

The script asks for confirmation regarding

  • whether the action set in the dialog is the desired one, and
  • for the Update action, whether to go ahead and add or remove links.

I see this script being run before the build process.

Maintenance is expected to be minimal.

As delivered, the script, with the Settings, links about 300 native .txt files to about 2500 UDF files.

I see this script as beneficial to many, including me. (I am notoriously bad at finding things!)

Bug reports and suggestions are welcome.


c.haslam

 

AutoRelate NativeToUDFs 1_1.zip

Edited by c.haslam
Version 1.1 submitted

Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Share this post


Link to post
Share on other sites
c.haslam

Several approaches were considered, and tried. The easiest is to compare Management and function file names in UDFs with those in natives. But this would produce very few matches, so very few links.

I also tried creating UDF keys from native file names, and searching for UDF keys through all UDF Management and function file names. Actually not all: _Excel, _Word etc. were excluded. This worked, but was very slow, e.g. 3 minutes.

The approach used in the submitted script (explained at the top of the main .au3 file and in the Settings file) has been found to be the fastest that is flexible, without changing code. The Settings file is an au3 file because it is in a format familiar to AutoIt users, and syntax checking it gets rid of typos.

Furthermore, as native and UDF functions are added, the worst that can happen is that links from native functions to new UDFs are not created (until a dev adds to the settings). All links that were in a previous AutoIt release will still be there in a new release.

In the key-mapping settings, it is possible to exclude matches. For example, in the Settings file as submitted, native first "syllable" String  maps to String and to Str-Struct. So as well as StringSplit linking to UDF file names containing String, it also links to UDF file names containing Str but not to those containing Struct. This feature was one of the last features added, and has been found to be very useful.

It has taken me many hours to reach this point. It is, to me, a fascinating data-management project.

Edited by c.haslam

Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Share this post


Link to post
Share on other sites
c.haslam

In the Settings file, I commented out Map Management (for v. 3.3.14.0). With the arrival of 3.3.15.0, it should be un-commented out, otherwise MapExists(0 will link to

_WinAPI_MapVirtualKey(), etc.


Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Share this post


Link to post
Share on other sites
guinness

Map() and _WinAPI_MapVirtualKey() are not related. One is a data structure and the other is for map a virtual key code to a scan code.


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
c.haslam

I agree.

 

The main script starts by eliminating file names in those native management groups specified in the Settings .au3 from the search. As submitted, none are specified; with Map now available again, we don't want MapExists, etc. even being looked at by the mapping tables.

Excerpt from AutoRelate_NativeToUDFs Settings.au3 as submitted:

; *** NATIVE FUNCTIONS ***

;The script expands all Management groups, except these. All group file names are removed from the list
Global $gNatMgmtsToRemove = ''
;['Map Management']

And as recommended for 3.3.15.0 and later:

; *** NATIVE FUNCTIONS ***

;The script expands all Management groups, except these. All group file names are removed from the list
Global $gNatMgmtsToRemove = _
['Map Management']

On further thought, when I look at the mapping settings, the main script will still work if the change were not made (and produce the same results), but would run slightly slower. In the mapping tables (in the Settings file), 'Map' is not mapped to  'Map' in UDF file names, so when 'Map' is looked for in the mapping tables, none will be found, so 'Map' won't be searched for in UDF Management and function file names.

Edited by c.haslam

Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Share this post


Link to post
Share on other sites
c.haslam

Version 1.1 uploaded. See the first post.


Spoiler

CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×