How to use the %1 mod. in associating Ed2 w/ txt files & mor

Questions & Answers

Moderators: fgagnon, nikos, Site Mods

Post Reply
Raymond Hubbard
New Member
Posts: 3
Joined: 2004 Sep 06, 19:41
Location: Tallahassee FL USA

How to use the %1 mod. in associating Ed2 w/ txt files &

Post by Raymond Hubbard »

Hello,
I've used 2xEditor as my default text-rendering app. for a couple of years now (but rarely use it) and prefer it to Notepad, of course. Now, owing to my setting up and updating a few friends' computers, I've discovered your updates to 2xEditor (Editor²) and 2xExplorer (Explorer2) and updated my computer, accordingly. Now, xplorer2 is my default file manager.
Though I've had no trouble using 2xEditor during this time, I've wondered about your emphatic instruction in the section "How to permanently associate Editor2 with text documents" of your editor2.txt information file to include %1 after the executable file name in WE's Tools|Folder Options/File Types/Open. I couldn't see how to do that, and never did use it, with my previous OS (98 SE), but it seemed to work ok for the normal, explanitory text files that accompany programs. But I didn't use any of the modifying commands, either. I tried a couple of times, and they never worked. Maybe that's because that modification (%1) wasn't in the association dialog. But then, to me your instructions for using the command-line commands are not clear. I still don't know how/where to put them or what the exact usage format is.
Now that I'm running XP Pro, I see that WE's Tools|Folder Options>File Types>Open dialog doesn't even have a place to make such a modification, unless it would be in .../New/File extension or .../New/Advanced/File extension. But, Windows says "Extensions are not allowed to contain spaces." in both of those when I put %1 after the executable file name. And I see nowhere to put it in 'Details for TXT extension>Open with'. Is this instruction obsolete for the current version of Editor? If not, how do I use this, where do I put it?
My second question is, where are the instructions for using Editor²? I don't see them among its download files, and the only information built into it is your editor2.txt file. It seems to me that this IS the Help/explanations. It discusses command-line commands/switches and lists some of them, maybe all, I don't know, but it doesn't explain how to use them. It appears that a few of them (F, L, P, S) are explained in Explorer's Quick Start Guide. I would like to know that in order to be able to specify the form of the date/time, at least, maybe more in files I create.
My third question is, do I need the UC version of Editor²? I am not a programmer/developer and don't expect to do any such work, most likely at all, but, in any case, not for quite a long time. The introduction to your current explanatory text file, Editor2.txt v.2.6.05, describes its currently updated features, but I still don't understand how I'd use the Unicode version, what I'd use it for. I have installed the UC version anyway because of your saying that it searches for mixed-language forms accurately, where the non-UC version doesn't. But I doubt that I'll ever need this. Who knows?
Before writing this, I searched your forums for %1 and got nothing relating to that; I got two discussions about unicode. Then I searched all forums for anything about unicode. This yielded a long list of disussions, which I haven't taken the time to read now. Perhaps I'll do that later.

Sincerely,
Raymond
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

@ ... how do I use ... where do I put it? -
The instructions lack a bit in clarity (as opposed to being outright obsolete for XP).

In XP-pro, from Control Panel | Folder Options /File Types\
select any extension which has a File Type of "Text Document"
click on Advanced
select the open Action & click Edit...
(or click New... to create a new Action e.g.: view, or edit)
and Browse to the location for Editor2 (or Editor2_UC)
then, in the Application used to perform action box, append the following, including quotes and a preceding space:
"%1" /P
( you can insert a /E or a /V switch to always open in edit mode or in view mode, if you wish. Otherwise, Editor² will open in the mode it was in when last closed.)

FYI - What I have set up for myself is -
an Action: view (my default)
"C:\Program Files\zabkat\xplorer2\editor2_UC.exe" "%1" /V /P
and an Action: edit
"C:\Program Files\zabkat\xplorer2\editor2_UC.exe" "%1" /E /P
... so both Actions are in the r-click context menu for Text Documents,
with view being the default, because that's what I want to do most with existing docs, and its easy enouigh to hit F6 in Editor² to change to Edit mode.
more FYI - The %1 is a command line variable which is replaced by the filename you have selected when you clicked on it to open/edit/view. The quotes around the %1 are necessary for the commandline interpretor to correctly recognize filenames with spaces in their path+name.

@ ... instructions for Editor² -
Sadly, they are lacking (you found all that there is). Because it's a very basic editor, I suspect nikos feels it needs no detail intructions; but certainly the kinds of questions you asked deserve a bit more elaboration than apears in editor2.txt or the x2 QuickStart Guide.

@ third question -
probably not; but the app size difference is minimal. So continue your own research & decide for yourself. :)
Raymond Hubbard
New Member
Posts: 3
Joined: 2004 Sep 06, 19:41
Location: Tallahassee FL USA

%1 in assoc. E2 w/ text files & docs

Post by Raymond Hubbard »

Hello,
Thank you very much for so quick a reply. I'm sorry that it's taken me this long to respond. I still have problems.
I did notice that Nikos did mention associating E2 with text documents, but I didn't realize that there was a distinction between 'Text document', which has the .exc extension, and a 'TXT File', which has the .txt extension, and which is what I've been trying to associate E2 with. Now I see that that's been my trouble. All of the directions you gave apply only to text documents, not to text files. I already had associated E2 with .txt files but without the %1. Those are the ones I was trying to learn how to append that argument (?) to--and still can't. Anyway, I have associated E2 with text documents using the %1 as you suggested but without the additional arguments--yet (I still may), though I still am not sure what effect that will have, as I never have encountered a .exc file.
I'm going to send this now and play with the rest of your recommendations later (I expect to spend much of tomorrow working on a friend's computer--I do very simple things, but they look like experience to a total, absolute newbie (this is a mouse, etc.)) in order to see how those things work. Again, thank you very much for your very helpful information. I never would have gotten it without it.

Sincerely,
Raymond
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

If the only file extension you want to associate with E2 are .TXT files, then the process is similar, except you would use the Change... button, upon having selected the TXT Extension.
At that point, if you have already installed x2 with E2, then Lightweight notepad replacement (a.k.a. Editor²) should be one of the recommended programs to choose from. If not, you can browse to it as before.

Then go back and append "%1" /P to the commandline as before. :)

Doing this would open only .TXT files with E2, whereas doing the former causes open with E2 to apply to ALL Text Document file extensions.
As you can see, there's a lot of opportunity for customising file associations by individual extension as well as by groups of extensions. (& a lot of confusion arising from having so many choices ;) )
And if you want to return .TXT files to the generic Text Document group, then use the Restore button (located on the File Types tab where the Advanced button had been).
Raymond Hubbard
New Member
Posts: 3
Joined: 2004 Sep 06, 19:41
Location: Tallahassee FL USA

that %1 in .txt files again

Post by Raymond Hubbard »

> should be one of the recommended programs to choose from. If not, you can browse to it as before. Then go back and append "%1" /P to the commandline as before.

Here's the problem. I see nowhere to do this. I clicked Change many times (always thinking I must have missed something), but the only thing that comes up is the program selection box. Lightweight notepad replacement is there since I'd assigned it to .txt before. But there is no other adjustment that I can see, no place that it displays the argument and therefore nowhere to modify it. It's simply a selection box.
I did assign E2 to all text documents, with the %1 argument, after reading your description, so I suppose that .txt docs come up via E2 (they do come up with E2; I've long since checked that) with that modification anyway (this part I haven't checked and am not sure how to). Still, I would like to know how to assign it exclusively to .txt files (assuming I hadn't already assigned all text docs to it), although, at this point, it's more for my edification than of necessity.

> And if you want to return .TXT files to the generic Text Document group, then use the Restore button (located on the File Types tab where the Advanced button had been).
I assumed this from the beginning, and still assume that I can restore it to Notepad that way. But thanks for the instruction.
Btw, I downloaded both versions of both programs because I wasn't sure which version of E2 I should use, and I wanted to try to learn the advantages of x2 Pro. I stored them all separately, in their own folders for my easy understanding of where they are, assuming tha x2 still will be able to use E2. Please correct me if this is wrong.
Thanks again, for this continuing help.
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

sorry, I misspoke. :oops:
XP just tries to take care of it as best it knows how for that case.
No further user adjustment that I see, either. :(
Post Reply