You are here: PSPad forum > English discussion forum > Re: Behavior when starting pspad with file name argument

Re: Behavior when starting pspad with file name argument

#1 Behavior when starting pspad with file name argument

Posted by: gyll | Date: 2015-03-30 09:33 | IP: IP Logged

PSPad currently remembers the last open files, or the last open project, when it is closed and then reopened.
It would be nice to have PSPad NOT remember the last file it opened IF it is started with a file name argument: in this way, if i add PSPad to the "Send To" context menu in Windows, i can open a file in PSPad via the "Send To" menu, but the next time i start PSPad it will not reopen this file opened with "Send To", and instead it will still open the last set of files, or the last project, that was open before the file opened with "Send To"

In other words, the behavior i am trying to explain would be like this:
1) have a set of files, or a project, opened in pspad; let's call this set of files, or project, "X"
2) close pspad and then reopen it (or leave pspad open)
3) open a file "F" with "Send To": the open files in pspad will be "X"+"F"
3) close pspad
4) re-open pspad: now the files that pspad automatically re-opens will be "X", and NOT "X"+"F"

So basically, the whole idea is to internally mark any file that is open in pspad via a file name argument, and when pspad is closed any files that were opened via file name argument should not be saved in the list of files that must be re-opened next time pspad is started.

Options: Reply | Quote | Up ^


#2 Re: Behavior when starting pspad with file name argument

Posted by: pspad | Date: 2015-03-30 09:49 | IP: IP Logged

Program settings / Files and dirs
Save Work / Desktop: In PSpad opened files only

This setting isn't enough?

Options: Reply | Quote | Up ^


#3 Re: Behavior when starting pspad with file name argument

Posted by: gyll | Date: 2015-04-01 11:40 | IP: IP Logged

I have pspad 4.5.4, and unless you changed something in the functionality of the option you mention it is not working as i explained.

If i do:

1) Have an open project with 3 file in pspad
2) Close pspad
3) Open a text file in pspad with Send To menu
4) Close pspad
5) Open pspad

After the above pspad does not open the initial project, it simply starts with a blank new file.

Similarly, if i do:
1) Have an open project with 3 file in pspad
2) Leave pspad open, and open a file in pspad via Send To
3) Close pspad
4) Open pspad

After the above, pspad will open the initial project, PLUS the file i opened via Send To

My suggestion was that, each time i start pspad, it should open the last project, or set of files, DISCARDING any file(s) that have been opened via Send To. In this way i can use pspad to open any files when i need to, but this will never interfere with my work in my current project (or set of files).

So i think that the option "Save desktop in pspad opened files only" is exactly what i wanted to suggest, but the behavior should be changed as i explained above in order to be useful.

Edited 2 time(s). Last edit at 2015-04-01 11:48 by gyll.

Options: Reply | Quote | Up ^


#4 Re: Behavior when starting pspad with file name argument

Posted by: pspad | Date: 2015-04-01 12:19 | IP: IP Logged

You are right, there is a problem. Thank you for step by step instruction, this is exactly what I needed.

Options: Reply | Quote | Up ^


#5 Re: Behavior when starting pspad with file name argument

Posted by: myf | Date: 2015-04-01 14:30 | IP: IP Logged

On related note: currently if you close PSPad instance that was opened via "Send to" after you close last file (ie empty), nothing is remembered and next time you start PSPad normally your desired "normal" session (with files) is restored.

Options: Reply | Quote | Up ^


#6 Re: Behavior when starting pspad with file name argument

Posted by: Andreas | Date: 2015-04-02 14:21 | IP: IP Logged

Also if ForceSaveWork=1 Recent.INI should not get rewritten when PSPad is closed and gets opened by double clicking a text file. Else all last opened files are gone.

Maybe best way is to open all last opened files even if PSPad is closed and gets opened by double clicking a text file and "Save Work / Desktop:" is set to "All opened files". I think it can not get handled other than that.

Imagin you have 5 open files.
Close PSPad.
Double click on a text file.
PSPad opened with this file.
PSPad only shows this file.
PSPad should not remember this file.
Double click on a second text file.
You now have 2 files open in PSPad.
Should they now get remembered and get written to [SaveWork]?
I think no, or they should get added to [SaveWork].

There's a setting "Save Work / Desktop:" - "In PSPad opened files only". I for one almost never open a file with PSPad->File->Open... So I have to set this option to "All opened files".

But then we have to make a distinction between different states when opening a text file by double click.
1. PSPad is closed
2. PSPad already is open

Sorry for long statement. Tried to be short and clear but it's not easy regarding this topic.

In short:
When "Save Work / Desktop:" is set to "All opened files" I think it will be best if PSPad opens all last opened files even if PSPad was closed and opened by double clicking a text file.

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