a new feature to skip initial dialog

Main development forum.

a new feature to skip initial dialog

Postby equinox4 » Sun Dec 21, 2008 4:08 pm

Hi,

I use command line to start Winmerge and I also specify what files to compare in there.
However, to my surprise, at the beginning , a dialog comes up ( where one can see what is compared )where I have to press ok to actually
start the comparison.
Is there a way to avoid that initial dialog?

If not, I recommend to create a command line switch which if it exists, would mean that the initial dialog should not appear.

E.g. there could be a switch /nfd (no filenames dialog)

I implement it myself very possibly.
equinox4
 
Posts: 3
Joined: Sun Dec 21, 2008 4:05 pm

Re: a new feature to skip initial dialog

Postby kimmov » Sun Dec 21, 2008 8:17 pm

equinox4 wrote:Hi,

I use command line to start Winmerge and I also specify what files to compare in there.
However, to my surprise, at the beginning , a dialog comes up ( where one can see what is compared )where I have to press ok to actually
start the comparison.
Is there a way to avoid that initial dialog?


Give valid paths from command line then the dialog is not shown. It is only shown when both or other of the paths is invalid.

Reference: ShellIntegration starts WinMerge using command line and there is no Open-dialog shown when you select two paths from explorer...
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: a new feature to skip initial dialog

Postby equinox4 » Mon Dec 22, 2008 11:28 am

Hi.

The paths are valid. Why do I know that? Because all I have to do is to press OK, it goes on without a problem.
Here it is what I use (Freepascal):
Process1.CommandLine:='C:\Programs\WinMerge\WinMergeu.exe '+'/e '+baseline
+' '+ListBox1.GetSelectedText;

I also tried
shellExecute(self.Handle,'open','C:\Programs\WinMerge\WinMergeu.exe',pchar('/e '+baseline
+' '+ListBox1.GetSelectedText),nil, SW_SHOWNORMAL);
The same result..

It is true that it runs as you say it in cmd shell.
Have I found a bug?
equinox4
 
Posts: 3
Joined: Sun Dec 21, 2008 4:05 pm

Re: a new feature to skip initial dialog

Postby equinox4 » Mon Dec 22, 2008 2:09 pm

Ok, the command line contained EOL characters after each filename.

I do not know if winmerge should handle those too.
It is clear because of them, the filenames were recognised but the comparison did not start ,bringing up the initial dialog.
equinox4
 
Posts: 3
Joined: Sun Dec 21, 2008 4:05 pm

Re: a new feature to skip initial dialog

Postby kimmov » Mon Dec 22, 2008 2:56 pm

equinox4 wrote:Ok, the command line contained EOL characters after each filename.

I do not know if winmerge should handle those too.


Great that you found the cause of the problem! WinMerge should definitely strip any control characters from command line it gets. Nobody has just thought about this (or had this problem) before.. I didn't know it even was possible to give EOL chars to command line...
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: a new feature to skip initial dialog

Postby kimmov » Mon Dec 22, 2008 3:06 pm

Submitted a new bug report about removing control chars from command line:
#2458728 Need to remove control chars from command line
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: a new feature to skip initial dialog

Postby kimmov » Mon Dec 29, 2008 2:04 pm



FYI, fix for EOL bytes in command line was committed to both trunk and both branches (2.10 and 2.12) so future WinMerge versions will strip EOL bytes.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland


Return to Developers

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

cron