"notepad++" program rule

Jun 27, 2012 at 3:21 PM

Hello!

I'm trying to create program rule for notepad++, and when I'm setting display/tray/className to "notepad++", windawesome won't run.

From log:

 

------------------------------------
6/27/2012 4:24:23 PM
Assemblies:
Windawesome, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Microsoft.Scripting, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1
System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1
IronRuby, Version=1.1.3.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1
Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CLR: 4.0.30319
64-bit OS: True
64-bit process: True
Elevated: False
System.ArgumentException: parsing "notepad++" - Nested quantifier +.
   at Microsoft.Scripting.Interpreter.NewInstruction.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
   at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
   at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
   at Microsoft.Scripting.Hosting.ScriptEngine.ExecuteFile(String path, ScriptScope scope)
   at Windawesome.Config.PluginLoader.LoadAll(Windawesome windawesome, Config config, IEnumerable`1 files)
   at Windawesome.Windawesome..ctor()
   at Windawesome.Program.Main()
Inner Exception:
none

 

 

Coordinator
Jun 27, 2012 at 4:19 PM

Hello,

Well, all of those things expect a Regular Expression. And "++" is invalid "syntax" for regexes. You could try

"notepad\\+\\+"

As the display name. But it is case sensitive too, so make sure you use the correct casing.

Good luck!

Jun 28, 2012 at 8:14 AM

Hello, thanks for the quick reply.

Like you said, I tried to set it to "notepad\\+\\+" but it doesn't help.

What I've done later - is just simple rename notepad++.exe to notepad+.exe, so the process name changed as well, and when I'm setting processName = "notepad+$"  - everything works fine. Same method I used for "µTorrent" which as I understand, not allows to use "µ" symbol.

Coordinator
Jun 28, 2012 at 9:22 PM

Hello,

Well, it's strange that it didn't work, but what the hell, if you fixed it in the end, it doesn't matter. :) Please write if you have more problems. :) Have fun!