IR.EXE feature request: Command line

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

johnsfine
Site Admin
Posts: 4766
Joined: Sun Aug 10, 2003 5:00 pm
Location: Bedford, MA
Contact:

IR.EXE feature request: Command line

Post 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).
ElizabethD
Advanced Member
Posts: 2348
Joined: Mon Feb 09, 2004 12:07 pm

Re: IR.EXE feature request: Command line

Post 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.
johnsfine
Site Admin
Posts: 4766
Joined: Sun Aug 10, 2003 5:00 pm
Location: Bedford, MA
Contact:

Post 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
ElizabethD
Advanced Member
Posts: 2348
Joined: Mon Feb 09, 2004 12:07 pm

Post 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.
johnsfine
Site Admin
Posts: 4766
Joined: Sun Aug 10, 2003 5:00 pm
Location: Bedford, MA
Contact:

Post 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.
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post 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.
Paul
johnsfine
Site Admin
Posts: 4766
Joined: Sun Aug 10, 2003 5:00 pm
Location: Bedford, MA
Contact:

Post 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.
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post 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....
Paul
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post by e34m5 »

Try it now..use any extension you want.
Paul
johnsfine
Site Admin
Posts: 4766
Joined: Sun Aug 10, 2003 5:00 pm
Location: Bedford, MA
Contact:

Post 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).
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post by e34m5 »

That's because to IR it looks like parameters in a command line. Let me try and trap that better.
Paul
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post 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.
Paul
Mark Pierson
Expert
Posts: 3017
Joined: Sun Aug 03, 2003 12:13 am
Location: Connecticut, USA
Contact:

Post 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.
Mark
johnsfine
Site Admin
Posts: 4766
Joined: Sun Aug 10, 2003 5:00 pm
Location: Bedford, MA
Contact:

Post 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.
e34m5
Posts: 675
Joined: Tue Oct 14, 2003 1:04 pm
Location: Atlanta

Post 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.
Paul
Post Reply