You are here: PSPad forum > English discussion forum > Python Scripting

Python Scripting

Goto Page: 1 2 3 Next

#1 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

Options: Reply | Quote | Up ^


#2 Re: Python Scripting

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

Options: Reply | Quote | Up ^


#3 Re: Python Scripting

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 !

Options: Reply | Quote | Up ^


#4 Re: Python Scripting

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

Options: Reply | Quote | Up ^


#5 Re: Python Scripting

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 ?

Options: Reply | Quote | Up ^


#6 Re: Python 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

Options: Reply | Quote | Up ^


#7 Re: Python Scripting

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

Options: Reply | Quote | Up ^


#8 Re: Python Scripting

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?

Options: Reply | Quote | Up ^


#9 Re: Python Scripting

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.

Options: Reply | Quote | Up ^


#10 Re: Python Scripting

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.

Options: Reply | Quote | Up ^


Goto Page: 1 2 3 Next





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