Jump to content

Recommended Posts

  • Developers
Posted

This is an internal Keyword, so you can't change that, but just install the Full version of SciTE4Autoit3 and you will have an easy AutoComplete function! ;) 

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

Posted
  On 5/31/2020 at 12:44 AM, zeenmakr said:

I'm getting tired of typing this out and want to shorten it to something like @SLN but dont know which include file it is in.

Expand  

AFAIK , the macros are not declared in one of the open standard UDF's.

I would add a new abbreviation to the SciTE editor.

=> Open au3.keywords.abbreviations.properties ---> add sln

==> Search for au3abbrev.properties (better : au3UserAbbrev.properties (create one, if it doesn't exist))

--> add :

sln=@ScriptLineNumber |

You can do this within the SciTE editor itself (-> Options) :

Abbrevs.thumb.png.da0147953fd88b6317d1be4f23a9bc59.png

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted
  On 5/31/2020 at 7:16 AM, Jos said:

This is an internal Keyword, so you can't change that, but just install the Full version of SciTE4Autoit3 and you will have an easy AutoComplete function! ;) 

Expand  

Also configurable abbreviation and I think that  you can have a shortcut sln > @ScriptLineNumber

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

Go to sctite and in tools>scite config>other tools>run abrev manager>create

 

Alternatively:

If you dont have these filenames showing up in the options drop down menu:

au3UserAbbrev.properties

au3.keywords.user.abbreviations.properties

you can create them in: C:\Users\%userprofile%\AppData\Local\AutoIt v3\SciTE

then inside au3.keywords.user.abbreviations.properties you can have something like:

au3.keywords.userabbrev=sln

And inside au3UserAbbrev.properties:

sln=@ScriptLineNumber

After creating the abreviations you can save these files so you dont have to create again in case you format the pc or something.

Edited by careca
  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

 

  On 5/31/2020 at 8:56 AM, mLipok said:

Also configurable abbreviation and I think that  you can have a shortcut sln > @ScriptLineNumber

Expand  

That's what I already suggested above and it works, or am I missing something ;)?

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted

Totaly missed your post, what a waste of time.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted
  On 5/31/2020 at 9:34 AM, careca said:

Totaly missed your post, what a waste of time.

Expand  

I don't think it was a complete waste of time. There are different ways to get to the goal. Your post contains some information that might help @zeenmakr in case he does not understand my description. According to the motto, double works better :).

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted (edited)
  On 5/31/2020 at 9:34 AM, careca said:

Totaly missed your post, what a waste of time.

Expand  

any activities which engage your brain is not waste of time.

 

EDIT: btw. I missed too.

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 5/31/2020 at 10:00 AM, Musashi said:

Your post contains some information that might help @zeenmakr in case he does not understand my description.

Expand  

Looking back I did mention one thing extra: abrev manager

 

screenshot - 31052020-1545.png

Edited by careca
  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

Thanks all, this is alot of new infos and opening up new doors. the function trick is neat to tidy up the code and sure am going to abuse the macro method.

tried to edit au3.keywords.user.abbreviations.properties in np++ but file size is 0kb, open ok in SciTE but can't save unless run as admin. does au3.keywords.user.abbreviations.properties get generated on the spot? then where is the text stored?

Posted
  On 5/31/2020 at 7:16 AM, Jos said:

This is an internal Keyword, so you can't change that, but just install the Full version of SciTE4Autoit3 and you will have an easy AutoComplete function! ;) 

Expand  

What is the different between this Full version vs the standard one came with autoit installer? and should i copy and overwrite the standard one or use it as a portable?

  • Developers
Posted (edited)

The advantages are "A lot" and just use the installer when you have used the AutoIt3 installer as well.

  On 6/1/2020 at 1:04 AM, zeenmakr said:

tried to edit au3.keywords.user.abbreviations.properties in np++ but file size is 0kb, open ok in SciTE but can't save unless run as admin. does au3.keywords.user.abbreviations.properties get generated on the spot? then where is the text stored?

Expand  

Install the Full version first and then start trying all of this, because else you will get issues like this! ;) 

Jos

 

Edited by Jos

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

Posted (edited)
  On 6/1/2020 at 2:35 AM, zeenmakr said:

What is the different between this Full version vs the standard one came with autoit installer? and should i copy and overwrite the standard one or use it as a portable?

Expand  

1. Full Version of SciTE :

The download page simply says : AutoIt Script Editor (Customised version of SciTE with lots of additional coding tools for AutoIt) - Installer containing SciTE and all configuration files plus utilities

I would definitely prefer the Full Version, because it provides many new features. Just Download and install it (you can probably use the Portable Version, but I haven't done that yet)

 

  On 6/1/2020 at 1:04 AM, zeenmakr said:

then where is the text stored?

Expand  

2. Add an abbreviation (my way ;)) :

Open the SciTE-Editor (Full Version). Here again the proceeding (open spoiler with graphic)

  Reveal hidden contents

-> Click on Options

-> Choose Open au3.keywords.abbreviations.properties ==> add sln -> Save

-> Choose Open au3UserAbbrev.properties ==> add (and save after) :

sln=@ScriptLineNumber |

Of course you can also use the Abbreviation Manager (see posting by @careca ) if you feel more comfortable with it - that's a matter of personal preference. Once you understand how the abbreviations work, you can integrate e.g. entire structures. This can save a lot of unnecessary typework.

Edited by Musashi
typo

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted

Very interesting, at least for me: I would have expected, that this would return *ALWAYS* "4", as the function's optional parameter is set to @ScriptLineNumber at line #4 at the first line opening the function block.

 

Looks like this "pre-fillment" of optional parameters is done at the line *CALLING* the function?

 

 

ClipSave.jpg

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Posted

This makes sense to me. I wouldn't have it any other way.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

I am using this with @error:
 

#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #Tidy_Parameters=/reel /sf /ri
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#Region Variables/Opt
    Global Const $DEBUG = True
#EndRegion Variables/Opt

#Region Main
    _Main()

    Func _Main()
        SetError(0xDEAD)
        _LogError()
    EndFunc   ;==>_Main
#EndRegion Main

#Region Functions
    Func _LogError($p_iERR = @error, $p_iSLN = @ScriptLineNumber)
        If Not $p_iERR Then Return
        If Not $DEBUG Then Return
        ConsoleWrite("Error: 0x" & Hex($p_iERR, 4) & " @SLN " & $p_iSLN & @CRLF)
    EndFunc   ;==>_LogError
#EndRegion Functions

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...