Jump to content

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

Lexer and Folding For N++ (Finally!) - [Deprecated]


  • Please log in to reply
133 replies to this topic
Owyn
  • Members
  • 21 posts
  • Last active: Dec 24 2016 12:22 AM
  • Joined: 14 May 2011
Hi, replacing the .dll in NP++ folder totally disables any highlighting in search results, i see there is an old userDefineLang.xml , but there's not much anything in it, just some very very basic highlighting, isn't there a more finished userDefineLang.xml for NP++ ?

CodeKiller
  • Members
  • 2067 posts
  • Last active: Feb 26 2016 09:30 AM
  • Joined: 10 Jul 2008
Hi all,

Will it be a "ready to use" version for Np++ 5.9.2 Unicode ?
Replacing a DLL is quite awkward.

Thanks anyway. ;-)

trismarck
  • Members
  • 390 posts
  • Last active: Nov 25 2015 12:35 PM
  • Joined: 02 Dec 2010
NumPut is colored differently than NumGet
Posted Image

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
That means that is not in the list of keywords... fortunately you can solve it pretty easy.

Go to Styler Configurator and select the Autohotkey language. click on functions and add the word Numput to the list.

I will add it to the default list soon. btw I will re-take the project soon, it was on hold but now i will have little bit more spare time.
AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
Just to report:
Posted Image

It seems NumGet is in the COMMANDS list, not in the FUNCTIONS list.
In the commands list there's also NumSet() :?::!:

Regards
maul.esel
Join the discussion on The future of AutoHotkey
Posted Image Visit me on github Posted Image
Win7 HP SP1 64bit | AHK_L U 64bit

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
Copy this quote and paste it in notepad. Click save as c:\Program Files\Notepad++\plugins\config\AHKExternalLexer.xml (depends on how you installed N++) and when it asks you if you want to replace the file click on yes.

<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
<Languages>
<!-- name must be the same as the one in the language menu. -->
<!-- ext here is the default one. -->
<!-- Comments are the comment that is used from the context menu when you tell np++ to comment a line. -->
<Language name="AutoHotkey" ext="ahk" commentLine=";" commentStart="/*\n" commentEnd="\n*/">
<!--<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>-->
<Keywords name="0">break continue else exit exitapp gosub goto if ifequal ifexist ifgreater ifgreaterorequal ifinstring ifless iflessorequal ifmsgbox ifnotequal ifnotexist ifnotinstring ifwinactive ifwinexist ifwinnotactive ifwinnotexist loop onexit pause repeat return setbatchlines settimer sleep suspend static global local byref</Keywords>
<Keywords name="1">autotrim blockinput clipwait control controlclick controlfocus controlget controlgetfocus controlgetpos controlgettext controlmove controlsend controlsendraw controlsettext coordmode critical detecthiddentext detecthiddenwindows drive driveget drivespacefree edit endrepeat envadd envdiv envget envmult envset envsub envupdate fileappend filecopy filecopydir filecreatedir filecreateshortcut filedelete filegetattrib filegetshortcut filegetsize filegettime filegetversion fileinstall filemove filemovedir fileread filereadline filerecycle filerecycleempty fileremovedir fileselectfile fileselectfolder filesetattrib filesettime formattime getkeystate groupactivate groupadd groupclose groupdeactivate gui guicontrol guicontrolget hideautoitwin hotkey imagesearch inidelete iniread iniwrite input inputbox keyhistory keywait listhotkeys listlines listvars menu mouseclick mouseclickdrag mousegetpos mousemove msgbox outputdebug pixelgetcolor pixelsearch postmessage process progress random regdelete registercallback regread regwrite reload run runas runwait send sendevent sendinput sendmessage sendmode sendplay sendraw setcapslockstate setcontroldelay setdefaultmousespeed setenv setformat setkeydelay setmousedelay setnumlockstate setscrolllockstate setstorecapslockmode settitlematchmode setwindelay setworkingdir shutdown sort soundbeep soundget soundgetwavevolume soundplay soundset soundsetwavevolume splashimage splashtextoff splashtexton splitpath statusbargettext statusbarwait stringcasesense stringgetpos stringleft stringlen stringlower stringmid stringreplace stringright stringsplit stringtrimleft stringtrimright stringupper sysget thread tooltip transform traytip urldownloadtofile winactivate winactivatebottom winclose winget wingetactivestats wingetactivetitle wingetclass wingetpos wingettext wingettitle winhide winkill winmaximize winmenuselectitem winminimize winminimizeall winminimizeallundo winmove winrestore winset winsettitle winshow winwait winwaitactive winwaitclose winwaitnotactive</Keywords>
<Keywords name="2">abs acos asc asin atan ceil chr cos dllcall exp fileexist floor getkeystate il_add il_create il_destroy instr islabel ln log lv_add lv_delete lv_deletecol lv_getcount lv_getnext lv_gettext lv_insert lv_insertcol lv_modify lv_modifycol lv_setimagelist mod onmessage round regexmatch regexreplace sb_seticon sb_setparts sb_settext sin sqrt strlen substr tan tv_add tv_delete tv_getchild tv_getcount tv_getnext tv_get tv_getparent tv_getprev tv_getselection tv_gettext tv_modify varsetcapacity winactive winexist numget numput</Keywords>
<Keywords name="3">allowsamelinecomments clipboardtimeout commentflag errorstdout escapechar hotkeyinterval hotkeymodifiertimeout hotstring ifwinactive ifwinexist include includeagain installkeybdhook installmousehook keyhistory ltrim maxhotkeysperinterval maxmem maxthreads maxthreadsbuffer maxthreadsperhotkey noenv notrayicon persistent singleinstance usehook winactivateforce</Keywords>
<Keywords name="4">shift lshift rshift alt lalt ralt control lcontrol rcontrol ctrl lctrl rctrl lwin rwin appskey altdown altup shiftdown shiftup ctrldown ctrlup lwindown lwinup rwindown rwinup lbutton rbutton mbutton wheelup wheeldown xbutton1 xbutton2 joy1 joy2 joy3 joy4 joy5 joy6 joy7 joy8 joy9 joy10 joy11 joy12 joy13 joy14 joy15 joy16 joy17 joy18 joy19 joy20 joy21 joy22 joy23 joy24 joy25 joy26 joy27 joy28 joy29 joy30 joy31 joy32 joyx joyy joyz joyr joyu joyv joypov joyname joybuttons joyaxes joyinfo space tab enter escape esc backspace bs delete del insert ins pgup pgdn home end up down left right printscreen ctrlbreak pause scrolllock capslock numlock numpad0 numpad1 numpad2 numpad3 numpad4 numpad5 numpad6 numpad7 numpad8 numpad9 numpadmult numpadadd numpadsub numpaddiv numpaddot numpaddel numpadins numpadclear numpadup numpaddown numpadleft numpadright numpadhome numpadend numpadpgup numpadpgdn numpadenter f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 f19 f20 f21 f22 f23 f24 browser_back browser_forward browser_refresh browser_stop browser_search browser_favorites browser_home volume_mute volume_down volume_up media_next media_prev media_stop media_play_pause launch_mail launch_media launch_app1 launch_app2 blind click raw</Keywords>
<Keywords name="5">a_ahkpath a_ahkversion a_appdata a_appdatacommon a_autotrim a_batchlines a_caretx a_carety a_computername a_controldelay a_cursor a_dd a_ddd a_dddd a_defaultmousespeed a_desktop a_desktopcommon a_detecthiddentext a_detecthiddenwindows a_endchar a_eventinfo a_exitreason a_formatfloat a_formatinteger a_gui a_guievent a_guicontrol a_guicontrolevent a_guiheight a_guiwidth a_guix a_guiy a_hour a_iconfile a_iconhidden a_iconnumber a_icontip a_index a_ipaddress1 a_ipaddress2 a_ipaddress3 a_ipaddress4 a_isadmin a_iscompiled a_issuspended a_keydelay a_language a_lasterror a_linefile a_linenumber a_loopfield a_loopfileattrib a_loopfiledir a_loopfileext a_loopfilefullpath a_loopfilelongpath a_loopfilename a_loopfileshortname a_loopfileshortpath a_loopfilesize a_loopfilesizekb a_loopfilesizemb a_loopfiletimeaccessed a_loopfiletimecreated a_loopfiletimemodified a_loopreadline a_loopregkey a_loopregname a_loopregsubkey a_loopregtimemodified a_loopregtype a_mday a_min a_mm a_mmm a_mmmm a_mon a_mousedelay a_msec a_mydocuments a_now a_nowutc a_numbatchlines a_ostype a_osversion a_priorhotkey a_programfiles a_programs a_programscommon a_screenheight a_screenwidth a_scriptdir a_scriptfullpath a_scriptname a_sec a_space a_startmenu a_startmenucommon a_startup a_startupcommon a_stringcasesense a_tab a_temp a_thisfunc a_thishotkey a_thislabel a_thismenu a_thismenuitem a_thismenuitempos a_tickcount a_timeidle a_timeidlephysical a_timesincepriorhotkey a_timesincethishotkey a_titlematchmode a_titlematchmodespeed a_username a_wday a_windelay a_windir a_workingdir a_yday a_year a_yweek a_yyyy clipboard clipboardall comspec errorlevel programfiles true false</Keywords>
<Keywords name="6">ltrim rtrim join ahk_id ahk_pid ahk_class ahk_group processname minmax controllist statuscd filesystem setlabel alwaysontop mainwindow nomainwindow useerrorlevel altsubmit hscroll vscroll imagelist wantctrla wantf2 vis visfirst wantreturn backgroundtrans minimizebox maximizebox sysmenu toolwindow exstyle check3 checkedgray readonly notab lastfound lastfoundexist alttab shiftalttab alttabmenu alttabandmenu alttabmenudismiss controllisthwnd hwnd deref pow bitnot bitand bitor bitxor bitshiftleft bitshiftright sendandmouse mousemove mousemouveoff hkey_local_machine hkey_users hkey_current_user hkey_classes_root hkey_current_config hklm hku hkcu hkcr hkcc reg_sz reg_expand_sz reg_multi_sz reg_dword reg_qword reg_binary reg_link reg_resource_list reg_full_resource_descriptor reg_resource_requirements_list reg_dword_big_endian regex pixel mouse screen relative rgb low belownormal normal abovenormal high realtime between contains in is integer float number digit xdigit alpha upper lower alnum time date not or and topmost top bottom transparent transcolor redraw region id idlast count list capacity eject lock unlock label serial type status seconds minutes hours days read parse logoff close error single tray add rename check uncheck togglecheck enable disable toggleenable default nodefault standard nostandard color deleteall icon noicon tip show text picture pic groupbox button checkbox radio dropdownlist ddl combobox statusbar treeview listbox listview datetime monthcal updown slider iconsmall tile report sortdesc nosort nosorthdr grid hdr autosize range xm ym ys xs xp yp font resize owner submit nohide minimize maximize restore noactivate na cancel destroy center margin owndialogs guiescape guiclose guisize guicontextmenu guidropfiles tabstop section wrap border top bottom buttons expand first lines number uppercase lowercase limit password multi group background bold italic strike underline norm theme caption delimiter flash style checked password hidden center section move focus hide choose choosestring text pos enabled disabled visible notimers interrupt priority waitclose unicode yes no ok cancel abort retry ignore on off all</Keywords>
<Keywords name="7" />
</Language>
</Languages>
<LexerStyles>
<!-- name must be the same as the Language name above. -->
<!-- desc is what shows up in the styler configuator. -->
<!-- ext is the "user defined" one. -->
<!-- excluded is whether is shows up in the language menu. (Can be changed in the settings by the user the normal way.) -->
<LexerType name="AutoHotkey" desc="AutoHotkey" ext="" excluded="no">
<WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENTLINE" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENTBLOCK" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="ESCAPE SECUENCE" styleID="3" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="SYNOPERATOR" styleID="4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="EXPOPERATOR" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="STRING" styleID="6" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" />
<WordsStyle name="NUMBER" styleID="7" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="IDENTIFIER" styleID="8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="LABEL" styleID="10" fgColor="0080FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="VARIABLES" styleID="9" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="VARREF-KW" styleID="19" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="ERROR" styleID="20" fgColor="EE0000" bgColor="FF8080" fontName="" fontStyle="1" />
<!--Keywords -->
<WordsStyle name="FLOWCONTROL" styleID="11" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" keywordClass="0" />
<WordsStyle name="COMMANDS" styleID="12" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" keywordClass="1" />
<WordsStyle name="FUNCTIONS" styleID="13" fgColor="FF80FF" bgColor="FFFFFF" fontName="" fontStyle="0" keywordClass="2" />
<WordsStyle name="DIRECTIVES" styleID="14" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" keywordClass="3" />
<WordsStyle name="BUTTONS/KEYS" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="3" keywordClass="4" />
<WordsStyle name="BUILT-IN VARIABLES" styleID="16" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="2" keywordClass="5" />
<WordsStyle name="SPECIAL PARAMETERS" styleID="17" fgColor="408080" bgColor="FFFFFF" fontName="" fontStyle="0" keywordClass="6"></WordsStyle>
<WordsStyle name="USER DEFINED" styleID="18" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" keywordClass="7" />
</LexerType>
</LexerStyles>
</NotepadPlus>


AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

OpalMonkey
  • Members
  • 29 posts
  • Last active: Aug 07 2015 08:21 AM
  • Joined: 26 Sep 2009

btw I will re-take the project soon, it was on hold but now i will have little bit more spare time.


Woohoo! You just made my day!

Great to hear this project isn't dead :D

guest3456
  • Members
  • 1704 posts
  • Last active: Nov 19 2015 11:58 AM
  • Joined: 10 Mar 2011
same here thumbsup

maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011

Great to hear this project isn't dead

I agree :D
And thanks for the "hotfix"!
Join the discussion on The future of AutoHotkey
Posted Image Visit me on github Posted Image
Win7 HP SP1 64bit | AHK_L U 64bit

guest3456
  • Members
  • 1704 posts
  • Last active: Nov 19 2015 11:58 AM
  • Joined: 10 Mar 2011
bug report

something strange is happening with this script:
<!-- m -->http://www.autohotke...topic16954.html<!-- m -->

for example, the top comments look like this:
(its partially colored green for comments)
[color=green];************************[/color]
[color=green];*[/color][color=black]                      *[/color]
[color=black];*    HotkeyGUI v0.2    *[/color]
[color=black];*                      *[/color]
[color=green];************************[/color]

and then the rest of the script is commented out

something is strange, maybe ;* acts the same as if it were /* and the script reads it as an open comment thats never closed? i can't tell

i couldnt find anything in the style configurator to change the comment identifiers

sumdude
  • Guests
  • Last active:
  • Joined: --
RaptorX explained just one page before this one:
http://www.autohotke...274.html#427274

guest3456
  • Members
  • 1704 posts
  • Last active: Nov 19 2015 11:58 AM
  • Joined: 10 Mar 2011
ahhh, i see, thanks

LocalMan
  • Members
  • 6 posts
  • Last active: Jun 08 2011 09:23 AM
  • Joined: 02 Aug 2010
RaptorX:

So quit your job and rewrite the lexer already — we've come to depend on it.

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
my "job" is actually my 3yr old that is 24/7 on me cause mother is not there. :lol:

one day you will get it.

on the other hand I just made a quick update. I used a portable version of Notepad++ and fixed it so that it works with my lexer. So now, you guys have a portable working solution for it that will be working perfectly until i finish the rewrite process.

I already started btw. :)


--Edit
download link on the OP below the NEW label.
N++ version is 5.9.2
AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

Grendahl
  • Members
  • 416 posts
  • Last active: Jul 07 2014 08:01 PM
  • Joined: 10 Aug 2009
So, I figured that I'd update my favorite text editor today, only to find out that this breaks the lexer posted in this thread.

Too bad, too... because it's something I've really come to depend on.

Any word on an update? :?:
Always have your scripts when you need them with Dropbox.
Sign up for free! http://db.tt/9Hrieqj