Jump to content
Sign in to follow this  
AdamUL

SciTE4AutoIt3 Abbreviation Expansion Errors [Solved]

Recommended Posts

AdamUL

When I type the following abbreviations in SciTE, it does the following:

ifthen : Will not expand the abbreviation by pressing the space bar or using ctrl+b due to it automatically capitalizing the "i" in if.

ifelse : Will capitalize the "i" in if causing only the last 2 characters "se" to expand making it "IfelSetError()".

ifelseif : Will not expand the abbreviation by pressing the space bar or using ctrl+b due to it automatically capitalizing the "i" in if.

dountil : Will not expand the abbreviation by pressing the space bar or using ctrl+b due to it automatically capitalizing the "d" in Do.

whilewend : Will not expand the abbreviation by pressing the space bar or using ctrl+b due to it automatically capitalizing the "w" in while.

selectcase : Will capitalize the "s" in select causing only the last 2 characters "se" to expand making it "SelectcaSetError()".

switchcase : Will capitalize the "s" in switch causing only the last 2 characters "se" to expand making it "SwitchcaSetError()".

These are all that I have found as of now, but there could be more. It seems due to SciTE making the first letter capitalized when if recognizes that it is a keyword, but does not make it letter lower case again after the typed word is not a keyword as you continue to type.

I have created a ticket for this.

Adam

Edit: Updated post title to solved.

Edited by AdamUL

Share this post


Link to post
Share on other sites
Melba23

AdamUL,

Are you sure you are using the same SciTE as the rest of us? :mellow:

All those abbreviations work (and always have worked) for me - SciTE does NOT capitalise the first letter and they expand as you would expect.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
AdamUL

I have the most recent downloaded version.

From the About SciTE dialog box:

SciTE

Version 1.79

Jul 16 2009 18:30:31

by Neil Hodgson.

Updated: Valik & Jos

From History in the help file

--------------------------------------------------------------------------------------------------

2/28/2010

*** Updated AutoIt3Wrapper_Gui/AutoIt3Wrapper v2.0.1.24 (Jos)

- Made changes to support installation that didn't use installer

- Fixed autocomplete for #autoit3wrapper directives by adding au3.autoit3wrapper.api file and updating au3.properties

------------------------------------------------------------------------

I have download the latest version again and reinstalled, but it is still doing the same thing. This is a standard installation using the installer.

On my machine, it does capitalize the first letter of the word if the typed word is an AutoIT Keyword. The capitalization occurs not when the first letter is typed, but it is change to a capital letter as you complete the part of the abbreviation that is the same as an AutoIT keyword. I do not know what would be causing it, if it was not something in SciTE. If you continue to type it will not revert the capitalized letter back to lowercase that was first typed since the word is not a keyword anymore. The abbreviation will not expand if it is not all lower case. If I go back and manually change the capitalized letter and then go back to the end of the abbreviation and type space, or ctrl+b, it will then expand.

Just testing again without using abbreviations. When you type an AutoIT Keyword it will capitalize the first letter as you finishing typing the word. Here is an example to try. Type this all on one line to see the effect: if then else. When I type "if", as soon as I type "f", the "i" is capitalized. For "then", as soon as I type "n", the "t" is capitalized. For "else", as soon as I type the second "e", the first "e" is capitalized. This is nice if you are just writing code, but if you want to use abbreviations starting with AutoIT Keywords, it does not help at all.

Adam

Share this post


Link to post
Share on other sites
Melba23

AdamUL,

Does not uppercase for me - fortunately! :mellow:

However, perhaps you have different settings - SciTE has enough of them! Open SciTE and using the <Options> menu, select <Open au3.properties>. Around line 20 in that file there should be a couple of lines like this:

#define the activation of the ProperCase function using au3.api.  0=no change, 1=Propercase functions and keywords
proper.case=0

Mine is set to 0 - is yours?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
AdamUL

Melba23,

My au3.properties shows proper.case=0, but I started searching other properties files for that string. I found proper.case=1 in the SciTEUser.properties file. I then checked SciTE Config for AutoIt3 utility, since it edits that file, and sure enough "Auto Propercase Function and Keywords" was checked. Unchecked it and everything is working as expected. I must of checked that box recently, and forgot about it. I now know not to have the "Auto Propercase Function and Keywords" checked and try using abbreviations with AutoIt Keywords. I don't change settings in SciTE that much, only increasing the number of buffers, so I had no idea what to look for and where to look.

I will update the bug ticket, since I still believe that it is a bug since "proper.case=1" and abbreviations with AutoIT Keyword are incompatible, but not documented.

Thanks for the help,

Adam

Share this post


Link to post
Share on other sites
Melba23

AdamUL,

Glad we found the solution. Like I said, SciTE has too many options sometimes! :mellow:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
AdamUL

Jos has fixed this bug by updating the AutoItTools.lua script file to wait to proper case the keyword until after a space is typed. From the testing that I have done, it is working as expected with abbreviations. You will just need to replace the current AutoItTools.lua in the C:\Program Files\AutoIt3\SciTE\LUA folder with the new one to correct this issue.

Thanks Jos for finding a solution to this problem. Auto proper case is a nice feature as well as using abbreviations, and being about to use them together without issue is very nice.

Adam

Share this post


Link to post
Share on other sites
Jos

The propercase function is now only called when after a word one of the following is typed: " " or "(" or or "=" (let me know when I forgot anything that could be a delimiter)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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
Sign in to follow this  

×