You are here: PSPad forum > English discussion forum > Python Scripting
Posted by: pythonui | Date: 2015-08-06 05:52 | IP: IP Logged
Hello,
How can I use python for PSPAD Scripting ? Anybody have any sample examples for that as in JS ?
Thanks
Posted by: pspad | Date: 2015-08-06 06:26 | IP: IP Logged
You can use any language, supported by Windows scripting Host. OS contains VBScript and JScript as default, but you can install another ones. Look here:
www.mvps.org
In PSPad folder should be scripting.rtf document with description and examples
Posted by: pythonui | Date: 2015-08-06 06:32 | IP: IP Logged
Thanks for answer !
Sorry but I can not see any file in PSPAD folder 'scripting.rtf'.Yes in script folder we have readme.rtf but in that there is no any test example for python language !
Posted by: pspad | Date: 2015-08-06 06:41 | IP: IP Logged
I don't know Python, so I am not able to help you with Python syntax or how to convert VBScript or JScript into Python syntax
Posted by: pythonui | Date: 2015-08-06 06:47 | IP: IP Logged
That's Okay! I will do python scripting!
So in which folder I have to keep my python files? I have python in my machine but not able to find how to run it as PSPAD scripting ?
Posted by: pspad | Date: 2015-08-06 06:52 | IP: IP Logged
If Python for WSH is available, PSPad will create folder automatically.
Try to RUN PSPad as admin if you installed Python for WSH after PSpad install
Posted by: pythonui | Date: 2015-08-06 06:56 | IP: IP Logged
Yes...Its created the folder with name 'Python.AXScript.2'
But when I put python file in that folder it gives me error like 'Support for Python.AXScript.2 not found... '
Thanks
Posted by: pythonui | Date: 2015-08-06 08:15 | IP: IP Logged
Success !
But when running script getting error !
pspad.addMenuItem("Example function", "PySample sample", "beispiel")
Could you please tell me what is 'pspad' in this case? I know this can be class or module but how?
Posted by: pspad | Date: 2015-08-06 08:16 | IP: IP Logged
I don't know what is in Python used for. Try to remove it.
Posted by: pythonui | Date: 2015-08-06 08:19 | IP: IP Logged
I had also remove that ! But no success ...
No problem ... I will try other workaround and let you know...
Could you please tell me what is 'addMenuItem' ? Is this a method of what ?
Edited 2 time(s). Last edit at 2015-08-06 08:21 by pythonui.
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