how to run a notepad++ macro from vbscript or powershell?
-
I 'm trying to run a vbscript and to open notepad++ , open a txt file and run a macro that i have allready made.
is that possible?
Thanx
Thanasis
-
till now I have this…
Dim objShell
Set objShell = WScript.CreateObject( “WScript.Shell” )
objShell.run(“notepad++.exe <path\name.txt>”)
Set objShell = Nothingbut I dont know how to run the macro command
-
Hello Thanasis,
- Assign a shortcut to your macro via Settings -> Shortcut Mapper -> Macros.
- Add the following lines to the script.
objShell.run... WScript.Sleep(100) ' Let NPP load and open the file. Adjust the number of milliseconds to your machine. objShell.SendKeys("^+9") ' "^+9" is Ctrl+Shift+9. Replace it with your preferred shortcut.Best regards.
-
thank you
that worked fine!!!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login