AutoHotkey Community

It is currently May 27th, 2012, 11:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: November 1st, 2008, 6:36 pm 
Offline

Joined: April 25th, 2007, 10:13 pm
Posts: 29
ludamo wrote:
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.


Dear ludamo,

There are two things being discussed here. One is Syntax highlighting, the other is FunctionList Plugin. I have been using your Syntax highlighting file(the xml version), thanks a lot for that. I have also learned to use FunctionList plugin, which requires some addtional tweaking.

Cheers,

Mosaic


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Dirty Hack
PostPosted: November 1st, 2008, 6:47 pm 
Offline

Joined: April 25th, 2007, 10:13 pm
Posts: 29
three.x wrote:
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.


Dear three.x,

I have just updated to FunctionList Plugin 2.0 Alpha today. I was reluctant to upgrade since it is "Alpha", however, seeing that it has been stuck in "Alpha" for ages, and your use of it encouraged me to use it as well.

Now, after the upgrade, I used your Rules, made some slight modifcations to suit my own needs, I changed the group name from OTHER to HOTKEYS, since that's what they are used for. I also added a new group INCLUDE, so the directive will show up on the function list as well. Also, for hotkeys, I included comments as part of the list, so when I look up the functonlist, it will also show the comments, which I personally like, it will tell me what that hotkey is for. I am including the modified rules for those who are interested in:


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="INCLUDE" subgroup="" icon="0" child="0" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="">
            <Rules regexbeg="^" regexfunc="#include[ \t]+[a-zA-Z0-9_.\\]+" regexend="" bodybegin="" bodyend="$" sep="" />
        </Group>
        <Group name="HOTKEYS" 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="" />
            <Rules regexbeg="^" regexfunc="[^;][#!^+&amp;*~$ -=\[\]\\;&apos;,./A-Za-z0-9]+[:][:][ \t]*[;].*$" regexend="" bodybegin="" bodyend="^[r]eturn[ \t]*$" sep="$" />
        </Group>
    </Language>


The above works very well for me. I do like the new "Alpha 2.0" version better than the old one.

Cheers,

Mosaic


Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 17th, 2008, 10:01 pm 
Offline

Joined: December 17th, 2008, 8:31 pm
Posts: 2
Location: Brooklyn, NY
I had a lot more written out, and my browser jacked up on me.

Anyways, a Notepad++ v5.1.1 Unicode compatible Function List/Completion .xm file that I heavily modified from the original.

http://www.autohotkey.net/~calyx/NPPv5.1.1Unicode_Files/AHK%20Autohotkey.xml

Code:
<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
   <AutoComplete>
      <KeyWord name="#AllowSameLineComments"/>
      <KeyWord name="#ClipboardTimeout"/>
      <KeyWord name="#CommentFlag"/>
      <KeyWord name="#ErrorStdOut"/>
      <KeyWord name="#EscapeChar"/>
      <KeyWord name="#HotkeyInterval"/>
      <KeyWord name="#HotkeyModifierTimeout"/>
      <KeyWord name="#Hotstring"/>
      <KeyWord name="#IfWinActive"/>
      <KeyWord name="#IfWinExist"/>
      <KeyWord name="#IfWinNotActive"/>
      <KeyWord name="#IfWinNotExist"/>
      <KeyWord name="#Include"/>
      <KeyWord name="#IncludeAgain"/>
      <KeyWord name="#InstallKeybdHook"/>
      <KeyWord name="#InstallMouseHook"/>
      <KeyWord name="#KeyHistory"/>
      <KeyWord name="#LTrim"/>
      <KeyWord name="#MaxHotkeysPerInterval"/>
      <KeyWord name="#MaxMem"/>
      <KeyWord name="#MaxThreads"/>
      <KeyWord name="#MaxThreadsBuffer"/>
      <KeyWord name="#MaxThreadsPerHotkey"/>
      <KeyWord name="#NoEnv"/>
      <KeyWord name="#NoTrayIcon"/>
      <KeyWord name="#Persistent"/>
      <KeyWord name="#SingleInstance"/>
      <KeyWord name="#UseHook"/>
      <KeyWord name="#WinActivateForce"/>
      <KeyWord name="A_AhkPath"/>
      <KeyWord name="A_AhkVersion"/>
      <KeyWord name="A_AppData"/>
      <KeyWord name="A_AppDataCommon"/>
      <KeyWord name="A_AutoTrim"/>
      <KeyWord name="A_BatchLines"/>
      <KeyWord name="A_CaretX"/>
      <KeyWord name="A_CaretY"/>
      <KeyWord name="A_ComputerName"/>
      <KeyWord name="A_ControlDelay"/>
      <KeyWord name="A_Cursor"/>
      <KeyWord name="A_DD"/>
      <KeyWord name="A_DDD"/>
      <KeyWord name="A_DDDD"/>
      <KeyWord name="A_DefaultMouseSpeed"/>
      <KeyWord name="A_Desktop"/>
      <KeyWord name="A_DesktopCommon"/>
      <KeyWord name="A_DetectHiddenText"/>
      <KeyWord name="A_DetectHiddenWindows"/>
      <KeyWord name="A_EndChar"/>
      <KeyWord name="A_EventInfo"/>
      <KeyWord name="A_ExitReason"/>
      <KeyWord name="A_FormatFloat"/>
      <KeyWord name="A_FormatInteger"/>
      <KeyWord name="A_Gui"/>
      <KeyWord name="A_GuiEvent"/>
      <KeyWord name="A_GuiControl"/>
      <KeyWord name="A_GuiControlEvent"/>
      <KeyWord name="A_GuiHeight"/>
      <KeyWord name="A_GuiWidth"/>
      <KeyWord name="A_GuiX"/>
      <KeyWord name="A_GuiY"/>
      <KeyWord name="A_Hour"/>
      <KeyWord name="A_IconFile"/>
      <KeyWord name="A_IconHidden"/>
      <KeyWord name="A_IconNumber"/>
      <KeyWord name="A_IconTip"/>
      <KeyWord name="A_Index"/>
      <KeyWord name="A_IPAddress1"/>
      <KeyWord name="A_IPAddress2"/>
      <KeyWord name="A_IPAddress3"/>
      <KeyWord name="A_IPAddress4"/>
      <KeyWord name="A_ISAdmin"/>
      <KeyWord name="A_IsCompiled"/>
      <KeyWord name="A_IsSuspended"/>
      <KeyWord name="A_KeyDelay"/>
      <KeyWord name="A_Language"/>
      <KeyWord name="A_LastError"/>
      <KeyWord name="A_LineFile"/>
      <KeyWord name="A_LineNumber"/>
      <KeyWord name="A_LoopField"/>
      <KeyWord name="A_LoopFileAttrib"/>
      <KeyWord name="A_LoopFileDir"/>
      <KeyWord name="A_LoopFileExt"/>
      <KeyWord name="A_LoopFileFullPath"/>
      <KeyWord name="A_LoopFileLongPath"/>
      <KeyWord name="A_LoopFileName"/>
      <KeyWord name="A_LoopFileShortName"/>
      <KeyWord name="A_LoopFileShortPath"/>
      <KeyWord name="A_LoopFileSize"/>
      <KeyWord name="A_LoopFileSizeKB"/>
      <KeyWord name="A_LoopFileSizeMB"/>
      <KeyWord name="A_LoopFileTimeAccessed"/>
      <KeyWord name="A_LoopFileTimeCreated"/>
      <KeyWord name="A_LoopFileTimeModified"/>
      <KeyWord name="A_LoopReadLine"/>
      <KeyWord name="A_LoopRegKey"/>
      <KeyWord name="A_LoopRegName"/>
      <KeyWord name="A_LoopRegSubkey"/>
      <KeyWord name="A_LoopRegTimeModified"/>
      <KeyWord name="A_LoopRegType"/>
      <KeyWord name="A_MDAY"/>
      <KeyWord name="A_Min"/>
      <KeyWord name="A_MM"/>
      <KeyWord name="A_MMM"/>
      <KeyWord name="A_MMMM"/>
      <KeyWord name="A_MON"/>
      <KeyWord name="A_MouseDelay"/>
      <KeyWord name="A_MSec"/>
      <KeyWord name="A_MyDocuments"/>
      <KeyWord name="A_Now"/>
      <KeyWord name="A_NowUTC"/>
      <KeyWord name="A_NumBatchLines"/>
      <KeyWord name="A_OSType"/>
      <KeyWord name="A_OSVersion"/>
      <KeyWord name="A_PriorHotkey"/>
      <KeyWord name="A_ProgramFiles"/>
      <KeyWord name="A_Programs"/>
      <KeyWord name="A_ProgramsCommon"/>
      <KeyWord name="A_ScreenHeight"/>
      <KeyWord name="A_ScreenWidth"/>
      <KeyWord name="A_ScriptDir"/>
      <KeyWord name="A_ScriptFullPath"/>
      <KeyWord name="A_ScriptName"/>
      <KeyWord name="A_Sec"/>
      <KeyWord name="A_Space"/>
      <KeyWord name="A_StartMenu"/>
      <KeyWord name="A_StartMenuCommon"/>
      <KeyWord name="A_Startup"/>
      <KeyWord name="A_StartupCommon"/>
      <KeyWord name="A_StringCaseSense"/>
      <KeyWord name="A_Tab"/>
      <KeyWord name="A_Temp"/>
      <KeyWord name="A_ThisFunc"/>
      <KeyWord name="A_ThisHotkey"/>
      <KeyWord name="A_ThisLabel"/>
      <KeyWord name="A_ThisMenu"/>
      <KeyWord name="A_ThisMenuItem"/>
      <KeyWord name="A_ThisMenuItemPos"/>
      <KeyWord name="A_TickCount"/>
      <KeyWord name="A_TimeIdle"/>
      <KeyWord name="A_TimeIdlePhysical"/>
      <KeyWord name="A_TimeSincePriorHotkey"/>
      <KeyWord name="A_TimeSinceThisHotkey"/>
      <KeyWord name="A_TitleMatchMode"/>
      <KeyWord name="A_TitleMatchModeSpeed"/>
      <KeyWord name="A_UserName"/>
      <KeyWord name="A_WDay"/>
      <KeyWord name="A_WinDelay"/>
      <KeyWord name="A_WinDir"/>
      <KeyWord name="A_WorkingDir"/>
      <KeyWord name="A_YDay"/>
      <KeyWord name="A_YEAR"/>
      <KeyWord name="A_YWeek"/>
      <KeyWord name="A_YYYY"/>
      <KeyWord name="AutoTrim"/>
      <KeyWord name="BlockInput"/>
      <KeyWord name="Break"/>
      <KeyWord name="Click"/>
      <KeyWord name="Clipboard"/>
      <KeyWord name="ClipWait"/>
      <KeyWord name="ComSpec"/>
      <KeyWord name="Continue"/>
      <KeyWord name="Control"/>
      <KeyWord name="ControlClick"/>
      <KeyWord name="ControlFocus"/>
      <KeyWord name="ControlGet"/>
      <KeyWord name="ControlGetFocus"/>
      <KeyWord name="ControlGetPos"/>
      <KeyWord name="ControlGetText"/>
      <KeyWord name="ControlMove"/>
      <KeyWord name="ControlSend"/>
      <KeyWord name="ControlSendRaw"/>
      <KeyWord name="ControlSetText"/>
      <KeyWord name="CoordMode"/>
      <KeyWord name="Critical"/>
      <KeyWord name="DetectHiddenText"/>
      <KeyWord name="DetectHiddenWindows"/>
      <KeyWord name="DllCall"/>
      <KeyWord name="GetKeyState"/>
      <KeyWord name="IsLabel"/>
      <KeyWord name="NumGet"/>
      <KeyWord name="NumPut"/>
      <KeyWord name="OnMessage"/>
      <KeyWord name="RegExMatch"/>
      <KeyWord name="RegExReplace"/>
      <KeyWord name="RegisterCallback"/>
      <KeyWord name="Drive"/>
      <KeyWord name="DriveGet"/>
      <KeyWord name="DriveSpaceFree"/>
      <KeyWord name="Edit"/>
      <KeyWord name="Else"/>
      <KeyWord name="EndRepeat"/>
      <KeyWord name="EnvAdd"/>
      <KeyWord name="EnvDiv"/>
      <KeyWord name="EnvGet"/>
      <KeyWord name="EnvMult"/>
      <KeyWord name="EnvSet"/>
      <KeyWord name="EnvSub"/>
      <KeyWord name="EnvUpdate"/>
      <KeyWord name="ErrorLevel"/>
      <KeyWord name="Exit"/>
      <KeyWord name="ExitApp"/>
      <KeyWord name="False"/>
      <KeyWord name="FileAppend"/>
      <KeyWord name="FileCopy"/>
      <KeyWord name="FileCopyDir"/>
      <KeyWord name="FileCreateDir"/>
      <KeyWord name="FileCreateShortcut"/>
      <KeyWord name="FileDelete"/>
      <KeyWord name="FileGetAttrib"/>
      <KeyWord name="FileGetShortcut"/>
      <KeyWord name="FileGetSize"/>
      <KeyWord name="FileGetTime"/>
      <KeyWord name="FileGetVersion"/>
      <KeyWord name="FileInstall"/>
      <KeyWord name="FileMove"/>
      <KeyWord name="FileMoveDir"/>
      <KeyWord name="FileRead"/>
      <KeyWord name="FileReadLine"/>
      <KeyWord name="FileRecycle"/>
      <KeyWord name="FileRecycleEmpty"/>
      <KeyWord name="FileRemoveDir"/>
      <KeyWord name="FileSelectFile"/>
      <KeyWord name="FileSelectFolder"/>
      <KeyWord name="FileSetAttrib"/>
      <KeyWord name="FileSetTime"/>
      <KeyWord name="FormatTime"/>
      <KeyWord name="GetKeyState"/>
      <KeyWord name="Gosub"/>
      <KeyWord name="Goto"/>
      <KeyWord name="GroupActivate"/>
      <KeyWord name="GroupAdd"/>
      <KeyWord name="GroupClose"/>
      <KeyWord name="GroupDeactivate"/>
      <KeyWord name="Gui"/>
      <KeyWord name="GuiControl"/>
      <KeyWord name="GuiControlGet"/>
      <KeyWord name="Hotkey"/>
      <KeyWord name="If Else"/>
      <KeyWord name="IfEqual"/>
      <KeyWord name="IfExist"/>
      <KeyWord name="IfGreater"/>
      <KeyWord name="IfGreaterOrEqual"/>
      <KeyWord name="IfInString"/>
      <KeyWord name="IfLess"/>
      <KeyWord name="IfLessOrEqual"/>
      <KeyWord name="IfMsgBox"/>
      <KeyWord name="IfNotEqual"/>
      <KeyWord name="IfNotExist"/>
      <KeyWord name="IfNotInString"/>
      <KeyWord name="IfWinActive"/>
      <KeyWord name="IfWinExist"/>
      <KeyWord name="IfWinNotActive"/>
      <KeyWord name="IfWinNotExist"/>
      <KeyWord name="ImageSearch"/>
      <KeyWord name="IniDelete"/>
      <KeyWord name="IniRead"/>
      <KeyWord name="IniWrite"/>
      <KeyWord name="Input"/>
      <KeyWord name="InputBox"/>
      <KeyWord name="KeyHistory"/>
      <KeyWord name="KeyWait"/>
      <KeyWord name="ListHotkeys"/>
      <KeyWord name="ListLines"/>
      <KeyWord name="ListVars"/>
      <KeyWord name="Loop"/>
      <KeyWord name="Menu"/>
      <KeyWord name="MouseClick"/>
      <KeyWord name="MouseClickDrag"/>
      <KeyWord name="MouseGetPos"/>
      <KeyWord name="MouseMove"/>
      <KeyWord name="MsgBox"/>
      <KeyWord name="OnExit"/>
      <KeyWord name="OutputDebug"/>
      <KeyWord name="Pause"/>
      <KeyWord name="PixelGetColor"/>
      <KeyWord name="PixelSearch"/>
      <KeyWord name="PostMessage"/>
      <KeyWord name="Process"/>
      <KeyWord name="ProgramFiles"/>
      <KeyWord name="Progress"/>
      <KeyWord name="Random"/>
      <KeyWord name="RegDelete"/>
      <KeyWord name="RegRead"/>
      <KeyWord name="RegWrite"/>
      <KeyWord name="Reload"/>
      <KeyWord name="Repeat"/>
      <KeyWord name="Return"/>
      <KeyWord name="Run"/>
      <KeyWord name="RunAs"/>
      <KeyWord name="RunWait"/>
      <KeyWord name="Send"/>
      <KeyWord name="SendEvent"/>
      <KeyWord name="SendInput"/>
      <KeyWord name="SendMessage"/>
      <KeyWord name="SendMode"/>
      <KeyWord name="SendPlay"/>
      <KeyWord name="SendRaw"/>
      <KeyWord name="SetBatchLines"/>
      <KeyWord name="SetCapslockState"/>
      <KeyWord name="SetControlDelay"/>
      <KeyWord name="SetDefaultMouseSpeed"/>
      <KeyWord name="SetEnv"/>
      <KeyWord name="SetFormat"/>
      <KeyWord name="SetKeyDelay"/>
      <KeyWord name="SetMouseDelay"/>
      <KeyWord name="SetNumlockState"/>
      <KeyWord name="SetScrollLockState"/>
      <KeyWord name="SetStoreCapslockMode"/>
      <KeyWord name="SetTimer"/>
      <KeyWord name="SetTitleMatchMode"/>
      <KeyWord name="SetWinDelay"/>
      <KeyWord name="SetWorkingDir"/>
      <KeyWord name="Shutdown"/>
      <KeyWord name="Sleep"/>
      <KeyWord name="Sort"/>
      <KeyWord name="SoundBeep"/>
      <KeyWord name="SoundGet"/>
      <KeyWord name="SoundGetWaveVolume"/>
      <KeyWord name="SoundPlay"/>
      <KeyWord name="SoundSet"/>
      <KeyWord name="SoundSetWaveVolume"/>
      <KeyWord name="SplashImage"/>
      <KeyWord name="SplashTextOff"/>
      <KeyWord name="SplashTextOn"/>
      <KeyWord name="SplitPath"/>
      <KeyWord name="StatusBarGetText"/>
      <KeyWord name="StatusBarWait"/>
      <KeyWord name="StringCaseSense"/>
      <KeyWord name="StringGetPos"/>
      <KeyWord name="StringLeft"/>
      <KeyWord name="StringLen"/>
      <KeyWord name="StringLower"/>
      <KeyWord name="StringMid"/>
      <KeyWord name="StringReplace"/>
      <KeyWord name="StringRight"/>
      <KeyWord name="StringSplit"/>
      <KeyWord name="StringTrimLeft"/>
      <KeyWord name="StringTrimRight"/>
      <KeyWord name="StringUpper"/>
      <KeyWord name="Suspend"/>
      <KeyWord name="SysGet"/>
      <KeyWord name="Thread"/>
      <KeyWord name="ToolTip"/>
      <KeyWord name="Transform"/>
      <KeyWord name="TrayTip"/>
      <KeyWord name="True"/>
      <KeyWord name="URLDownloadToFile"/>
      <KeyWord name="WinActivate"/>
      <KeyWord name="WinActivateBottom"/>
      <KeyWord name="WinClose"/>
      <KeyWord name="WinGet"/>
      <KeyWord name="WinGetActiveStats"/>
      <KeyWord name="WinGetActiveTitle"/>
      <KeyWord name="WinGetClass"/>
      <KeyWord name="WinGetPos"/>
      <KeyWord name="WinGetText"/>
      <KeyWord name="WinGetTitle"/>
      <KeyWord name="WinHide"/>
      <KeyWord name="WinKill"/>
      <KeyWord name="WinMaximize"/>
      <KeyWord name="WinMenuSelectItem"/>
      <KeyWord name="WinMinimize"/>
      <KeyWord name="WinMinimizeAll"/>
      <KeyWord name="WinMinimizeAllUndo"/>
      <KeyWord name="WinMove"/>
      <KeyWord name="WinRestore"/>
      <KeyWord name="WinSet"/>
      <KeyWord name="WinSetTitle"/>
      <KeyWord name="WinShow"/>
      <KeyWord name="WinWait"/>
      <KeyWord name="WinWaitActive"/>
      <KeyWord name="WinWaitClose"/>
      <KeyWord name="WinWaitNotActive"/>
   </AutoComplete>
</NotepadPlus>


Just dropped it in the folder C:\Program Files\Notepad++\plugins\APIs


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Dirty Hack
PostPosted: May 28th, 2009, 9:32 am 
Offline

Joined: February 21st, 2005, 9:07 am
Posts: 11
mosaic wrote:
Now, after the upgrade, I used your Rules, made some slight modifcations to suit my own needs, I changed the group name from OTHER to HOTKEYS, since that's what they are used for. I also added a new group INCLUDE, so the directive will show up on the function list as well. Also, for hotkeys, I included comments as part of the list, so when I look up the functonlist, it will also show the comments, which I personally like, it will tell me what that hotkey is for. I am including the modified rules for those who are interested in:


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="INCLUDE" subgroup="" icon="0" child="0" autoexp="0" matchcase="0" fendtobbeg="" bbegtobend="">
            <Rules regexbeg="^" regexfunc="#include[ \t]+[a-zA-Z0-9_.\\]+" regexend="" bodybegin="" bodyend="$" sep="" />
        </Group>
        <Group name="HOTKEYS" 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="" />
            <Rules regexbeg="^" regexfunc="[^;][#!^+&amp;*~$ -=\[\]\\;&apos;,./A-Za-z0-9]+[:][:][ \t]*[;].*$" regexend="" bodybegin="" bodyend="^[r]eturn[ \t]*$" sep="$" />
        </Group>
    </Language>


It works nicely. Thanks a lot!
But it can not recognize a hotkey end with ::, for example, the following hotkey can not be detected:
Code:
#n::
Run Notepad
return

But when you add a space or some comments after ::, then the hotkey can be detected:
Code:
#n:: ;blabla...
Run Notepad
return


Just a minor thing.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 28th, 2009, 1:40 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
Just to put it out there - those interested in seeing a list of functions when using NPP might want to check out TillaGoto, a script I made which does just that (and much more). [/shameless promotion]
:D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2009, 4:40 am 
Offline

Joined: November 20th, 2008, 6:00 pm
Posts: 72
Location: Thionville, France
I can't get the plugin to work with autohotkey language... I am using Notepad++ unicode 5.5.1 and Function List plugin "Patched Unicode version", i have defined AHK Autohotkey as a user defined language and syntax highlighting works. I have defined rules for AHK Autohotkey by editing 'FunctionListRules.xml' and they are correctly shown when I look into 'Language Parsing Rules...', but the function box says 'No rule defined', as if the language were not recognized to be AHK Autohotkey... Any idea?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2009, 6:33 pm 
Offline

Joined: June 17th, 2008, 7:51 am
Posts: 243
Make sure, that in Settings - Language Menu the checkbox "Make language Menu compact" isn't checked...

_________________
Greetings
Rog


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2009, 3:58 am 
Offline

Joined: November 20th, 2008, 6:00 pm
Posts: 72
Location: Thionville, France
It worked, thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 4th, 2009, 11:23 am 
Offline

Joined: April 5th, 2009, 10:56 am
Posts: 4
Location: Manchester, UK
@ruespe:

Thanks, that worked for me too - I thought I'd just messed up my Notepad++ settings but that checkbox fixed it.

This is quite useful...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2011, 6:05 pm 
Offline

Joined: August 30th, 2010, 9:05 pm
Posts: 21
For those looking for current Syntax highlighting definitions, look:


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: iDrug and 58 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