Jump to content

Standard for user abbreviations ??


cal
 Share

Recommended Posts

To be clear.  I'm not having any issues getting things to work.   I just want to clarify my understanding of how I think things are supposed to work.

I've been using abbreviations for years.  I just updated to the newest ver of SciTE4AutoIt3 and discovered all my custom stuff has disappeared.  Not a big deal as I do have them in a text file.  A quick peak shows there is something now called the Scite abbreviation manager.  I have no idea how long that has been part of the package but I've never seen it before.

So I'm guessing this is the new way we are supposed to use to do abbreviations.  My guess this is so it can be standardised and if changed are made the tool will know and an end user will not have to worry about it.  Sounds good.  

In the past I used to edit various files to insert my abbreviations.  At some point the needed files changed and I added an include in one file to point to the others and it worked.  Looks like things have changed again.  So before I go messing with things can someone point me to where it talks about the new standard way of doing this.

nevermind I've already messed around as I started composing.


au3.keywords.abbreviations.properties
In the past I had to add custom abbreviations to this file (unless I was reusing an existing one).  This seems to have been reset back to the default content. If I did not put the custom ones here then they did not auto expand.


abbrev.properties
This used to contain my abbreviations and the code they expanded into.  It  had to be at the end so as to overwrite any existing ones with my versions.  I see it now it only contains a couple of calls to import other files.
It has been wiped out and now only contains the two lines.

import au3abbrev
import au3UserAbbrev

With that in mind a quick search shows...

"C:Program Files (x86)AutoIt3SciTEPropertiesau3abbrev.properties"
"C:UsersCalvinau3abbrev.properties"
- these seem to be the Global abbreviations.  Both files are the same.   Should I have two?


"C:UsersCalvinau3UserAbbrev.properties"                                        
- this is blank.

"C:UsersCalvinDropbox000 - my dirpicsau3UserAbbrev.properties"            
- contains my old custom stuff.  Obviously it won't work there.  I must have accidentally moved it when I was moving my "user includes" to dropbox.


OK.  So lets Not modify any files and fire up this manager thing first....
I added mbb=MsgBox(0, @ScriptName,  'Line ' & @ScriptLineNumber & @CRLF & '--- | ---')

seems to work, it does auto expand when I type it.  I used mbb because its not a replacement for a standard existing abbreviation but a custom one I use.


"C:UsersCalvinau3abbrev.properties"  - got backed up.  But I don't see any changes.  Does NOT contain "mbb" anywhere in the file.

"C:UsersCalvinau3UserAbbrev.properties" - got backed up and I see the entry I added.

"C:Program Files (x86)AutoIt3SciTEPropertiesau3.keywords.abbreviations.properties" - did not change but my "mbb" does auto expand.  Thats new.  This used to need to have any custom abbreviations added to it to make them work.

"C:UsersCalvinau3.keywords.user.abbreviations.properties"
- ahh so that where the "mbb" was added to.  I've never seen this file before.

- gennietimline shows this was an empty file just before I used the abrev manager.
- using timeline I see this file was first created on my system between Aug 28 2013, 855pm - 926pm as a zero byte file.
- the file has a create and a mod date of Feb 17 2012. 702am.
- I updated a coulple days ago so Aug 28 looks right.  
- this is likely when my custom abbreviations stopped working.  But I never noticed till last night.

Tried to create
mb=MsgBox(0, @ScriptName, StringReplace('Line ' & @ScriptLineNumber,'Line -1','compiled') & @CRLF & '---' & $| & '---')


mb.  gives an error that this already exists.  Edit the default one to the new one I want and it works.  But that's very bad.  Good thing I saved the orig.  I set it back to normal.  I should be able to override a default abrev with my own version without killing the original.  What If I change my mind and want to remove my custom one.  Under the old way I'd just comment out my custom line and the original default would kick back in.  I don't see a reset to default button on the editor.

so what if I just put it in manually into the file.
- ok that works.
- side note.  mb got added to the "au3.keywords.user.abbreviations.properties" even though its not needed.  I can take it out and the new custom mb still works.
- looks like the editor loops though the au3UserAbbrev.properties file and modifies the other as needed.



I figured things had changed.  So the new standard is the following files then...
au3.keywords.user.abbreviations.properties   - contains the new abbreviations and what they expand into.
au3UserAbbrev.properties  - contains any added custom keywords.

So since the editor will not let you replace existing stuff without overwriting it.  Best to just put your stuff in the files directly.


Thoughts?  Is there something I'm missing, for all I know its been this way for awhile.  Everything seems to work fine.


One thing I would like to know.  user Includes can be put anywhere I want them.  I can then point scite at them and all is good.  Mine point to a dropbox folder so all my computers automatically see all my includes and pick up any changes I make.  Can I do the same with these user abbreviation files?  I don't see anyway of pointing autoit to a different location for those.    Worst case.   I can move them to dropbox and create hardlinks in the original spots.
 

 

Suggestions for those who have a hand in creating this wonderfull scripting language. 

abbev editor - let the user config file override the globals without having to modify the originals.

au3UserAbbrev.properties - do we need this file.  the custom keywords are already in "au3.keywords.user.abbreviations.properties"   Its better if we only need to modify one file.  Granted, I'm sure there is a reason they are seperated out and exist in both places.  Just my thoughts.

Next up.  Scite config.  Something feels different.  code folding I think is working differently then what I'm used to.
 

That was a wall of text.   I had intended this to be a lot smaller. o:)

Link to comment
Share on other sites

Did I post this in examples?   I thought I had posted this in General.  There are no example scripts here.   Just general thoughts and questions.  Can this get moved?

edit.

If I'm not logged in I see this as thread started yesterday at 1048pm  But If I am logged in I see the threat start time as 448pm.   Odd.  Just thought I'd mention it.

Edited by cal
Link to comment
Share on other sites

You should have posted this in Chat ... or better still in Developer Chat, where there is at least one SciTE topic sticky.

Click on Report, and ask for it to be relocated.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

  • Moderators

cal,

Although admitting that I write the odd "wall of text" (see below!), I find long "stream of consciousness" posts like yours really hard to follow. Perhaps do your research first and then post the results in future? ;)

 

I figured things had changed. So the new standard is the following files then...

au3.keywords.user.abbreviations.properties - contains the new abbreviations and what they expand into.

au3UserAbbrev.properties - contains any added custom keywords.

So since the editor will not let you replace existing stuff without overwriting it. Best to just put your stuff in the files directly.

Thoughts? Is there something I'm missing, for all I know its been this way for awhile. Everything seems to work fine.

That is how it works since the last SciTE update. Jos (the SciTE guru) and I (the editor author) felt that it was best to keep user abbreviations away from the standard set - that way you keep your abbreviations when upgrading. Although you can edit the standard set if you really feel the need. As to overwriting - how else do you expect to change the content? :huh:

Location: SciTE expects the 2 files you mention to be found in the user profile, along with the user's SciTE properties and the user include UDF data(au3.UserUdfs.properties & au3.user.calltips.api) which are produced by the "UserCallTip Manager" tool on the same SciTEConfig tab as the "Abbreviation Manager". It seemed logical to keep all the user modified files in the user profile so that different accounts on the same machine would keep their own settings. Allowing a changed location for these files - which would probably affect all of the user files mentioned above - is one for Jos to look into as he understands the internal workings of SciTE much better than anyone else here, so I will point him to this thread. :)

Now to the other requests:

 

let the user config file override the globals without having to modify the originals

That is another one for Jos as I do not know how SciTE manages the abbreviations internally. Personally I have found that when I needed to override a standard abbreviation it was because I wanted a permamnent change (e.g. changing the ConsoleWrite EOL to @CRLF rather then @LF) so there was never a requirement to reset. If I wanted a temporary change I just added a digit to the current abbreviation (so mb1 in your example). I can certainly look into getting the editor to save a copy of a "standard" abbreviation if it is modified and allow it to be "reset" later - what is one more file amongst the many that SciTE produces/needs! :D

 

au3UserAbbrev.properties

This file is used by SciTE to define keywords so that you get syntax colouring for the abbreviations whereas the au3.keywords.user.abbreviations.properties holds the actual abbreviations. This is a SciTE requirement, so you do need both files (and the 2 UDF files I mentioned above). :)

 

code folding I think is working differently

Jos has certainly changed the folding logic recently, but I cannot remember exactly how and it certainly did not affect my scripts. I suggest reading through the SciTE thread(s) - or waiting until Jos pops in. ;)

I hope that helps. :)

M23

P.S. I have also moved the thread to Developer Chat as it is better suited there.

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

My main reason for the post was to verify the abbreviations were changed and now worked in the manor I thought they did.   Consider if confirmed and my main request answered.

Thanks.

 

 

 

I find long "stream of consciousness" posts like yours really hard to follow. Perhaps do your research first and then post the results in future?

 

Agreed,   I started writing it as I was looking into things.  Mainly to keep track of my findings.  I cleaned it up some but see that I should have cleaned it up a lot more.

 

 

That is how it works since the last SciTE update. Jos (the SciTE guru) and I (the editor author) felt that it was best to keep user abbreviations away from the standard set - that way you keep your abbreviations when upgrading. Although you can edit the standard set if you really feel the need. As to overwriting - how else do you expect to change the content?

 

A new user is going to use your standard keys at first.  Then add a few custom ones of his own.  Then likely modify the standard ones.  take the "mb" for example.  I used it as it was for awhile.  by the time I wanted to customize it, my fingers pretty much automaticly type "mb" and I did not want to have to try and use something like "mb1".  Hence the desire to change the original standard keys.  A new user who has only ever used the abbrev editor may not realize he can edit the  config files directly.   With the way it is now, he has to switch to and edit the standard abbreviations instead of putting it in the user section.    Next time he updates.  He keeps his custom user stuff but loses that custom abbreviation that he had to go edit in the standard set.

My point is that I think it would be nice if he could use the standard key "mb" (in this case) but let it be put in the user config file.   Since the user files loads after the standard set his custom "mb" abbrev is the one thats in memory and is used while leaving the original standard one intact.  Then when he updates to a new ver his custom "mb" is not wiped out.  The added benefit is that if someone then deletes his custom "mb" in the user section the original "mb" in the standard section is back to normal.

Granted like I said.  One can edit the user section manually and get these results.  I just think it would be a nice if the built in abbrev editor let you do it as well.

Fairly minor.  Consider it just "food for thought".

 

 

I can certainly look into getting the editor to save a copy of a "standard" abbreviation if it is modified and allow it to be "reset" later - what is one more file amongst the many that SciTE produces/needs!

 

No need to create yet another config file.  Or attempt to figure out what needs to be reverted  when a user wants to "reset".   If you take away the "already in use" error when someone  tries to use one of the standard keys from the default set.   Actually now that I think about it.  You don't need to let them edit the original standard set at all.   Just put all custom stuff in the user set.  Like I said above, it loads after the standard set and therefore will be the one used when the user types one of the keys in.   Perhaps let them look at the standard set and put a copy button in.  Then they can copy a standard entry from there into the user section and modify it.

One idea.  When a user switches to the standard set.  Change the "Create" button to a "copy" button and grey out the "edit" and "rename" buttons that are currently active.

 

 

 

Location: SciTE expects the 2 files you mention to be found in the user profile, along with

 

Makes sense from a multiple user on one computer point of view.   I suppose that would be the most common scenario.  In most cases that would automaticly give each user his own stuff and prevent each user from having to define where he wants stuff stored.   I was thinking one user on multiple computers.   I'll just use dropbox and put a couple hard links in.  No problem.

 

 

 

This file is used by SciTE to define keywords so that you get syntax colouring for the abbreviations whereas the au3.keywords.user.abbreviations.properties holds the actual abbreviations. This is a SciTE requirement, so you do need both files (and the 2 UDF files I mentioned above). :)

 

I figured there was a valid reason I was unaware of.  Thanks.

 

 

Jos has certainly changed the folding logic recently, but I cannot remember exactly how and it certainly did not affect my scripts. I suggest reading through the SciTE thread(s) - or waiting until Jos pops in.

 

Like I said.  I just thought it looked different then what I was used to.   I have not yet gone though the settings to see whats different.  No need for anyone to look into that.  I just mentioned it in passing as something that I need to look into, not something I need answers for.

 

And since I have your attention.   I think the editor is a great idea.  I originally figured it out by looking at various files way back when I first started.  An editor back then as a new user to get started would have been great.  So keep up the good work.

Autoit, Scite, the abbev editor.  They all work so well together.  A truly polished set of  tools.  I've loved using autoit from the fist day I looked into it many years ago.

So .... A big thanks to everyone who is involved.

 

 

 

P.S. I have also moved the thread to Developer Chat as it is better suited there.

 

lol.....  I was looking in "examples".  Then looked though "general" thinking maybe it got moved.  Finally I did a search.  I never even thought to look in "Developer".

Link to comment
Share on other sites

  • Moderators

cal,

I have been experimenting with the abbreviation files since I replied and I can see how I might amend the editor to do what you require without making it too complicated for the new user. So look out for a amended version soon. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

  • Developers

Way to much text for me to read while on vacation :)

I am not aware of any major folding changes so would need more details to understand the comment.

Ciao a tutti.

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

Link to comment
Share on other sites

  • Moderators

cal,

Here is an Alpha version of SciTEConfig (it is a zip of the exe) which includes the new Abbreviation Manager code. Please try it out and let me know if you find any problems - I obviously have not! :D

And if anyone else wants to comment, please feel free. :)

M23

<File removed - see below for newer version>

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

Before you read this.... its the long weekend.  go enjoy.  Come back to this in a couple days.



I extracted the exe and replaced the exe in "C:Program Files (x86)AutoIt3SciTESciTEConfig"

It just get an error on starting it.  


Info box.
No User Abbreviations exist
Only Create and Reinstall functions available.

But I do have several entries.  I'll show them below.


I Hit the "File Restore" to see what it does.

It wants to put put two custom entries in the user section.   "mb" and "mbb".  Looks like those come from my bak file.  However the bak file had 3 entries in it.
Saved it.  The user file that it thought was empty got saved as the new bak file with all contents intact.  But If I try to restore again from it then it just gives me those two same "mb" and "mbb".


If I restore my original files.  Its all works again as it should.



this file
au3UserAbbrev.properties

has the following lines in it.  The editor thinks its empty.

# AutoIt3 User properties

mb=MsgBox(0, @ScriptName, StringReplace('Line ' & @ScriptLineNumber,'Line -1','compiled') & @CRLF & '---' & $| & '---')
mbb=MsgBox(0, @ScriptName,  'Line ' & @ScriptLineNumber & @CRLF & '--- | ---')
dou=Dont|nUntil
iff=If $| ThennEndIf
w1=While 1nt|nWend
fun=Func |ntntnEndFunc
forr=For $i = | To  Step 1nNext
cas=SelectntCase |ntCase ntCase ntCase ntCase Else nEndSelectn
sl=sleep(|000)
ss=StringStripWS(| , 3)
ww=WinWait('|', '')
wwa=WinWaitActive('|', '')
mt=MsgBox(0,'|' & ' Script Line - ' & @ScriptLineNumber , $t )
be=Beep(500,500)|
reg=#region - |nn#endregionn|
er=#endregionn|
gr=GUICtrlRead($|)
gs=GUICtrlSetData($|, $)
ad=_ArrayDisplayExpanded($| ,'Line ' & @ScriptLineNumber & ' --- ' & '')
tt=$t = |
pc=ProperCase($|)

cr=& @CRLF & |
cr1=& @CRLF & |
cr2=& @CRLF & @CRLF & |
cr3=& @CRLF & @CRLF & @CRLF & |
cr4=& @CRLF & @CRLF & @CRLF & @CRLF & |
cr5=& @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & |

pm=$t = _popup_menu($|)
pmi=#include <_popup_menu_inc.au3> |








this file...
au3.keywords.user.abbreviations.properties

has just one line in it as follows.
au3.keywords.userabbrev=iff dou w1 forr cas mt be er mbb gr pm pmi
 

Link to comment
Share on other sites

  • Moderators

cal,

 

its the long weekend. go enjoy

Why does every one from the US think the rest of the world has the same holidays? Mine was last weekend. :P

I will look at the files you posted and see if I can reproduce the problem. :)

M23

Edit: Oops, found a bug which meant that it could not cope with the blank lines at the top of your file. Try this version:

<File removed - see new version below>

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

Actually I'm from Canada.   But I suppose I can forgive you for calling me an American.  :

Some of our holiday are different but this one happens to be the same.

This one works on my system.  Only thing Id put in is a note somewhere about saving the modified key to the user section.  Perhapes when a user clicks "save" it can say something about "code saved to user section".

When you click "save" to override an existing Abbreviation code, it drops you back to looking at the unchanged standard key you just attempted to override.  Took me a second to realize what had actually happened.  Looks good.  This way a user can use any keys without the danger of those being overiden in a future update.  And if he deletes his modifed key then the original default kicks back in.

 

Oh, I just noticed that your the author of "RecFileListToArray"  I knew I reconized your username from somewhere.  I use that all the time whever I need subdirs listed to an array.  Its one of the few UDFs that lives in my "include" dir.    Thanks for writing that.

 

Link to comment
Share on other sites

  • Moderators

cal,

My most sincere apologies - I should have resolved your IP before jumping to conclusions. In my defence you are not the first to have done it over the past few days - you are just the first not to come from the US. :>

I will add a suitable message about the "override saved" as you have suggested - I will also add a check to see if the SciTE abbreviation has already been overridden. Please let me know if you come across any other little things you feel could be improved - there is no rush to get this out as Jos will not be releasing a new SciTE4AutoIt3 until after the new AutoIt release. ;)

And I am glad you like the RecFileListToArray UDF - in case you had not noticed it is now part of the standard includes in the Beta and so in the next release, although it has been renamed to _FileListToArrayRec. :)

M23

Edit: And here is the new version: <Code removed>

Comments from all welcomed. :)

Edited by Melba23
New version released

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

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...