Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

SciTE4AutoHotkey v3.0.04 [Updated Aug 14 2013]


  • This topic is locked This topic is locked
1137 replies to this topic

Poll: Looking good? (245 member(s) have cast votes)

Looking good?

  1. Voted Yes (379 votes [85.94%])

    Percentage of vote: 85.94%

  2. No (15 votes [3.40%])

    Percentage of vote: 3.40%

  3. File not found (47 votes [10.66%])

    Percentage of vote: 10.66%

Vote
fxx
  • Members
  • 3 posts
  • Last active: Feb 07 2013 09:41 AM
  • Joined: 02 Feb 2013

SciTE4AutoHotkey is getting better and better, thanks fincs!

 

Something I would like to see work differently:

 

a) Is it possible to make the New button to create a script based on default ahk template? Now I always have to create scripts in Windows and only then open them in SciTE.

 

b) I would also like to set a default encoding for new (or all) scripts to UTF-8 with BOM, how do I do that?

 

c) I prefer this if syntax:

rKo5AgF.png

How do I make pressing Enter to not insert a tab on the new line after if, else and else if, but keep tab inserting on the new line after {

 

d) How to make and + on the Numpad to insert those symbols and to reassign commenting and collapsing/expanding to Shift+ and Shift++ respectively.

 

Thanks a lot!

 

P.S. Courier New font has a 'bug' and displays lowercase L in italics in size 9 weirdly:

HfljmOU.png

You might recall I already had a problem with lowercase L looking like uppercase L long time ago, I reinstalled Windows and it resurfaced.

I searched through properties and couldn't understand why SciTE displays fonts in size 9 despite that it is set to 10 in properties, until I found this in SciTEGlobal.properties:

 

magnification=-1

 

What is the reason to do so? I have placed:

 

magnification=0

 

into SciTEUser.properties and all is well now, but I thought I'd ask about it.



fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007

Is it possible to make the New button to create a script based on default ahk template?

This is not something SciTE supports, sadly. You may want to create a scriptlet that adds the template code you want.

I would also like to set a default encoding for new (or all) scripts to UTF-8 with BOM, how do I do that?

SciTE does not support this either, sorry.

How do I make pressing Enter to not insert a tab on the new line after if, else and else if, but keep tab inserting on the new line after {

You do not have to worry about that. If you press '{' after that new line is indented, the line will get dedented. This is the way other code editors such as Visual Studio work.
; Before
if something
    ;<--- tab

; After pressing {
if something
{ ;<---- Line gets dedented

Courier New font has a 'bug' and displays lowercase L in italics in size 9 weirdly:

Not SciTE4AutoHotkey's fault grin.png
You may want to get rid of Courier New and use the 'Light' style if you have Windows Vista or higher.

What is the reason to do so?

Font size. I already tried getting rid of this, but it either made the font bigger or it made it look weird if I decreased the actual font size.

into SciTEUser.properties and all is well now,

In this case you should use the built-in mini-property editor ("Tools > SciTE4AutoHotkey settings...").

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

a) Is it possible to make the New button to create a script based on default ahk template? Now I always have to create scripts in Windows and only then open them in SciTE.

b) I would also like to set a default encoding for new (or all) scripts to UTF-8 with BOM, how do I do that?

 

Both can be done with a little knowledge of Lua and access to the SciTE documentation.

Save the following as NewAhk.lua in your user config folder:

if props["FileNameExt"] == "" and editor.Length == 0 and not buffer.templateLoaded then
    f = io.open(os.getenv("windir").."\\ShellNew\\Template.ahk", "r")
    if f then
        t = f:read("*all")
        if t:sub(1, 3) == "\239\187\191" then  -- UTF-8 BOM
            t = t:sub(4)
            scite.MenuCommand(IDM_ENCODING_UTF8)
        end
        editor:append(t)
        editor:EmptyUndoBuffer()
        editor:SetSavePoint()
        f:close()
    end
    buffer.templateLoaded = true
end

...and add the following to your user properties file:

extension.*.ahk=$(SciteUserHome)\NewAhk.lua

This will probably only work if default.file.ext=.ahk (this is set by default for SciTE4AutoHotkey).

 

This is not something SciTE supports, sadly.

 

Even if that were the case, how is it relevant?  It's not like you can't modify SciTE, and haven't already done so...



Kiluah
  • Members
  • 29 posts
  • Last active: Jan 07 2017 08:36 AM
  • Joined: 31 Jul 2012

Im a bit of a AHK newbie but have been using SciTE4AutoHotkey for a few versions now, In the debugger, something has changed so each time you use F10 to step through a line of code, the focus goes back to the Scite4AutoHotkey window each time.

 

This was not the case in an earlier version I have used. Is there a way to change it back so it no longer does this please?

 

Many thanks,

 

Brendan



fxx
  • Members
  • 3 posts
  • Last active: Feb 07 2013 09:41 AM
  • Joined: 02 Feb 2013

How do I make pressing Enter to not insert a tab on the new line after if, else and else if, but keep tab inserting on the new line after {

 
You do not have to worry about that. If you press '{' after that new line is indented, the line will get dedented. This is the way other code editors such as Visual Studio work.
; Before
if something
    ;<--- tab

; After pressing {
if something
{ ;<---- Line gets dedented

 

Indeed and that's perfect. Last version of SciTE I used didn't support that and I posted without even tryig...

 

In this case you should use the built-in mini-property editor ("Tools > SciTE4AutoHotkey settings...").

 

Thanks for the tip, I removed my changes and used it instead happy.png

 

a) Is it possible to make the New button to create a script based on default ahk template? Now I always have to create scripts in Windows and only then open them in SciTE.
 
b) I would also like to set a default encoding for new (or all) scripts to UTF-8 with BOM, how do I do that?


Both can be done with a little knowledge of Lua and access to the SciTE documentation.

 
Thanks so much, Lexikos. Both work like a charm. After a little googling I added one line to move caret to the last line:

editor:SetSel(-1, -1) 

but wouldn't have been able to make the whole script myself.

All that gives me hope this also can be mended somehow:

 

d) How to make and + on the Numpad to insert those symbols and to reassign commenting and collapsing/expanding to Shift+ and Shift++ respectively.

 

P.S. forum's post editor gave me a hard time formatting the message, it changes messages when swithcing into BBCode Mode and back, messes with blank lines and doesn't support undoing...



Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

fxx: KeypadPlus and KeypadMinus are among the hotkeys defined by default in the global properties file.  You just need to override the user.shortcuts property by defining it in your user properties file.  I'd suggest copying the current setting (which is defined over multiple lines in the global properties) and editing the lines to do with the keypad.  The SciTE Documentation explains how to use this property.

 

And yes, this forum software has quite a few issues.



fxx
  • Members
  • 3 posts
  • Last active: Feb 07 2013 09:41 AM
  • Joined: 02 Feb 2013

Lexikos: thanks again, I was looking for Numpad...



d3a1i0
  • Members
  • 14 posts
  • Last active: Jul 11 2013 12:27 PM
  • Joined: 16 Jan 2013

Comment out the #NoTrayIcon line in <SciTE Folder>\toolbar\Toolbar.ahk, and tell me the full contents of "Lines most recently executed" and "Variables and their contents".

 

Sorry for the slow responses. I'm doing this on my work computer (S4AHK works perfectly on my home computer). Since the Debug function will not load I do not see how to get those details. I did comment out the line and see the icon when I open S4AHK. I can right click on it, then it takes about 15 - 20 seconds to load the context menu, but it is just the the following:

contextmenus.png



fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007

it takes about 15 - 20 seconds to load the context menu

Hmm, looks like you have some performance problems in the affected machine.

You have to click on "Open" in order to see the script window.

qwerty0
  • Members
  • 39 posts
  • Last active: Feb 25 2013 09:45 AM
  • Joined: 25 Oct 2012
SciTE4AutoHotkey v3.0.02 is slower than the older when editing the file of about 5000 lines .

does anyone have the same problem?



SAPlayer
  • Members
  • 403 posts
  • Last active: Apr 11 2014 04:45 PM
  • Joined: 06 Nov 2012

At my Windows8 PC I can't open the Help file (F1) in SciTe. Then the Windows-message "SciTE4AutoHotkey - a SciTE distribution for AutoHotkey has stopped working". I tried reinstalling SciTe.

 

 

PS: I use the German help file, but if I open the help file normally (without SciTe), it works.

 

Sry for my English ;)



fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007

does anyone have the same problem?

SciTE and Scintilla were upgraded from 3.2.3 to 3.2.4 in the latest SciTE4AutoHotkey release. Something may have happened; I'll keep an eye to the SciTE/Scintilla mailing lists.

At my Windows8 PC I can't open the Help file (F1) in SciTe. Then the Windows-message "SciTE4AutoHotkey - a SciTE distribution for AutoHotkey has stopped working". I tried reinstalling SciTE.
PS: I use the German help file, but if I open the help file normally (without SciTE), it works.

This is weird and has never happened to anybody. Does it also happen with the normal English help file? If not, then please report the problem to the authors of the German translation.


This seems wierd to me. I create a short text script named xxx.ahk and all is well. From within the editor I save it as xx - x.ahk and it will delete any break points that I have set when I begin debugging and will not allow me to set a new one. I then set the file name back to xxx.ahk and breakpoints work normally.

Bug confirmed. Thanks for reporting, I will fix it when possible.


This bug has now been fixed and I've issued a hotfix. If you don't see a pop-up when you open SciTE4AutoHotkey right click on the toolbar and select "Check for updates..."

SAPlayer
  • Members
  • 403 posts
  • Last active: Apr 11 2014 04:45 PM
  • Joined: 06 Nov 2012

Yes, it also happens with the normal help file (of v1.1.9.3).



fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
Care to specify more details about CPU, OS and other system specs? Just for the record, I currently use Win8 Pro x64.

Coco
  • Members
  • 697 posts
  • Last active: Oct 31 2015 07:26 PM
  • Joined: 27 Jul 2012

My help file works. I'm using AHK v1.1.09.03 and the latest version of S4AHK..I'm on Windows 7