You are here: PSPad forum > English discussion forum > PSPad extension announcement

PSPad extension announcement

Goto Page: Previous1 2 3 4 5 6 7 8 9 10 11 Next

#51 JavaScript code beautifier

Posted by: MrSpock | Date: 2008-02-16 13:15 | IP: IP Logged

A code beautifier for JavaScript and similar c-like languages. Original version by Lorin Thwaits, see geekswithblogs.net
Download the script.

Edited 1 time(s). Last edit at 2008-02-16 13:20 by MrSpock.

Options: Reply | Quote | Up ^


#52 Re: JavaScript php helper

Posted by: vortex | Date: 2008-02-17 19:43 | IP: IP Logged

In here are tools for php and running PSPad on a usb drive
Lots of code for scripting in javascript hope you enjoy

in the extensions "jScriptingPHPtoolbox"

Options: Reply | Quote | Up ^


#53 ASP - Insert SQL statement (update - v0.4)

Posted by: james.swan | Date: 2008-02-22 09:49 | IP: IP Logged

Finally found some time to replace the obsolete assignLog function with logAddLine function so that table column info can once again be written to the log window.

Options: Reply | Quote | Up ^


#54 Convert Indent Tabs to Spaces or Spaces to Tabs

Posted by: phdesigner | Date: 2008-04-30 03:17 | IP: IP Logged

This script converts the indent from tabs to spaces or spaces to tabs.

PSPad does have an internal tabs to spaces function under Edit > Special Conversion but this changes ALL tabs to spaces, my script only converts leading tabs on a line to spaces.

Download zip by copy and pasting this into your browser:
(http://www.phdesign.com.au/download/convertindent_1_0.zip)

Or save this code as a ConvertIndent.vbs in PSPad\Script\VBScript folder


'********************************************************************
' Author: Paul Heasley
' Website: www.phdesign.com.au
' Copyright (C) 2007 Paul Heasley
' Date: 19 February 2007
' Purpose: Converts indentation from spaces to tabs or visa versa.
'
'********************************************************************

Const module_name = "ConvertIndent"
Const module_ver = "1.0"

Const intMaxLineLength = "999999"

Sub Init
addMenuItem "Convert Indent to Spaces", "", "Tab2Spaces"
addMenuItem "Convert Indent to Tabs", "", "Spaces2Tab"
End Sub

Sub Tab2Spaces
Dim aryLines
Dim intIndent, i, j

intIndent = GetIndentWidth
If Len(intIndent) = 0 Then Exit Sub
aryLines = Split(HandleSelText(""), vbCrLf)

For i = LBound(aryLines) To UBound(aryLines)
'Set a maximum line length to avoid infinite loop
For j = 1 To intMaxLineLength
If Mid(aryLines(i), j, 1) = vbTab Then
aryLines(i) = Left(aryLines(i), j - 1) & Space(intIndent) & Mid(aryLines(i), j + 1)
'Adjust for the new length of the string
j = j + (intIndent - 1)
ElseIf Mid(aryLines(i), j, intIndent) = Space(intIndent) Then
j = j + (intIndent - 1)
Else
Exit For
End If
Next
Next

HandleSelText Join(aryLines, vbCrLf)
End Sub

Sub Spaces2Tab
Dim aryLines
Dim intIndent, i, j

intIndent = GetIndentWidth
If Len(intIndent) = 0 Then Exit Sub
aryLines = Split(HandleSelText(""), vbCrLf)

For i = LBound(aryLines) To UBound(aryLines)
'Set a maximum line length to avoid infinite loop
For j = 1 To intMaxLineLength
If Mid(aryLines(i), j, intIndent) = Space(intIndent) Then
aryLines(i) = Left(aryLines(i), j - 1) & vbTab & Mid(aryLines(i), j + intIndent)
ElseIf Mid(aryLines(i), j, 1) <> vbTab Then
Exit For
End If
Next
Next

HandleSelText Join(aryLines, vbCrLf)
End Sub

Private Function GetIndentWidth
GetIndentWidth = InputBox("Enter Indent Width", module_name, "2")

If Not IsNumeric(GetIndentWidth) Then
MsgBox "Invalid indent width. Indent width must be numeric.", vbExclamation, module_name
GetIndentWidth = ""
End If
End Function

Private Function HandleSelText(strText)
Dim objEditor

On Error Resume Next

Set objEditor = newEditor()
objEditor.assignActiveEditor

If strText = "" Then
'Get selected text
HandleSelText = objEditor.selText
If HandleSelText = "" Then
'No text was select. Get all text and select it.
HandleSelText = objEditor.Text
objEditor.command "ecSelectAll"
End If
Else
'Set selected text
objEditor.selText strText
End If
End Function

Options: Reply | Quote | Up ^


#55 Re: PSPad extension announcement

Posted by: naputtelija | Date: 2008-05-08 12:40 | IP: IP Logged

Syntax and clip files uploaded for Windows PowerShell 2 (CTP2).
Also some corrections for Windows PowerShell version 1 support.

Both are available in Extensions section:
www.pspad.com

Options: Reply | Quote | Up ^


#56 Update of Code V syntax

Posted by: francheu | Date: 2008-06-23 05:55 | IP: IP Logged

the Code V syntax and clip files have been updated for version 9.82, see www.pspad.com

the zip file also contain 2 scripts, the first one codev_save saves the files and create a backup by incrementing the file name, the second is a rather basic script to correct the indentation of the file

--
François

Options: Reply | Quote | Up ^


#57 Hots 0.3

Posted by: alesc | Date: 2008-08-02 14:21 | IP: IP Logged

This is a new version of ctags_for_pspad which
enables use of ctags under pspad.

Redesigned now supports jumpInto, undo, redo, autocomplete.

www.pspad.com

Options: Reply | Quote | Up ^


#58 Re: PSPad extension announcement

Posted by: kristy | Date: 2008-09-16 05:12 | IP: IP Logged

I couldn't get the above instructions to work.. but here's how I got a PHP debugger into PSPad.

1) Grab a copy of PHP from php.net(I chose the zipped file over the exe as it's a no fuss solution)

2) Unzip the PHP contents - I placed it in C:\Program Files\Webdev\PHP-5.2.6

3) Download the debugger module from www.xdebug.org (make sure the version you download is compatible with your version of PHP - in this case, I downloaded: Xdebug Windows Module PHP 5.2.1-5.2.6)

4) Place the debugger module file (php_xdebug-2.0.3-5.2.5.dll) inside the ext folder of your PHP eg: C:\Program Files\Webdev\PHP-5.2.6\ext

5) Edit the php.ini file (or if it's a brand new php, then rename php.ini-dist to php.ini) and add the following lines (replace the directory paths with your own):

extension_dir = "C:\Program Files\Webdev\PHP-5.2.6\ext"
zend_extension_ts="C:\Program Files\Webdev\PHP-5.2.6\ext\php_xdebug-2.0.3-5.2.5.dll"

6) Inside PSPad, click Settings - Highlighter Settings. Click on the PHP option, click on the Compiler tab. And set the locations. Example:

Compiler: C:\Program Files\Webdev\PHP-5.2.6\php.exe
Parameters (with the quotes): "%File%"

Click on OK and voila! you can compile your scripts by Ctrl+F9 or clicking File - Compile. Make sure your LOG window is visible (Window - Show/Hide Log Window) to see your results.

Hope it helps,
Kristy

P.S: I also use a great little webserver called QuickPHP by Zach Saw - only 500kb and no installation. Just place it's single exe file within the PHP folder, run and it's serving up your files. Gotta love it - tinyurl.com

Edited 1 time(s). Last edit at 2008-09-16 05:13 by kristy.

Options: Reply | Quote | Up ^


#59 Re: PSPad extension announcement

Posted by: joatmon | Date: 2008-10-07 00:15 | IP: IP Logged

-- Mod 10 and 97 Check Digit --

For those working with Payment systems that use Check Digits, this is a handy little extension that will calculate a highlighted set of Numbers needing the Mod 97 or Mod 10 check digit/sum.

-- Usage --
Select the Valid Reference Number(s) to be calculated and run Script.

Script\Mod 10 - Mod 97 Check Digit\

* Mod 10 Check Digit
* Mod 97 Check Digit

-- Note --
Each company will have a different Vendor ID No for Mod 97 calculations. You can change this number in the variable section of the script.

-- Sample Log Results --
Check Digits are in the Square Brackets
------ Mod Calc 10 Start ------
Date and Time: 8/14/2008 4:09:16 PM
Line Count: 14
Value: 8499 [6]
Value: 8551 [4]
Value: 8952 [4]
Value: 8953 [2]
Value: 42645 [2]
Value: 121540 [9]
Value: 121542 [5]
Value: 146830 [5]
Value: 152823 [1]
Value: 152863 [7]
Value: 182697 [3]
Value: 200249 [1]
Value: 200401 [8]
Value: 676639 [8]
------ Mod Calc 10 Complete ------

------ Mod Calc 97 Start ------
Date and Time: 8/14/2008 4:10:48 PM
Line Count: 14
Value: 8499 [79]
Value: 8551 [55]
Value: 8952 [50]
Value: 8953 [70]
Value: 42645 [96]
Value: 121540 [41]
Value: 121542 [81]
Value: 146830 [96]
Value: 152823 [85]
Value: 152863 [64]
Value: 182697 [19]
Value: 200249 [36]
Value: 200401 [30]
Value: 676639 [72]
------ Mod Calc 97 Complete ------

Options: Reply | Quote | Up ^


#60 Re: PSPad extension announcement

Posted by: ckx | Date: 2008-10-15 10:29 | IP: IP Logged

I've uploaded "fillcols", a Javascript extension for filling a rectangular selection of text with either fill characters or number sequences. The user is prompted to enter the fill text. In overwrite mode (fillcols_ovr, Ctrl+Shift+F) the selection is replaced, in insert mode (fillcols_ins, Ctrl+Alt+F)) the fill text is inserted before the selection. An error message is given if there is no rectangular selection of text.

The syntax <x>++[<y>] can be used to create number sequences. For example, entering "1++" in the fill characters will insert 1, 2 etc. Entering "10++-1" will insert 10, 9, 8, etc.

In overwrite mode, a text insert is repeated if it is shorter than the selection width. For example, if 5 columns have been selected and "ab" is entered, then the fill text will be "ababa". A number sequence will be padded to the selection width but will be truncated if too long. For example, if 2 columns have been selected and "1++50" is entered, the fill text will be " 1", "51", "01" (the value of "101" is truncated).

In insert mode, the fill text is insterted before the selection. Numeric sequences have the width of the largest number, smaller numbers are padded with zeros. For example, if "1++50" is entered in insert mode, the fill text will be " 1"," 51", "101".

Best regards,
John Hendrickx

Options: Reply | Quote | Up ^


Goto Page: Previous1 2 3 4 5 6 7 8 9 10 11 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