Page 1 of 2
IR.EXE feature request: Command line
Posted: Tue Aug 31, 2004 7:03 am
by johnsfine
1) Now that IR.EXE files have a fairly unique extension (.ir instead of .txt) it would be nice to be able to double click a .ir file and have IR.EXE start up and open it.
One can easily associate the extension .ir with the program IR.EXE (just double click a .ir file, and when Windows tells you it doesn't know how to open that it lets you browse to the right .exe). Then Windows will pass the .ir filename to IR.EXE as a command line argument.
IR.EXE seemns to ignore that command line argument and starts, but doesn't open the file.
2) There is an IR.EXE feature I've asked for, gotten, and lost again a few times as IR.EXE has evolved. When I've had it, it has been an important part of QAing DecodeIR.DLL, so that as I add new decode abilities I don't accidently break old ones. So far as I know this feature has been gone again for quite a while.
I want a way for IR.EXE to be started from a .bat file and open a specified input file (.txt or .ir), prepare a summary sheet including decodes of learned signals, write the summary sheet to an output file and then exit.
It should do that when it gets some command line more than just the .ir filename, such as getting two filenames as arguments (or a command line switch or however you prefer to do it. I care about the feature not the syntax).
Re: IR.EXE feature request: Command line
Posted: Tue Aug 31, 2004 8:33 pm
by ElizabethD
johnsfine wrote: I want a way for IR.EXE to be started from a .bat file and open a specified input file (.txt or .ir), prepare a summary sheet including decodes of learned signals, write the summary sheet to an output file and then exit.
John, are you planning to use the sumary file just to look at or do you intend to use it as source data file to some process other than visual inspection?
If latter, I might piggyback a suggestion for a related, minor change.
Posted: Wed Sep 01, 2004 4:59 am
by johnsfine
I want to run a diff program (actually winMerge) to compare a directory full of summary files to a directory of the same summarys as produced by a different version of DecodeIR.dll
Posted: Wed Sep 01, 2004 7:59 am
by ElizabethD
John, may I assume we're refering the same File;Summary feature?
I have an interest in format of data there, so I'll post a separate request. It should have no impact on your plans.
Posted: Wed Sep 01, 2004 9:06 am
by johnsfine
ElizabethD wrote:John, may I assume we're refering the same File;Summary feature?
Right.
ElizabethD wrote:I have an interest in format of data there, so I'll post a separate request. It should have no impact on your plans.
I'll be interested to see what you have in mind.
Hopefully someone who can preogram in Delphi will also look at these requests.
Posted: Thu Sep 02, 2004 11:43 am
by e34m5
Try
this version IR513Beta
The command line is like this
ir.exe
inputfilename p
destinationfilename
The
p flag is to instruct IR to print the summary out the destination file. Without the
p it will just open the file and display the summary page.
Notice that the
inputfilename and destinationfilename should be fully qualified. However do not use any extension on the destination file name. I am using a .smy extension so as to not accidentally overwrite a .txt with the same name.
This is the first shot so we can tweak it any way you want.
Posted: Thu Sep 02, 2004 1:41 pm
by johnsfine
That pretty much gets the job done.
When you just double click a .ir file to open it, I don't think it should open the summary sheet. It should be just like starting IR and then using file/open.
I'm not thrilled with IR.EXE appending .smy to the output filename. I'd prefer to have my .bat file in control of that. But it's not a big deal.
Thanks.
Posted: Thu Sep 02, 2004 1:59 pm
by e34m5
Ok..I'll make so you can append whatever extension. I need to see why it opens the summary when you double click. I'm sure I did something dumb.
Stand by....
Posted: Thu Sep 02, 2004 2:21 pm
by e34m5
Try it now..use any extension you want.
Posted: Thu Sep 02, 2004 3:34 pm
by johnsfine
It no longer adds the ".smy". Thanks.
It still opens the summary page when I just double click a .ir file (which uses a registry entry to run IR.EXE and pass it the file name as a single command line argument).
Posted: Thu Sep 02, 2004 6:27 pm
by e34m5
That's because to IR it looks like parameters in a command line. Let me try and trap that better.
Posted: Fri Sep 03, 2004 4:49 pm
by e34m5
John, try it now.
Elizabeth, I added and Export to file button on the summary screen. Let mw know if that's what you want. Striaght text with all other junk stripped.
Posted: Fri Sep 03, 2004 8:39 pm
by Mark Pierson
e34m5 wrote:Striaght text with all other junk stripped.
That just leaves one big block of unusable text.
The individual fields need to be tab-delimited and each row needs to terminate with a carriage return to make it useful for importing into other apps.
Posted: Sat Sep 04, 2004 5:53 am
by johnsfine
e34m5 wrote:John, try it now.
It still does the same thing. Are we clear on what issue we're discussing?
There is no problem with the operation using the command syntax
ir.exe input_file p output_file
It opens the input, generates the summary to the output and exits, just as I wanted.
There is a minor isuue using the command
ir.exe input_file
That is the command Windows uses if you associate the .ir extension with ir.exe and then double click a .ir file.
That ought to just open the input. Instead it opens the input and opens the summary sheet.
Posted: Sat Sep 04, 2004 7:25 am
by e34m5
johnsfine wrote:
That is the command Windows uses if you associate the .ir extension with ir.exe and then double click a .ir file.
That ought to just open the input. Instead it opens the input and opens the summary sheet.
I can't replicate this. On my PC it just opens the file....
What is the minor probelm you refer to.
I was able to import to Excel the output from the summary page with no problems...so I am still at a loss to understand. Maybe you can create a text file and loaded into the diagnostics for me to see what you guys want.