Jump to content
Sign in to follow this  

User Call Tip Entries

Recommended Posts

Hi. I'm trying hard to understand what you mean by "User Call Tip entries" and "my file is blank" but couldn't. Where do you find that? what file are you talking about ? :)

Share this post

Link to post
Share on other sites

Ah ok.. well my menu is a little bit different so our versions of SciTE might not be the same but your answer is here , scroll down to "Properties Files" section. SciTE is used with Autoit3 but it's in fact a scintilla editor and the doc was on the scintilla homepage :)

Properties file

Much of SciTE's behaviour can be changed by editing the properties files.

There are four properties files used:

* Local properties file called "SciTE.properties" which may be present in the same directory as the file being edited.

* Directory properties file called "SciTEDirectory.properties" which may be present in the same or in a parent directory as the file being edited.

* User properties file called "SciTEUser.properties" on Windows and ".SciTEUser.properties" on GTK+

* Global properties file called "SciTEGlobal.properties"

Settings in the local properties file override those in the directory properties file which overrides those in the user properties file which override those in the global properties files. Environment variables are also available as properties and these are overridden by an explicit setting in one of the properties files. (........)

I assumed you were talking about "Open user properties file" .. not sure though.. my SciTE doesn't have "User Call Tip entries"

Edited by MikeP

Share this post

Link to post
Share on other sites

Look within the Scite4AutoIt3 help file and you maybe enlightened. :)

You can look online here for help on the Scite4AutoIt3 site.

Share this post

Link to post
Share on other sites

The main page for the SciTE4AutoIt3 docs is http://www.autoitscript.com/autoit3/scite/main.shtml

That has a TOC on the left site of the page.

The Option comes with the SciTE4AutoIt3 installer only, not with the included "lite" version of Scite in teh AutoIt3 Installer.


Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites

oh all right. This explains all. Thanks Jos !

I didn't know about that either. Very useful. I wrote a little script to update the UserCallTips for me.

In case it's of interest here it is. Needs a bit of tidying and comments.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### 
Global $Form2 = GUICreate("Add User Call Tips", 372, 194, 303, 219)
Global $Label1 = GUICtrlCreateLabel("UDF whose functions are to be  added", 12, 8, 187, 17)
Global $Input1 = GUICtrlCreateInput("", 12, 25, 342, 21)
Global $Button1 = GUICtrlCreateButton("Browse", 203, 5, 47, 20, 0)
Global $Input2 = GUICtrlCreateInput("UserCallTip", 12, 88, 176, 21)
Global $Key = GUICtrlCreateLabel("Keyword in UDF to indicate comment", 12, 71, 179, 17)
Global $Label2 = GUICtrlCreateLabel("(Keyword must be at start of a comment", 12, 112, 190, 17)
Global $Button2 = GUICtrlCreateButton("Add functions to Scite UserCallTips", 12, 152, 344, 25, 0)
Global $Label3 = GUICtrlCreateLabel("before the Function.)", 24, 128, 102, 17)
Global $Pic1 = GUICtrlCreatePic(@ScriptDir & "\scite.bmp", 224, 72, 129, 60, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
#EndRegion ### START Koda GUI section ### 

Global $iniFile = @ScriptDir & "\UserCallTips.ini"
Global $keyword = IniRead($iniFile, "Keywords", "UserCallTip", "UserCallTip ="), $newkeyword
Global $lastfile = IniRead($iniFile, "Keywords", "LastFile", "")
GUICtrlSetData($Input1, $lastfile)
GUICtrlSetData($Input2, $keyword)
Global $nMsg, $file, $fileA, $newkeyword
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
        Case $Button1
            $file = FileOpenDialog("Select the UDF", @ScriptDir, "AutoIt File (*.au3)")
            $fileA = StringSplit($file, '|')
            If $fileA[0] > 0 Then $file = $fileA[1];stop multiple files
            GUICtrlSetData($Input1, $file)
        Case $Button2
            $newkeyword = GUICtrlRead($Input2)
            AddCallTips(GUICtrlRead($Input1), $newkeyword)
            If $keyword <> $newkeyword Then
                If MsgBox(262144 + 4, "Key word has changed to '" & $newkeyword & "'", "Do yu want to save the new keyword for next time?") = 6 Then
                    IniWrite($iniFile, "Keywords", "UserCallTip", $newkeyword)
            IniWrite($iniFile, "Keywords", "LastFile", GUICtrlRead($Input1))

Func AddCallTips($udf, $kw)
    Local $sCT, $fudf, $sCT, $donebefore = False,$comment = '',$Func = '',$NewUCT = ''
    Local $sect,$line,$fw
    Local $AutoItProdexePath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir")
    Local $UCTFile = $AutoItProdexePath & "\Scite\api\au3.user.calltips.api"
    $sCT = FileRead($UCTFile)
    $fudf = FileOpen($udf, 0)
    While 1
        $line = FileReadLine($fudf)
        If @error <> 0 Then ExitLoop
        $line = StringStripWS($line, 3)
        $sect = StringLeft(StringStripWS(StringRight($line, StringLen($line) - 1), 1), StringLen($kw))
        If $sect = $kw Then
            $comment = StringRight($line, StringLen($line) - StringInStr($line, $kw) - StringLen($kw))
        If StringLeft($line, 5) = 'Func ' Then
            $Func = getfunc($line)
            If StringInStr($sCT, $Func) = 0 Then
            $NewUCT &= $Func & $comment & @CRLF
            $donebefore = True
        If StringLeft($line, 1) <> ';' Then $comment = ''
    If $NewUCT <> '' Then
        $sCT &= $NewUCT
        FileCopy($AutoItProdexePath & "\Scite\api\au3.user.calltips.api", $AutoItProdexePath & "\Scite\api\BAKau3.user.calltips.api")
        $fw = FileOpen($UCTFile, 2)
        FileWrite($fw, $sCT)
    If $donebefore Then MsgBox(0,"Warning","At least one of the functions was already included in User Call Tips")

Func getfunc($sf)
    Local $sm, $spos, $lBracket = 0, $rBracket = 0, $endfunc = 0
    $sf = StringReplace($sf, "Func ", '')
    For $spos = 1 To StringLen($sf)
        $sm = StringMid($sf, $spos, 1)
        Switch $sm
            Case '('
                $lBracket += 1
            Case ')'
                $rBracket += 1
        If $lBracket > 0 And $lBracket = $rBracket Then
            $endfunc = $spos
    If $endfunc > 0 Then Return StringLeft($sf, $endfunc)
    Return ''


It uses this image which needs to be saved in the script folder as scite.bmp

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.

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
Sign in to follow this  

  • Create New...