You are here: PSPad forum > English discussion forum > How to run vbscripts from within pspad

How to run vbscripts from within pspad

#1 How to run vbscripts from within pspad

Posted by: pudnik | Date: 2013-09-12 23:01 | IP: IP Logged

Hello, I'm sorry if this has already been covered but I searched the forums twice and nothing came up.

If one is editing a vbscript from within PSPad, how does one setup a custom menu item or button to run that vbscript from within the editor?

thank you
pudnik

Options: Reply | Quote | Up ^


#2 Re: How to run vbscripts from within pspad

Posted by: pspad | Date: 2013-09-13 03:54 | IP: IP Logged

Use PSPad scripting support - you can extend PSPad abilities with custom script - in this case you can call it from menu script where new item appear.
Ensure the Scripting support is enabled in Program settings / System

You can call any external application include CScript using external application or compiler in highlighter settings (depends of syntax) or from the favorite panel - syntax independant

Options: Reply | Quote | Up ^


#3 Re: How to run vbscripts from within pspad

Posted by: pudnik | Date: 2013-09-13 19:15 | IP: IP Logged

OK...I'm almost sure that someone has already written a script for this, is there a PSPad script repository where I can search for it? Or is there a tutorial somewhere? I'm a programmer so I just need a little hint and I can do it...smoking smiley

Options: Reply | Quote | Up ^


#4 Re: How to run vbscripts from within pspad

Posted by: pspad | Date: 2013-09-13 19:31 | IP: IP Logged

There is lot of scripts for many different things - see the subfolder Script\JScript
You can download many other script from the PSPad extension page

I don't know what you want to do.
To run totally external script setup external application - cscript with your external script as parameter

Options: Reply | Quote | Up ^


#5 Re: How to run vbscripts from within pspad

Posted by: vbr | Date: 2013-09-13 19:35 | IP: IP Logged

pudnik:
OK...I'm almost sure that someone has already written a script for this, is there a PSPad script repository where I can search for it? Or is there a tutorial somewhere? I'm a programmer so I just need a little hint and I can do it...smoking smiley

Hi,
various user-supplied scripts can be found on the homepage:
www.pspad.com

There is a file with api reference and some examples in
...\PSPad\Script\ReadMe.rtf

There might be some script samples as well directly in
...\PSPad\Script\VBScript\
(where you also will place the VBscripts for PSPad (assuming you are looking for internal editor scripting, rather than e.g. calling external scripts from the editor.)

hth,
vbr

Options: Reply | Quote | Up ^


#6 Re: How to run vbscripts from within pspad

Posted by: pudnik | Date: 2013-09-17 00:44 | IP: IP Logged

Let me be more specific.

For example, if you open a WSH script in VBSedit, an IDE which you have to buy and is not portable, you can click on the START button, and VBSedit will execute the script that you are editing.

image

In PSPad, in Settings | System Integration, I have the Integrated scripting support (WSH) checkbox checked.

If I have a WSH script loaded into PSPad, how can I create a RUN button that will execute it using Wscript.exe

?

Edited 1 time(s). Last edit at 2013-09-17 00:45 by pudnik.

Options: Reply | Quote | Up ^


#7 Re: How to run vbscripts from within pspad

Posted by: pudnik | Date: 2013-09-17 01:05 | IP: IP Logged

...OK, OK, I found the button. VBScripts are interpreted, not compiled, but if you click on the "Run external compiler to compile file", it will do what I want. smiling smiley

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR