AutoHotkey Community

It is currently May 25th, 2012, 7:33 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: May 12th, 2007, 9:37 pm 
Offline

Joined: April 25th, 2007, 10:13 pm
Posts: 29
toralf wrote:
Thanks for your contribution,
I considering to use NPP. When that time comes, I will use your files.

Thanks toralf for your kind words. It's very little I have done comparing with what you and many other veterans have done here. And thanks for your help. This is the most wonderful community I have ran into.

In terms of editors, I have been using Vi/Vim for ages (like almost 18 years). NPP is the second editor I have tried, and I like it so far. I still use Vim quite a bit, but when comes to editing ahk script, I use NPP exclusively.

Cheers,
Mosaic


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 24th, 2007, 1:51 pm 
Offline

Joined: April 25th, 2007, 10:13 pm
Posts: 29
Update for insertExt.ini to recognize Subroutine definition with comment on the same line as the subroutine name, for example: (This code snippet is from PicturePuzzle0.9a)

Code:
Auto-Solve: ;                                                               [ Auto-Solve ]
  Loop, Parse, Coords, |
     ControlMove,, % AGetF( A_LoopField,1,"-"), % AGetF( A_LoopField,2,"-"),
                ,, % "ahk_id " AGetF( cHwnds, A_Index )
  WinSet, ReDraw,, ahk_ID %GuiID%
  SB_SetText("  GAME OVER !!!!",1 ) , SB_SetText("`tTiles Left: 0",2 )
  SetTimer, GameTimer, Off
Return


The above won't be recognized from the previous insertExt.ini, however, the new one will.

Code:
[Function List]
Show all functions=1
Sort by names=0
showCmd=0
[User Languages]
Count User Languages=1
Name 1=AHK Autohotkey
KeyWBodyBeg 1=
KeyWBodyEnd 1=
MatchCase 1=0
Count Comment 1=1
Count Syntax 1=4
Syntax P1.1.1=^
Syntax P2.1.1=\([^(]*\)
Syntax P3.1.1=[a-zA-Z0-9@?#\[\]_]+
Syntax P4.1.1={
Syntax P5.1.1=}
Syntax P6.1.1=$
Syntax P1.2.1=
Syntax P2.2.1=
Syntax P3.2.1=[#!^+&*~$ -=\[\]\\;',./A-Za-z0-9]+[:][:][ \t]*$
Syntax P4.2.1=
Syntax P5.2.1=
Syntax P6.2.1=
Syntax P1.3.1=^
Syntax P2.3.1=[ \t]*$
Syntax P3.3.1=[a-zA-Z0-9@?#\[\]_'-]+[:]
Syntax P4.3.1=
Syntax P5.3.1=^[r]eturn[ \t]*$
Syntax P6.3.1=$
Syntax P1.4.1=^
Syntax P2.4.1=[ \t]*[;].*$
Syntax P3.4.1=[a-zA-Z0-9@?#\[\]_'-]+[:]
Syntax P4.4.1=
Syntax P5.4.1=^[r]eturn[ \t]*$
Syntax P6.4.1=
Comment P1.1.1=/*
Comment P2.1.1=*/
[HEX-Editor]
Columns=16
Bits=1
Binary=0
Little=0
Capitel=0
Extensions=.exe .dll


Notice, this version of insertExt.ini still won't recognize comments following the return statement, for example:

Code:
Sub1:
   ; code blocks
Return   ; end of subroutine


As a work around change the above to
Code:
Sub1:
   ; code blocks
Return   
; end of subroutine


I have raised this issue with Notepad++ Function List Plugin author Jens, see NPP Function List Plugin Forum, hope he can help me find a solution.

Cheers,

Mosaic


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2007, 6:47 am 
where is userDefineLang.xml ? I cant find it anymore..


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2007, 8:12 am 
Offline

Joined: February 24th, 2007, 6:02 pm
Posts: 175
Location: Budapest, Hungary
userDefineLang.xml


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2007, 2:52 pm 
Thanks HuBa 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2007, 7:36 pm 
Offline

Joined: August 8th, 2006, 3:55 pm
Posts: 49
Thanks mosaic, your posting http://www.autohotkey.com/forum/post-120088.html#120088 , Sun May 06, 2007, helped me very much.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2007, 12:53 am 
Is it possible to easily change the indent spacing in notepad++?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2007, 1:04 am 
Offline

Joined: February 24th, 2007, 6:02 pm
Posts: 175
Location: Budapest, Hungary
hermes as guest wrote:
Is it possible to easily change the indent spacing in notepad++?

You are posting in the wrong thread. The proper place for your problem is here.
Anyway: Preferences/Misc/Tab settings/Tab size


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2008, 5:38 pm 
Is someone already working with the newest version of Notepad++ (now 4.7.3) having support for ahk-subroutines?
mosaic described how to do it for earlier versions of Notepad++ . I tried to adjust to the new version, but in vain.
(Someone will say that I am posting in the wrong thread, but this subject was discussed here)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 16th, 2008, 4:11 am 
Offline

Joined: April 25th, 2007, 10:13 pm
Posts: 29
ashamed wrote:
Is someone already working with the newest version of Notepad++ (now 4.7.3) having support for ahk-subroutines?
mosaic described how to do it for earlier versions of Notepad++ . I tried to adjust to the new version, but in vain.
(Someone will say that I am posting in the wrong thread, but this subject was discussed here)


ashamed,

I haven't been active in the forum for a while. However, I did upgrade my Notepad++ to 4.7.5, and it's working fine. I upgraded both on my XP machine as well as on my Vista machine. On my XP machine, upgrade was easy, however, on my Vista machine, I have to manually input the rules in, for some reasons, it could not read the rule in correctly. So, if all else fails, try to follow my earlier message and try to manually input the rules in.

Let me know if you still have problems.

cheers,

Mosaic


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2008, 4:49 pm 
mosaic,

thanks for your remarks. I made the mistake to use Function List Plugin 2.0 ALPHA,
but meanwhile I returned to Function List Plugin v1.2 final and applied
your description above. Then it worked fine.

Once more, many thanks.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2008, 4:27 am 
Offline

Joined: December 6th, 2007, 12:48 pm
Posts: 364
I followed everything, I applied the file and successfully saw the syntax being differentiated for AHK files, but I can't customize it like I want... I don't find AHK in the language list @ NPP neither in the styler configurator... can anyone help?

Edit:
It's a really good app, try it deeper!
But... I JUST CAN'T GET THE AHK SYNTAX WORKING! I did everything, but it won't show in the language list... I did it before, don't know how, but now the syntax is not being recognized! Someone please help!! :D

_________________
AHK is perfect.


Last edited by Da Rossa on February 10th, 2008, 9:28 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject: Dirty Hack
PostPosted: February 12th, 2008, 5:48 pm 
Using Notepad++ v4.7.5 and Function List v2.0 alpha I added the following lines to the file notepad++_install_dir\plugins\Config\FunctionListRules.xml right at the end before the closing </FunctionList> tag.

Code:
    <Language name="AHK Autohotkey" imagelistpath="">
        <CommList param1="/\*" param2="\*/" />
        <Group name="FUNCTION" subgroup="" icon="0" child="0" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="">
            <Rules regexbeg="^" regexfunc="[a-zA-Z0-9@?#\[\]_]+" regexend="\([^(]*\)" bodybegin="{" bodyend="}" sep="$" />
        </Group>
        <Group name="SUB" subgroup="" icon="0" child="0" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="">
            <Rules regexbeg="^" regexfunc="[a-zA-Z0-9@?#\[\]_&apos;-]+[:]" regexend="[ \t]*$" bodybegin="" bodyend="^[r]eturn[ \t]*$" sep="$" />
            <Rules regexbeg="^" regexfunc="[a-zA-Z0-9@?#\[\]_&apos;-]+[:]" regexend="[ \t]*[;].*$" bodybegin="" bodyend="^[r]eturn[ \t]*$" sep="" />
        </Group>
        <Group name="OTHER" subgroup="" icon="0" child="0" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="">
            <Rules regexbeg="" regexfunc="[#!^+&amp;*~$ -=\[\]\\;&apos;,./A-Za-z0-9]+[:][:][ \t]*$" regexend="" bodybegin="" bodyend="" sep="" />
        </Group>
    </Language>


(Just taking the regexp posted above - thanks for that!)

Beware - it seems that NPP doesn't like someone to edit this file, it will be overwritten when exiting Notepad++. So just save it with another name and rename it afterwords.


Report this post
Top
  
Reply with quote  
PostPosted: August 12th, 2008, 11:40 pm 
Cool, that worked for me. I just chmod'ed the file to 000 so it can't be overwritten. Thanks!


Report this post
Top
  
Reply with quote  
 Post subject: notepad++ autocomplete
PostPosted: August 14th, 2008, 1:53 am 
Offline

Joined: July 12th, 2008, 1:47 am
Posts: 12
Location: Australia
Have been reading this thread and can't understand whether the method of syntax highlighting being discussed here is different to the one I posted in a new thread so I thought I would post it here.

http://www.autohotkey.net/~ludamo/AHK%20Autohotkey.zip

This is AHK Autohotkey.xml file to put in notepad++/plugins/APIs directory to work with version 5.0+.
Then in notepad++ select AHK Autohotkey from Language menu instead of User Defined.

The method of activating functions or command auto-complete with a "(" is configurable, and in my opinion could be improved, as most AutohotKey code is commands, not functions.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: nimda and 6 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