ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Clipboard Help+Spell

CHS: New Formatting Dialog

<< < (13/14) > >>

mouser:
I'm fairly sure it's mad about the commandline invocation with the %infile% name having spaces in it and not being double quoted.

In your arguments list, try putting double quotes around the %infile%, so its "%infile%"

rjbull:
I'm fairly sure it's mad about the commandline invocation with the %infile% name having spaces in it and not being double quoted.-mouser (November 13, 2011, 05:03 PM)
--- End quote ---

Still didn't work.  Essentially the same command line does work as a Text Filter in TED Notepad, using its %~S parameter for marked text, so either I haven't understood CHS's parameters correctly, or there's a significant difference in how the two programs handle STDIN/STDOUT, or both.  I found I could make it work by a minor cheat; wrapping the utility in a batch file.  The batch file is:
c:\dos\utils\mtrw.exe -q -n -w -o+ -b- -c- -i:"c:\Users\R.J. Bull\pcw\Spellchk\SPELC_MT.MT" C:\NoInst\ClipboardHelpAndSpell\tmpin.txt > C:\NoInst\ClipboardHelpAndSpell\tmpout.txt
and the matching CHS Preset configuration is as in the screenshot.

How does one delete a user-entered Preset, please?

I should add: you give four slots for search-and-replace pairs in CHS's standard presets, which is generous; that's the same as the payware version of Boxer Software's Text Monkey.  The advantage of using MiniTrue is that it's a freeware that gives you an essentially unlimited number of pairs, especially now it's available in Windows 32-bit form.  It's still a rather strange program, though.

mouser:
or there's a significant difference in how the two programs handle STDIN/STDOUT,
--- End quote ---

this would be my first guess.

could you do this: take the commandline that CHS would run, and run that manully under a dos window.  does it produce the right output?

and when you try to run it from CHS, what error does it give you?

rjbull:
could you do this: take the commandline that CHS would run, and run that manully under a dos window.  does it produce the right output?

and when you try to run it from CHS, what error does it give you?
-mouser (November 14, 2011, 03:23 PM)
--- End quote ---

Here's what I did, but it's getting my head in a spin.  Both these command lines - minor variations - work properly in a console window:


--- ---c:\DOS\Utils\mtrw.exe -q -n -w -o+ -b- -c- -i:SPELC_MT.MT test.txt > mod.txt

type test.txt | c:\DOS\Utils\mtrw.exe -q -n -w -o+ -b- -c- -i:SPELC_MT.MT >
mod.txt
So far, the batch file method in the earlier message seems to work perfectly.  It's the only one that does.  I also tried the following, to the point where I lost track of what I was doing:

---------

Using MT to change the file in-place:

Program/Script: c:\DOS\Utils\mtrw.exe

Arguments: -q -n -w -b- -c- -i:"c:\Users\R.J.
Bull\pcw\Spellchk\SPELC_MT.MT""%infile%"

Input: Create %inifile%

Output: Read from %inifile%

Returned:
Error RE-reading input file C:\NoInst\ClipboardHelpAndSpell\tmpin.txt (for tool
output, see tool config) -- nothing changed in file --  after tool run:
c:\DOS\Utils\mtrw.exe with params -q -n -w -b- -c- -i:"c:\Users\R.J.
Bull\pcw\Spellchk\SPELC_MT.MT""C:\NoInst\ClipboardHelpAndSpell\tmpin.txt"

---------

Using MT to change the file in-place, ignore outfile:

Program/Script: c:\DOS\Utils\mtrw.exe

Arguments: -q -n -w -b- -c- -i:"c:\Users\R.J.
Bull\pcw\Spellchk\SPELC_MT.MT""%infile%"

Input: Create %inifile%

Output: Ignore

Returned:
CHS reported Custom tool finished successfully, but it didn't do anything (no
changes)

---------

Using redirection to make a new file:

Program/Script: c:\DOS\Utils\mtrw.exe

Arguments: -q -n -w -o+ -b- -c- -i:"c:\Users\R.J. Bull\pcw\Spellchk\SPELC_MT.MT"
"%inifile%" > "%outfile%"

Input: Create %inifile%

Output: Read from %outfile%

Returned:
Error reading output file C:\NoInst\ClipboardHelpAndSpell\tmpout.txt after tool run:
c:\DOS\Utils\mtrw.exe with params -q -n -w -o+ -b- -c- -i:"c:\Users\R.J.
Bull\pcw\Spellchk\SPELC_MT.MT" "%inifile%" >
"C:\NoInst\ClipboardHelpAndSpell\tmpout.txt"

---------


As above but with redirection symbol wrapped in quotes, ">"

Returned:
Error reading output file C:\NoInst\ClipboardHelpAndSpell\tmpout.txt after tool run:
c:\DOS\Utils\mtrw.exe with params -q -n -w -o+ -b- -c- -i:"c:\Users\R.J.
Bull\pcw\Spellchk\SPELC_MT.MT" "%inifile%" ">"
"C:\NoInst\ClipboardHelpAndSpell\tmpout.txt"
---------

Reading from STDOUT;

Program/Script: c:\DOS\Utils\mtrw.exe

Arguments: -q -n -w -o+ -b- -c- -i:"c:\Users\R.J. Bull\pcw\Spellchk\SPELC_MT.MT"
"%inifile%"

Input: Create %inifile%

Output: Read from STDOUT

Returned:
ERROR: Previously launched tool is still running. Close that process before
continuing.

Had to kill process.  Later found an open and empty console window.

---------

Send on STDIN, Read from STDOUT

Program/Script: c:\DOS\Utils\mtrw.exe

Arguments: -q -n -w -o+ -b- -c- -i:"c:\Users\R.J. Bull\pcw\Spellchk\SPELC_MT.MT"

Input: Send on STDIN

Output: Read from STDOUT

Returned:
CHS reported Custom tool finished successfully, but it didn't do anything (no
changes)

---------

Repeat: the batch file method worked OK.  What have I missed?

mouser:

Using MT to change the file in-place..:
--- End quote ---

for this you should have told CHS to read output from input file.  that should work.

as for the failure to read from stdout -- i suspect the cause is chs failing to read stdout properly, i will look into it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version