AutoHotkey Community

It is currently May 25th, 2012, 3:30 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

Would having a standard/recommended editor for AutoHotkey interest you?
I don't do enough scripting to justify the use of a customized editor.
I write scripts frequently but prefer an extremely simple editor such as Notepad or Metapad.
It would have to have some compelling benefits to get me to switch from the editor I use now.
If a customized editor became standard/recommended, there's at least a 40% chance I'd use it.
If a customized editor became standard/recommended, there's at least an 80% chance I'd use it.
I already use an editor customized for AutoHotkey that has all the features I'm likely to want.
Other
You may select 1 option

View results
Author Message
 Post subject:
PostPosted: April 17th, 2007, 3:38 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
Micahs wrote:
SciTElauncher modifies autohotkeydir setting in ahk.properties for current drive letter and allows help, autocomplete, compile and run from usb drive

Very nice! I had been using Notepad to edit scripts away-from-home. :oops:

I have one suggestion:
Code:
EnvSet, SciTE_HOME, %sPath%

SciTE Documentation wrote:
If the "SciTE_HOME" environment variable is set on either Windows or GTK+ then it is where both the global and user properties files are found.
(otherwise SciTEUser.properites is put in Documents and Settings, which is not ideal for a portable setup.)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 18th, 2007, 10:33 pm 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
Howdy! Thanks for the interest.

Quote:
I have one suggestion:
Quote:
(otherwise SciTEUser.properites is put in Documents and Settings, which is not ideal for a portable setup.)

That is a good idea and certainly can't hurt, but it may not be necessary.

Quote:
On Windows, the global properties file is located in the directory of the executable.
Quote:
The user properties file is looked for in the user profile directory as set in the USERPROFILE environment variable, or in the directory of the executable if USERPROFILE is not set.


When you use another computer, chances are that it does not have autohotkey installed, and these env vars are not set. In the case where you are using another comp that does have AHK installed, SciTE_HOME env var might come into play. It could prevent you from over-writing any of their prefs or settings, or using their settings to start SciTE. (I have to say, though, that my SciTEUser.properties file is blank! This may be common depending on how customized it is. All my customized stuff is in ahk.properties)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 19th, 2007, 7:33 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
Micahs wrote:
When you use another computer, chances are that it does not have autohotkey installed, and these env vars are not set.
Nope, AutoHotkey doesn't use environment variables (unless you specifically tell it to.)
AHK help file wrote:
The name "SetEnv" is misleading and is used only for backward compatibility with AutoIt v2. Unlike AutoIt v2, AutoHotkey does not store its variables in the environment. This is because performance would be worse and also because the OS limits such variables to 32K. Use EnvSet instead of SetEnv to write to an environment variable.
USERPROFILE is a standard Windows environment variable (on XP at least), which points to the user's folder (usually C:\Documents and Settings\Username). Unless you use a computer where USERPROFILE has specifically been cleared, it'll be there. Typing "set USERPROFILE" into a command prompt will show you the current value.

If you don't want to unnecessarily set SciTE_Home, you could do this:
Code:
EnvGet, up, USERPROFILE
if up
  EnvSet, SciTE_HOME, %sPath%

However, I believe this would be unnecessary, in light of:
AHK help file wrote:
An environment variable created or changed with this command will be accessible only to programs the script launches via Run or RunWait.


I tend to leave the default options in SciTEGlobal.properties, AHK-specific stuff in ahk.properties, and use SciTEUser.properties for my personal preferences. (It is blank by default, however I went through the SciTE docs and customized everything to my liking.) In any case, there are only a few computers I edit ahk scripts on, and all of them now have a local copy of SciTE. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2007, 8:52 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
Quote:
When you use another computer, chances are that it does not have autohotkey installed, and these env vars are not set.

Of course, I meant SciTE, not AHK.

Also, I didn't realize at first that 'USERPROFILE' is OS specific, not SciTE specific. I will add
Code:
EnvSet, SciTE_HOME, %sPath%
to SciTElauncher to make it more portable.
Thanks for the insight!

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 2nd, 2007, 7:30 am 
Offline

Joined: June 20th, 2005, 9:13 pm
Posts: 37
Note that SciTE for AutoHotkey is available. SciTE has an excellent feature: Code folding, which collapses items between braces until you need to see them.

SciTE is the same editor supplied with AutoIt.

http://www.autohotkey.com/forum/viewtopic.php?t=18606

(I chose "Always allow HTML" in my forum profile, but the forum doesn't allow HTML, apparently.)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2007, 9:14 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
Yeah I saw that. I know SciTE has a lot of cool features, that's why I use it and posted the config I use. Mine is set up for portability, something not addressed in other threads. You can't rely on your usb drive always being "N:\" or whatever. That's where SciTElauncher comes in. It modifies the "AutoHotkeyDir" variable and allows help, execution, and compiling from SciTE anywhere. That's what we were discussing.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 2nd, 2007, 3:14 pm 
Offline

Joined: June 20th, 2005, 9:13 pm
Posts: 37
Micahs wrote:
Yeah I saw that. I know SciTE has a lot of cool features, that's why I use it and posted the config I use. Mine is set up for portability, something not addressed in other threads.

Could you provide the URL of your configuration method?

You obviously know much more than I about SciTE. I would like to do more configuration of SciTE, but I don't want to spend days learning how. My experience with the documentation is that it is poor, and there is no GUI available for configuration.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2007, 11:48 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
Well, I didn't just post the config files or anything, it is a complete SciTE package. http://www.autohotkey.com/forum/viewtopic.php?p=115654#115654
It's in this thread on the first page.
About a gui for SciTE config: https://sourceforge.net/projects/tsct/ I tried it and it seems to cover most of the common stuff that would be needed.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 3rd, 2007, 1:37 pm 
Offline

Joined: June 20th, 2005, 9:13 pm
Posts: 37
Micahs wrote:
Well, I didn't just post the config files or anything, it is a complete SciTE package.

I'm very enthusiastic about SciTE. It seems like the editor we need. I like that it doesn't use the Windows registry and can be run from any drive, including a USB drive, as shown below.

Anyone not liking the bold syntax highlighting of the package linked above can try my autohotkey.properties file, also linked above. Micahs does not say below what syntax highlighting he used, but he does give a link to software to change it.

Here is a copy of Micahs's comment on the other page, so that people don't have to go there to get it. The file format, .RAR, is an archive file which can be unpacked using the excellent free 7-Zip, at http://www.7-zip.org/:

Micahs wrote:
I agree. Scintilla-based in general and SciTE in particular.
SciTE is portable, lightweight and flexible. I agree also that it may be a little much for beginners, but according to the license to SciTE it is possible for someone to distribute a "branded" version configured specifically as needed.
Quote:
Permission to use, copy, modify, and distribute this software and its documentation for any purpose
Here is my portaSciTE setup:
    1. It uses PhiLho's lexer
    2. AHK compile/run/help already set up (followed PhiLho's instructions)
    3. AHK is the default language
    4. SciTElauncher modifies autohotkeydir setting in ahk.properties for current drive letter and allows help, autocomplete, compile and run from usb drive
    5. SciTElauncher maximizes SciTE after loading it
This allows beginners to just start - without configuring SciTE! If they want to learn to make custom config changes, they can. If not, it works as is.
I have it set up like this:
Code:
  USB drive root
  +-----AHK
         +-----SciTE
         +-----AutoHotKey
         ------SciTElauncher.exe

This is a standard SciTE v1.71 just set up for AHK. Autohotkey is not included in the rar.
Download
(If you download this, please scan it with your antivirus software before opening it, just in case.)

Here's PhiLho's SciLexer thread and SciTE home if you want to put it together yourself.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2007, 4:09 pm 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
Howdy,
Micahs wrote:
Here's PhiLho's SciLexer thread and SciTE home if you want to put it together yourself.

Syntax Highlighting is supplied by PhiLho's excellent SciLexer and ahk.properties file I stole - ahh borrowed.
Autohotkey.api is supplied with Autohotkey in 'Extras\Editors\Notepad++ directory', of course.

Yeah, if anyone wants to change the setup, feel free. I think the more exposure PhiLho's lexer gets, the better.
Also, the more people use SciTE the better because the knowledge pool will be larger when it comes to helping beginners (or anyone with "this should be simple, but it isn't" problems.)

[EDIT]
BTW, I noticed that box.net changed the way resources are accessed and the old links do not work anymore. Here are the current locations:
portaSciTE
SciTELauncher

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group