Jump to content

Au3 API Updater


MHz
 Share

Recommended Posts

Picture of a modified calltip in Scite
calltip1.png

Au3 API Updater

This is the release of the Au3 API Updater version 2. Version 1 was released to public some years ago and it was very simple with just the "Check: Boolean, @error" type of stuff. Later, I decided of a new idea to implement a more expressive modification of the AutoIt inbuilt function calltips. The ini file method was limited in detail and not very readable for a human being. So I chose a csv method to do the storing of data needed. More information is added to the calltips which can be a concern as it takes more attention to read the detail of them. One advantage though is that it may help some people from referring to the help file too much. So a compromise had to be accepted though I did try to minimize wording as was possible.

Scite allows the use of escape characters such as n t and some others in calltips though the interest in the others is not explored for this release. This is something that version 1 did not have access to. This opened up ideas to make better use of calltips with more then 2 lines. The n is for creating new lines while ntt is inserted inline for very long lines to create a wrap of text e.g. create new line, add 2 tabs and then continue with the line of text. I did choose to put a space after the last t as you may see that the t is not part of the word following it.

It is important to have the property setting of calltip.*.use.escapes=1 in Scite. This allows for escaped n and other escaped characters in calltips.

If you want to view and save the csv file in Scite then make sure you use the property setting strip.trailing.spaces=0 as Scite may have have it set to 1. The csv file is tab delimited and a setting of 1 will remove the tabs on the function name lines if saved. A spreadsheet program may help fix the formatting by importing it set as tab delimited with no quotes or other delimiter settings. Saving the csv with LibreOffice helps to correct them as I have tested.

The script can also wrap long lines in the STD UDFs. Some inbuilt functions such as ControlCommand, which has many variations, is exempt from calltip modification except for wrapping long lines. The script does not check the function parameters to determine calltips to assign to them. You may notice in the script that I create a filter array. These filtered items are treated different compared to the other inbuilt functions. These filtered functions will keep the original descriptions.

How to use Au3 API Updater

  • Set calltip.*.use.escapes=1 in Scite. *
  • Set strip.trailing.spaces=0 in Scite. *
  • Extract zip file with folder structure to e.g. Desktop.
  • Copy au3.api from @ProgramFilesDirAutoIt3Sciteapi into the folder on your Desktop.
  • Run the script Au3_API_Updater.au3 in the Desktop folder and it may take as little as a second to finish the task.
  • The au3.api will be modified with a backup made of the original set to .bak extension. The backup file allows you to rerun the scipt without the copy task needing to be repeated.
  • You can then append the original in the api directory with a bak extension and then copy the modified au3.api file back into the api directory.
  • Changing tabs in Scite or restarting Scite will load/reload the new calltips.

* = User Options will be a reasonable place to add the Scite setting into.
strip.trailing.spaces=0 is only needed if you edit and save the csv file in Scite.

Download Au3 API Updater

AutoIt 3.3.8.1
au3_api_updater.zip
AutoIt 3.3.10.2

au3_api_updater.zip

The requirement for using escaped characters in Scite calltips is version 3.04 or better.
More can be found on the homepage that I setup for it here. A lua file for handling script directory calltips etc. can be found on the homepage.

Cheers :)

Edit
Uploaded new zip file for use with AutoIt 3.3.10.2.

Edited by MHz
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...