Jump to content

Where is the Scite forum?


pseakins
 Share

Recommended Posts

I'm having a whole bunch of trouble understanding which of the myriads of AutoIt\Scite config files are actually functional.

Scite on-line help says I can add an abbreviation via an options menu add abbreviation command - but there isn't one. When I open abbrev.properties it says "don't change anything between the dashed lines". The dashed lines are at the top and end of the file so where do you add them? Also, the comment says "Created by UpdateDefs" where is UpdateDefs? How do I run it? Where can I download it?

How do I add an abbreviation? Where can I discuss other Scite issues?

Phil Seakins

Link to comment
Share on other sites

There is a mailing list mentioned on the bottom on this page: http://www.scintilla.org/SciTE.html

'UpdateDefs' comes with the full version of SciTE4AutoIt3: http://www.autoitscript.com/autoit3/scite/

You can add your own abbreviations outside of the 'Dashed lines' by adding a new line on top or bottom of the file.

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
Link to comment
Share on other sites

Thanks for your reply.

The link to the mailing list http://mailman.lyra.org/mailman/listinfo/scite-interest is broken. lyra.org does not exist or at best is down.

UpdateDefs.exe, thanks - found it, I had seen that earlier but forgot it was there. Apparently it toggles all the settings between a production and beta version of Scite?

I've tried adding abbreviations to the list top and bottom. Nothing happens.

I've tried changing some of the existing definition keywords to my own test values. Sometimes it works, sometimes it doesn't. Mainly, it doesn't.

Having to prefix all variables with the dollar symbol is a pest, I avoid the shift key wherever possible. So, I just need an abbreviation like "dd" or "44" which will translate to "$". You'd think that would be simple enough.

I've tried adding dd=$! to abbrev.properties and nothing happens, even after quitting and restarting Scite.

(What I mean by "doesn't work" - when the new abbrev code is typed into a source file it doesn't turn red and doesn't get translated after hitting space.)

Phil Seakins

Link to comment
Share on other sites

Would it not be easier to remap a button on the keyboard/mouse to send the dollarsign instead? :)

Edited by TzarAlkex
Link to comment
Share on other sites

Ok, no wonder I am going grey before my time. I've just discovered an undocumented file C:\Program Files\AutoIt3\SciTE\au3.keywords.abbreviations.properties.

This file contains a list of all the keywords in C:\Documents and Settings\user\abbrev.properties.

I have found that it is necessary to enter the abbreviation into BOTH files before the abbreviation will work. This is not documented anywhere that I have seen! My C drive has eight *.properties files that appear to be associated with this feature.

TzarAlkex - I don't have any spare keys. My laptop has even less. How would you go about remapping a key?

Phil Seakins

Link to comment
Share on other sites

I only said that since i thought that maybe it would be easier but i dont know, YOU should do it the way YOU like.

I thought maybe it was possible doing something like this

Example 1: I have a keyboard from Logitech so i have iTouch running and can in there map both the "fastbuttons" and f1-f12 to almost anything i want

Example 2: Create a script in autoit which writes a dollarsign ($) every time i press on the fourth mousebutton or something else that is rarely used (I have never tried this but i see no reason for it not to work)

Or maybe even learn to use the shift-key and be happy since you can get that with only 1 hand (swedish only have 3 more letters but still uses Alt Gr for lots of stuff including $ so i must use 2 hands for getting it in a comfortable way)

Link to comment
Share on other sites

Apparantly I took too long to write this cus I hit preview and 4 more posts have been added haha. Ah well, I initially wrote this in response to post #3...

The turning red and translate-after-space is a feature added in by one of the AutoIt devs (JdeB specifically). For that functionality to work you also have to add your abbreviation to a keylist probably named "au3.keywords.abbreviations.properties"

Otherwise, you expand an abbreviation by typing "dd" (for example) then pressing Ctrl+B. This is so you could have abbreviations that are valid code that don't auto expand, it would be annoying if you had an abbreviation "For" and everytime you started typing a For loop it expanded to something completely different, right? So you would type "For*press Ctrl+B*" instead. But JdeB wrote a Lua script to read from the "au3.keywords.abbrev" variable (stored in the file I mentioned above) and auto-expand (plus highlight) any abbreviations it finds in there when you hit space.

So in summation, if you want your abbreviation to auto expand, add your abbreviation to "abbrev.properties" (before the dashed lines), and add the abbreviation to the "au3.keywords.abbrev" in the "au3.keywords.abbreviations.properties" (and this is only going to work with AutoIt files, for other filetypes you'll have to pick apart the Lua script and adapt it yourself, have fun, I got frustrated with it and gave up).

Link to comment
Share on other sites

Thanks Saunders, it's all pretty clear now. Of course, it still begs the question - why is this not documented anywhere?

It's a bit complex and totally non-intuitive, so you'd think that whoever implemented this would have taken the extra step of documenting it.

I'd now like to add extra functionality to AutoIt3.lua ALT-{ and ALT-} to move to previous\next Func. I can see that stuff in AutoIt3.lua is linked to SciTE's Tools menu but how it is linked is a total mystery.

This is a great product and beats the other scripter I was using by a mile, but this missing info is very frustrating.

Edited by pseakins

Phil Seakins

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