You are here: PSPad forum > Developer forum - new builds > PSPad unicode 5.0.2 (341) English

PSPad unicode 5.0.2 (341) English

Goto Page: 1 2 Next

#1 PSPad unicode 5.0.2 (341) English

Posted by: pspad | Date: 2019-11-13 19:21 | IP: IP Logged

Download links (5.4 MB):
www.fosshub.com
pspad.poradna.net
PSPad 64 bit version preview without scripting support. Archive contains EXE only. So use 32b version first and replace EXE with 64b version than.
pspad.poradna.net

This archive contains modified files only. The correct way how to get full functionality:
1. Download and install latest full version first!
2. Replace existing files with content of archive

Changes to 5.0.2 (339)

News
Log window will mark "debug" line with green symbol
Scripting - new function markEditorLine(integer) - will paint sent line with same color as click in the LOG window
Scripting - new function pspadClosing(): boolean - returns if PSPad is in closing state
Scripting - new function reloadUserHighlighter(name: string) - reloads user highlighter if loaded. Parametr means name of highlighter or name of definition file.

Fixes:
Autohotkey Code explorer - function detection fix
Problem with screen repaint when switch PSPad and Chrome based browser
Impossibility to save file without extension. This will be possible when you change file type in save dialog to *.*
Fixed problem with transient freezing joined with pair bracket highlighting

Options: Reply | Quote | Up ^


#2 Re: PSPad unicode 5.0.2 (341) English

Posted by: Professor Bernd | Date: 2019-11-18 05:44 | IP: IP Logged

Hello Jan.

Many thanks for the new version!

These two functions work fine: smiling smiley

- Log window will mark "debug" line with green symbol
- Scripting - new function markEditorLine(integer)

I can't get these two functions to work: sad smiley

- Scripting - new function pspadClosing()
- Scripting - new function reloadUserHighlighter(name: string)

Am I doing something wrong? I have tried many things, for example:

.
Function reloadUserHighlighter(name: string)

Dim obj

Set obj = NewEditor()
obj.assignActiveEditor()
' obj.activate()

' obj.highlighter("AutoIt3")
reloadUserHighlighter("AutoIt3")
' nothing happens. sad smiley
' reloadUserHighlighter()

For function reloadUserHighlighter() I opened an AutoIt3 script in PSPad with AutoIt3 Highlighter. Then in AutoIt3.ini I added a new codeword to section [KeyWords3] and saved it. Then I pressed the shortcut for the VBScript code above, but nothing happened. But when I restart PSPad, the new codeword is highlighted correctly.

.
Function pspadClosing()

echo("Start")

Do
If pspadClosing() Then Exit Do
Sleep(10)
Loop

echo("End")

For function pspadClosing() I started the loop as in the code above, then I tried to close PSPad, but the loop continued and 'echo("End")' did not appear.

Can you please show examples of how to do it right?

Bernd.

Edited 3 time(s). Last edit at 2019-11-18 05:48 by Professor Bernd.

Options: Reply | Quote | Up ^


#3 Re: PSPad unicode 5.0.2 (341) English

Posted by: pspad | Date: 2019-11-18 06:26 | IP: IP Logged

I will test it

Options: Reply | Quote | Up ^


#4 Re: PSPad unicode 5.0.2 (341) English

Posted by: pspad | Date: 2019-11-18 06:59 | IP: IP Logged

reloadUserHighlighter("AutoIt3")

There is typo in code. Use reloadUserHighlighter("\AutoIt3") for now if you want to test it.
But don't forget that in next build it will be fixed.

Options: Reply | Quote | Up ^


#5 Re: PSPad unicode 5.0.2 (341) English

Posted by: pspad | Date: 2019-11-18 07:57 | IP: IP Logged

PSPad closing has no chance to be fired for your purposes.
I will remove it and automatically close all scripts during PSPad close process.

Options: Reply | Quote | Up ^


#6 Re: PSPad unicode 5.0.2 (341) English

Posted by: Professor Bernd | Date: 2019-11-18 10:04 | IP: IP Logged

pspad:
There is typo in code. Use reloadUserHighlighter("\AutoIt3") for now if you want to test it.

Unfortunately it has no effect. Does something have to be added to the code? Example:

Sub TestFunc()
reloadUserHighlighter("\AutoIt3")
End Sub

When I restart PSPad, the highlighter is reloaded and the new code words are colored correctly.

pspad:
PSPad closing has no chance to be fired for your purposes.
I will remove it and automatically close all scripts during PSPad close process.

This is a much better idea than mine. Thanks a lot! smiling smiley

I noticed in the new version the font is bold from the active tab. Very nice! Now I can easily find the active tab. tongue sticking out smiley

Options: Reply | Quote | Up ^


#7 Re: PSPad unicode 5.0.2 (341) English

Posted by: pspad | Date: 2019-11-18 10:12 | IP: IP Logged

So wait for the new build. Reload highlighter works correctly for me.

Options: Reply | Quote | Up ^


#8 Re: PSPad unicode 5.0.2 (341) English

Posted by: Professor Bernd | Date: 2019-11-18 17:26 | IP: IP Logged

Thank you. smiling smiley

Options: Reply | Quote | Up ^


#9 Re: PSPad unicode 5.0.2 (341) English

Posted by: vbr | Date: 2019-11-19 00:19 | IP: IP Logged

pspad:
PSPad closing has no chance to be fired for your purposes.
I will remove it and automatically close all scripts during PSPad close process.

Hi, I'd like to add some other use case which would (likely) benefit from a similar scripting functionality.
If the scripts should use their own gui elements, they will probably need a reliable destructor for such cases, to close these elements properly before the editor (or its scripting engine) is closed and probably before reloading scripts too.
It seems, these guis can be disconnected from PSPad but can still keep running in such cases now.
(In my brief experiments some time ago - with python + tkinter and with hta, this seemed to me as the main problem - some collisions on closing and newly creating the guis also could lead to a hang for the whole editor.)

However, it seems, some kind of a trigger method would be needed, something like on(Before)Close, or on(Before)ReloadScripts etc.
as a kind of complement of the present init().
However, I see, that the event handling might get much more complicated (although this closing event might not be very frequent, compared to others). Maybe it can be considered in some future version.

Thanks for this new version and its additions.
regards,
vbr

Options: Reply | Quote | Up ^


#10 Re: PSPad unicode 5.0.2 (341) English

Posted by: ejfield | Date: 2019-11-19 07:48 | IP: IP Logged

I'm an getting occasional "Application Error" dialog when I exit PSPAD, first noticed it in 339. It's not very repeatable unfortunately. I cant work out how to paste an image, but it says:

Exception EAccessViolation in module PSPad at 000000000011E499. Access violation at address 000000000011E499 in module 'PSPad.exe'. Read of address 0000000700000000.

I'm using the 64bit version. As far as I can tell, it doesn't do any harm.

Options: Reply | Quote | Up ^


Goto Page: 1 2 Next





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