Jump to content

Newby - Autocomplete for functions and UDFs not working


Recommended Posts

Hi,

I've used AutoIT on and off for a few years and still think it s great. Now I want to get a little serious with it. I have found that functions that I create work but don't don't display the auto-completion with the variables to be populated. My functions are highlighted in black where other standard functions (say _Now() in Date.au3) are highlighted in light blue. I've searched high and low for more info on creating Standard UDFs and get the auto-completion working.

Assistance much appreciated.

Cheers

BigBob2

Link to comment
Share on other sites

Hi,

I've used AutoIT on and off for a few years and still think it s great. Now I want to get a little serious with it. I have found that functions that I create work but don't don't display the auto-completion with the variables to be populated. My functions are highlighted in black where other standard functions (say _Now() in Date.au3) are highlighted in light blue. I've searched high and low for more info on creating Standard UDFs and get the auto-completion working.

Assistance much appreciated.

Cheers

BigBob2

To put your UDF in Standard UDF collection, which will be included with AutoIt: http://www.autoitscript.com/forum/index.php?showtopic=62035

But, for only highlighting, in SciTE go to Options Menu, Open autoit3.keywords. Then find line with au3.keywords.udfs (line 58 for me) and put name of your function at begging of the list.

Then, to make CallTip:

When you add your own UDFs to the Autoit include folder, you may want to add them to Scite with Calltips. This feature has been added to make it easy for people who wish to do so.

You just need to open User CallTips Entries in the Tools menu of Scite. Then add your entries. The basic syntax is:

_FunctionName ( “Title”, “Text” ) Your function description.(required: #include <YourFile.au3>).

This makes it easy to manage your favorite created or collected UDFs. No more searching through the Includes folder, for the correct syntax or any other reason. This is not a feature to stop you sharing UDFs, but to make it easy till such time, when the UDFs maybe selected to be included with Autoit.

Edited by i542

I can do signature me.

Link to comment
Share on other sites

Hi,

I've used AutoIT on and off for a few years and still think it s great. Now I want to get a little serious with it. I have found that functions that I create work but don't don't display the auto-completion with the variables to be populated. My functions are highlighted in black where other standard functions (say _Now() in Date.au3) are highlighted in light blue. I've searched high and low for more info on creating Standard UDFs and get the auto-completion working.

Assistance much appreciated.

Cheers

BigBob2

Assuming you are using SciTE then -

You can add your own functions by editing the file au3.user.calltips.api in the Scite\api folder.

I have a script which adds functions for you and there is a link to it in my signature. If you have comments before the function then you can specify a key word so that the appropriate comment can be added to the Call Tip. For example, if you have a function Abcd() like this

;Abcd returns pots of gold
;WhatItDoes:finds the end of the rainbow
Func Abcd($SkyCol,$RainRate,$TimeOfDay)

and you give the keyword "WhatItDoes" then my script will edit the user call tips file so the call tip will show the function with the parameters and add "finds the end of the rainbow". If the key word is not found then no comment it added to the call tip.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...