INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Using Notepad++ to Help With Expressions  (Read 4523 times)

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Using Notepad++ to Help With Expressions
« on: November 19, 2016, 05:21:42 pm »

For the nth time, I'm restructuring how I use MC. And as always, I break an expression or 3 or... I don't have any experience in coding so working on expressions is a challenge for me. After looking at a broken expression for 15 minutes, I finally figure out I missed something simple. This happens a lot but using Notepad++ helps a lot. This past week, I decided to try and configure Notepad++ to help me a bit more.

I created a custom language that color codes the expressions (see Language.jpg). I figure I'd share it with everyone. Might help beginners to read expressions easier.

I've attached my custom language file (JRiver Media Center.zip) below. To install, unzip JRiverMediaCenter.zip to get  JRiver Media Center.xml. In Notepad++, click Language >Define your language... Click the Import... button and point to the JRiver Media Center.xml file. Restart Notepad++ (thanks RoderickGI). To run the language for the file you are looking at, click Language > JRiver Media Center.

You can have it ignore casing, i.e. ifelse is same as IfElse, by checking Ignore case next to the Export button.

Functions (blue) = Folder & Default > Folding in code 1 style and Operators & Delimiters > Operators 1
HTML (orange) = Comment & Number > Comment line style
Default Fields (purple) = Keywords Lists > 1st group
Default Fields (Display name) (light purple) = Keywords Lists > 2nd group
Custom Fields (green) = Keywords Lists > 3rd group
Custom Fields (Display name) (light green) = Keywords Lists > 4th group

Custom Fields have been left blank on export.
Logged

Spike1000

  • Citizen of the Universe
  • *****
  • Posts: 641
Re: Using Notepad++ to Help With Expressions
« Reply #1 on: November 20, 2016, 04:18:52 am »

Nice work. Thanks for sharing.

Spike

astromo

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2251
Re: Using Notepad++ to Help With Expressions
« Reply #2 on: November 20, 2016, 04:37:23 am »

Sounds intriguing.

Thanks.
Logged
MC33, Win10 x64, HD-Plex H5 Gen2 Case, HD-Plex 400W Hi-Fi DC-ATX / AC-DC PSU, Gigabyte Z370 ULTRA Gaming 2.0 MoBo, Intel Core i7 8700 CPU, 4x8GB GSkill DDR4 RAM, Schiit Modi Multibit DAC, Freya Pre, Nelson Pass Aleph J DIY Clone, Ascension Timberwolf 8893BSRTL Speakers, BJC 5T00UP cables, DVB-T Tuner HDHR5-4DT

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Using Notepad++ to Help With Expressions
« Reply #3 on: November 20, 2016, 09:43:33 am »

Thanks! I'd been meaning to do this for a long time, but was always too lazy. Downloading now.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Using Notepad++ to Help With Expressions
« Reply #4 on: November 20, 2016, 02:35:23 pm »

Well done, and thanks for sharing. It looks like that was quite a bit of work.

Note that I had to restart Notepad++ after importing the language, before I could select it from the Language menu.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Re: Using Notepad++ to Help With Expressions
« Reply #5 on: November 20, 2016, 02:52:28 pm »

Glad people find it useful. Took me a bit to figure out the best way to do this.  ;D
Logged
Pages: [1]   Go Up