Jump to content
DjonsTyrman

SciTE color problems with udf

Recommended Posts

DjonsTyrman

Hi, I have a problem with syntax highlighting udf. AutoIt version: v3.3.14.2 | SciTE4AutoIt3 version: v3.6.6
I tried to use google. Reinstallation AutoIt and SciTE. None of it helped. Screenshot of the problem:

test.jpg

Share this post


Link to post
Share on other sites
Jos

Are you expecting the color to change magically when you add the extra UDF directories? :)
It doesn't work like that but you need to add the names of the UDF's in the proper location.
Open the SciTE4autoIt3 helpfile and look for: User UDFs and CallTips

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
DjonsTyrman
45 minutes ago, Jos said:

Are you expecting the color to change magically when you add the extra UDF directories? :)
It doesn't work like that but you need to add the names of the UDF's in the proper location.
Open the SciTE4autoIt3 helpfile and look for: User UDFs and CallTips

Jos

I also did all in a help file. But it still did not work.
But, the problem was solved SciTE4AutoIt3 reinstalling over the same version. Anyway thanks for the help. :)

Share this post


Link to post
Share on other sites
stuff123

I have the same problem for the latest SciTE version "3.7.3 Feb 16 2017 21:41:17". 

Following the instructions found at the bottom of this page: https://github.com/downpoured/scite-files/blob/master/files/api_files.md, I successfully enabled calltip and autocomplete for user udfs. 

However, syntax highlight (i.e., highlight for user udf function names) does not work despite having used SciTE Config to change its color. The text for user udf function names remains black. In contast, I am able to see different colors for standard udfs.

The following describes my setup:

  1. My *.api and *.properties files are located in the same directory as SciTE.exe. 
    • (In addition, I do have a SciTE folder in %LocalAppData%\AutoIt v3)
  2. I have tried pasting the contents of my *.properties file in every seemingly related properties file I found, e.g.,  SciTEUser.properties.
    • (The content of my *.properties file consists of just:  au3.keywords.user.udfs="function_names \")
  3. Finally, I found that attaching my function names to existing "au3.keywords.udfs" definitions will not confuse SciTE into treating my functions as standard udfs.

Having decided that most wikis do not provide a substantially different install method, I'm not sure what else to try now. 

If someone suspects a mistake anywhere, please let me know. I'm new to autoit, so feel free to assume mycomplete noobness :) 

Share this post


Link to post
Share on other sites
stuff123

I forgot to add to the above that in my SciTE Config, my "User Include Folder" is identical to my "AutoIt 3" folder

Share this post


Link to post
Share on other sites
Jos
Posted (edited)
6 hours ago, stuff123 said:

The following describes my setup:

  1. My *.api and *.properties files are located in the same directory as SciTE.exe. 
    • (In addition, I do have a SciTE folder in %LocalAppData%\AutoIt v3)

Did you use the installer or the SIP file to install the Full version of SciTE as this is NOT the correct directory in either case?

What are your environment setting for SCITE*? (result of: set Scite)

Jos

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
stuff123
20 hours ago, Jos said:

Did you use the installer or the SIP file to install the Full version of SciTE as this is NOT the correct directory in either case?

What are your environment setting for SCITE*? (result of: set Scite)

Jos

I used the following installers for AutoIt and the Full version of SciTE:

  1. https://www.autoitscript.com/site/autoit/downloads/ (Using the "Download Autoit" button)
  2. https://www.autoitscript.com/site/autoit-script-editor/downloads/   (Using the latest version SciTE4AutoIt3.exe (5262Kb) 24-2-2017 )

After installation, my SciTE directory is:  

  • C:\Program Files (x86)\AutoIt3\SciTE

The following directory also exists and contains the "SciTEUser.properites" file that is associated with changes made by SciTE Config (The file by the same name in the directory above is never modified by SciTE Config)

  • %localappdata%\AutoIt v3\SciTE

Finally, the "SET scite" command produces no output, not even a warning that: "Environment variable SciTE not defined"

I'm not sure if what follows is relevant, but I recall having performed an UnInstall of Autoit while an Autoit program was running. Upon closing that Autoit program, I reinstalled the latest version of Autoit. 

Should my next step be to manually set some environment variable as done in the link below? (I'm not actually sure what I should name the environment variable as, and what path I should set it to)

Thanks for responding

Share this post


Link to post
Share on other sites
Jos

The installer will set an environment variable as that is needed for the using the configured I'm localappdata.

Do you get any installer errors?

What is the path of the sciteuser.properties file when opened via the menu in score?

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
stuff123

I did not have any installer errors during install.

The path of the "SciTEUser.properties" file is: "C:\Users\Computer_name\AppData\Local\AutoIt v3\SciTE"

Other Details:

  • While "SET SciTE" produces no output in the Windows 10 Powershell, I do see a "SCITE_USERHOME" entry under the "System Properties" -> "Environment Variables" tab
  • The "Environment Variables" tab consists of two panes:
    1. The "User variables for Computer_name" pane:
      • "SCITE_USERHOME" IS found under this pane
      • The path set for "SCITE_USERHOME" is identical to the one for "SciTEUser.properties", provided above
    2. The "System variables" pane:
      • "SCITE_USERHOME" is NOT found in the "Path" variable in this pane.
      • I added the "SCITE_USERHOME" path to this "Path" variable. However, the problem remains.
  • Other info:
    • My calltips and autocompletes have always been working for my user udfs.
    • Somehow syntax highlight remains broken
    • I cannot fake my user udfs as standard udfs by simply adding function names to the "au3.keywords.udfs" variable, found in "au3.keywords.properties"

Thanks

Share this post


Link to post
Share on other sites
Jos

OK, that all seems to look good. So now on to the content of files. :)

So it is only the syntax color is not working for the user UDFs. This is the text in the SciTE4AutoIt3 helpfile on this topic:

Quote

Syntax Highlighting

Installing SciTE adds a special file to the user profile "au3.UserUdfs.properties" - this stores the function names from the UDFs to add to the proper color highlihting.  The contents look like this:

au3.keywords.user.udfs=_function1 _function2 _function3 \       
     _function4 _function5 _function6 _function7

Note that the entries are all in lowercase and all lines other than the first begin with a TAB character.  You can open this file via the <Options> menu in SciTE.

 Could you give me a copy of your au3.UserUdfs.properties and au3.properties. These need to be the versions that are shown when you open them via the ScitE Menu.

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
stuff123
Posted (edited)

Ah problem solved: I did not record the function names in lower case. I apologize for the wasted time.

(During prior testing, I saw that "TAB" is not really required, I must have then dismissed all format requirements as possibly outdated. I had also thought that underscores were required; having verified that that isn't the case, I was further taken in by the illusion.)

Thanks for calling attention to the content of these files.

Edited by stuff123

Share this post


Link to post
Share on other sites
Jos
5 hours ago, stuff123 said:

Ah problem solved:

nice... and don't worry about wasting time since that is the general purpose of this forum for me, called a hobby! ;)

Jos

  • Like 2

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

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

×