You are here: PSPad forum > English discussion forum > Arguments to scripts

Arguments to scripts

#1 Arguments to scripts

Posted by: kheops | Date: 2013-02-04 13:34 | IP: IP Logged

I wrote this little script in autoit :

; If 0 Params then exit
If $CmdLine[0] = 0 Then
MsgBox(8192, "Info","Give the Path")
Exit
EndIf

MsgBox(8192, "$CmdLine[1]","Path : " & $CmdLine[1])
....

At the end this script will be able to arrange file into "path" folders ...

But in pspad how to pass arguments (mine is path but it could be other things and/or multiple arguments) to scripts without editing everytime the highlighters Settings?

Thanks in advance grinning smiley

Options: Reply | Quote | Up ^


#2 Re: Arguments to scripts

Posted by: pspad | Date: 2013-02-04 13:56 | IP: IP Logged

You don't start Scripts in PSPad with arguments.

Options: Reply | Quote | Up ^


#3 Re: Arguments to scripts

Posted by: pspad | Date: 2013-02-04 14:00 | IP: IP Logged

If you want to know path of your file, get it using function in script.

Options: Reply | Quote | Up ^


#4 Re: Arguments to scripts

Posted by: kheops | Date: 2013-02-04 14:09 | IP: IP Logged

I was not clear ...
I dont run the script with pspapd but I run the interpreter ...(autoit)

One of the parameters of the interpreter is the name of the script but I want to send an argument to the script with PSPad...

Options: Reply | Quote | Up ^


#5 Re: Arguments to scripts

Posted by: kheops | Date: 2013-02-04 14:21 | IP: IP Logged

I finally remembered ....
just put %Input% at the end of the input line:

Settings
highlighters Settings
"AutoIT" (for me)
External Application
Application List
Application: "%%PSPath..\AutoIT\AutoIt3.exe" "%file%" %Input%

I remembered that I had already come across with this problem ...
I hope I have been of help to someone other than me ...tongue sticking out smiley

Edited 1 time(s). Last edit at 2013-02-04 14:24 by kheops.

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