Topic: Notepad++ universal Plugin  (Read 9999 times)

0 Members and 1 Guest are viewing this topic.

Notepad++ universal Plugin
« on: April 21, 2013, 05:52:40 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
This is the thread for the officially Notepad++ universal script of mine.

It has been primarily written and tested for Win8.1SE. Kudos to everybody who contributed to the script, especially to Lancelot and ChrisR!

Why Notepad++ universal? First off, I didn't put any program files into the script, you'll need to be online to fetch the current setup file (via AutoIt). That way it's always up to date. Apart from that, I played with the tool xmlStarlet to easily customize xml files, and last not least I added some eye candy so you might optionally change the program's default icon and associated file extension(s). On the other hand, if you don't like, you don't have to... and if you're more into "Real men don't click!" maybe check out another script of mine. :wink:

Download the script below. And have fun!

Update: Broken for current Notepad++ versions!
« Last Edit: October 31, 2017, 05:11:14 AM by Mikka, Reason: Actual reminder »

Re: Notepad++ universal Script
« Reply #1 on: April 21, 2013, 06:13:22 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7378
Just some feedback ;) , take or ignore as usual  :wink:

*
%ConfigPath%="%TargetDir%\Users\Default\AppData\Roaming\%ProgramFolder%"
%DownloadFolder%="%GlobalSupport%\Downloads\%ProgramFolder%"
no need quotes
-->
%ConfigPath%=%TargetDir%\Users\Default\AppData\Roaming\%ProgramFolder%
%DownloadFolder%=%GlobalSupport%\Downloads\%ProgramFolder%

*
//If,Not,ExistFile,%Target_Win%\Fonts\consola.ttf,Begin
don't leave commented out Begin ;) change its name like Begi-n
-->
//If,Not,ExistFile,%Target_Win%\Fonts\consola.ttf,Begi-n

*
last time reminding reply 1 to say in future "I told you" , just reputting a note here
http://theoven.org/index.php?topic=594.msg8603#msg8603

*
you can use something like
ShellExecute,Open,%Tools%\x86\AU3381.exe,"#$q/AutoIt3ExecuteScript#$q #$qGetNotepad++SetupLink.au3#$q",%DownloadFolder%
hence plugin will be smaller without GetNotepad++SetupLink.exe

*
your plugin should work on Gena, there is nothing special about that between my simple plugin and your univeral npp plugin  :thumbsup:

*
edit:
you can use forum's attachment  :wink:

See You
:ymca:
« Last Edit: April 21, 2013, 06:14:55 AM by Lancelot »

Re: Notepad++ universal Script
« Reply #2 on: April 21, 2013, 06:43:04 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7378
just notice...

to use AppData folder of User (which you seem to use %ConfigPath% with hardcoded path)
check example here
http://theoven.org/index.php?topic=473.0

Code: [Select]
IniRead,%ProjectDir%\Script.Project,BasePath,Appdata,%AppData%
Set,%TargetUserAppData%,%TargetProfilesBaseDir%\%AppData%

I guess on your case (not tested), something like that
Code: [Select]
IniRead,%ProjectDir%\Script.Project,BasePath,Appdata,%AppData%
Set,%ConfigPath%,%TargetProfilesBaseDir%\Roaming\%ProgramFolder%
will work universal (no hardcode path)  :thumbsup:

See You
:ymca:

Re: Notepad++ universal Script
« Reply #3 on: April 22, 2013, 08:00:06 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
to use AppData folder of User (which you seem to use %ConfigPath% with hardcoded path)
check example here
http://theoven.org/index.php?topic=473.0

Thanks, I'll change that, seems a very cool idea!

By the way, AutoIt (not much experience yet), I tried the au3 variant at first, it didn't work as expected:
ila_rendered

Maybe it's because of the param (ini file to write to)?
Code: [Select]
ShellExecute,Open,%Tools%\x86\AU3381.exe,"#$q/AutoIt3ExecuteScript#$q #$q%DownloadFolder%\GetNotepad++SetupLink.au3#$q #$q%DownloadFolder%\np++.ini#$q"

Re: Notepad++ universal Script
« Reply #4 on: April 22, 2013, 08:03:45 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7378
I am not au3 expert at all, I guess ChrisR and/or JFX will reply better,

I guess providing them an example with a test batch (test.cmd) au3 (test.au3) etc.... will make whells turn faster...

Study time ... and no time :turtle:

See You
:ymca:

Re: Notepad++ universal Script
« Reply #5 on: April 22, 2013, 11:36:34 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
Lancelot, thank you very much for all the additions. :great:
I checked the %ConfigPath% improvement and it's perfect. I'd be glad to contribute a version that works with other projects, too.
(Maybe with the sole exception of one project that shouldn't be named here, that's another story...)

The au3 improvement would be "the icing on the cake" (definitely nice to have, but for the nonce I can live without it).
Always striving for perfection... :grin:

New update will follow soon.

Re: Notepad++ universal Script
« Reply #6 on: April 22, 2013, 01:38:35 PM »

Galapo

  • Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 1982
Hi Mikka,

As the message states, the issue is to do with this line in your AU3 file:

Code: [Select]
#include <Array.au3>

When you compile, the contents of the file specified by #include lines are added, in this case Array.au3. However, when you run the AU3 file without an include directory, the function that you are using from the included file is not able to be found.

The solution is to copy the function (or functions) you are using from Array.au3 over to your AU3 file and do away with the #include line.

Regards,
Galapo.

Re: Notepad++ universal Script
« Reply #7 on: April 22, 2013, 11:29:41 PM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2911
Hi Mikka,

In addition, It seems to remain functional without the need to copy the "included" function(s) in this script, just by removing
Code: [Select]
#include <Array.au3>                                         ;for StringRegExp
#include <Misc.au3>                                          ;for _Singleton
_Singleton("GetNotepad++SetupLink")                          ;no Simpleton!

Singleton is not really useful here by being called from your script.

Code: [Select]
ShellExecute,Open,%Tools%\x86\AU3381.exe,"#$q/AutoIt3ExecuteScript#$q #$q%DownloadFolder%\GetNotepad++SetupLink.au3#$q #$q%DownloadFolder%\np++.ini#$q"
 
Gives the URL of the latest version as expected  :thumbsup:
« Last Edit: April 22, 2013, 11:32:35 PM by ChrisR »

Re: Notepad++ universal Script
« Reply #8 on: April 22, 2013, 11:39:32 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7378
Hi Mikka,

The only pe-projects using wb that are used widely (only  :thumbsup:) are the ones at TheOven :wink:
 Be carelful about post game #X: "fake-member posts" of some idiots trying to fool newbies   :cool:  to convince other way...
  ( which again becomes very popular these days for some other tasks, giving all experienced ones big laughs  :grin: :grin:)
and don't worry, they also follow TheOven app writing rules in time  :wink:  only they do not announce  :cool: aside you do not need to waste time for something nobody like, nobody use since very begining for years now. :cool:

Happy au3 development times  :great:

Re: Notepad++ universal Script
« Reply #9 on: April 23, 2013, 06:05:10 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
Thanks a bunch, guys, it works perfectly well now. :grin:
Whether it's 100 % "Gena compatible" I cannot tell, but it's much better than 2 days ago.

@Lancelot: No, it's not at TheOven (and apparently this very project never seems to work flawlessly, but doesn't deter the author from blaming others for their non appropriate scripts -- in fact for his very own project).

Re: Notepad++ universal Script
« Reply #10 on: December 01, 2013, 06:30:25 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
Just for the record: Notepad++ script has been updated (version 8 now).

Re: Notepad++ universal Script
« Reply #11 on: December 02, 2013, 03:27:23 AM »

JonF

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2011
  • Posts: 286
When you compile, the contents of the file specified by #include lines are added, in this case Array.au3. However, when you run the AU3 file without an include directory, the function that you are using from the included file is not able to be found.

My experience with the AU3 decompiler is that the includes are copied wholesale into the "executable" file.

Re: Notepad++ universal Script
« Reply #12 on: February 07, 2014, 03:14:52 PM »

1OldMan

  • Apprentice
  • *
  • Date Registered: Dec 2013
  • Posts: 1
In building a Win7PE_SE project, I've encountered an issue implementing the latest version (v8) of the Notepad++ universal Script -- though the script itself is not the issue.  During execution as currently configured, the script downloads the most current version of Notepad++. 

Apparently, however, the latest version of the program now available for download does not include the "contextMenu.xml" file. Consequently, the PE build stops with an error message indicating that the contextMenu.xml file could not be copied. 

I was able to locate an unmodified version of the configurable Notepad++ contextMenu.xml file and manually insert it into the location the script was searching for the file and the build then proceeded without error.

At this point, this is just an FYI for those who might run into the same issue.

Regards to all

 

Re: Notepad++ universal Script
« Reply #13 on: February 09, 2014, 08:53:34 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
Yes, this might happen. Uncommenting the contextMenu.xml line of the script is another option, I'll fix this in the next update.
After all, contextMenu.xml is no important file.

Thanks for reporting.

Re: Notepad++ universal Script
« Reply #14 on: October 08, 2015, 05:33:45 PM »

gbrao

  • Chef
  • ***
  • Date Registered: Sep 2011
  • Posts: 195
Some Notepad++ context menu hacks ( get "delete to end of line" etc to context menu ) :

http://theoven.org/index.php?topic=1446.msg16929;topicseen#msg16929

Re: Notepad++ universal Script
« Reply #15 on: October 11, 2015, 04:13:44 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
As you might have noticed, my script uses Npp setup data. Any additional configuration means altering the xml files,
this is achieved with this neat tool.

I do not have much time to work on my Notepad++ universal script right now, but you're free to figure out how
the missing xml nodes can be inserted into these files. Keep me informed!

Re: Notepad++ universal Script
« Reply #16 on: November 06, 2015, 10:55:31 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
The script has been updated. Surfmaxx might rejoice as the (optional) installer fetcher is back.
:wink:

Re: Notepad++ universal Plugin
« Reply #17 on: May 25, 2016, 09:08:14 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
The script has been updated again.

Re: Notepad++ universal Plugin
« Reply #18 on: September 10, 2016, 09:06:03 PM »

Atari800xl

  • Code Baker
  • Sr. Chef
  • ****
  • Date Registered: Feb 2013
  • Posts: 785
...
« Last Edit: February 18, 2017, 10:57:08 PM by Atari800xl »

Re: Notepad++ universal Plugin
« Reply #19 on: September 12, 2016, 10:23:31 AM »

Mikka

  • Code Baker
  • Chef
  • ***
  • Location: Germany
  • Date Registered: May 2012
  • Posts: 240
That's great, I'm looking forward to the new version, just hope that the couple of plugins that I use will be available in Npp x64 as well.

 

Powered by EzPortal