INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: external program run multiple times when multiple files are selected  (Read 3088 times)

robydago

  • Citizen of the Universe
  • *****
  • Posts: 518

If i remember correctly, when you send a selection of 'n' files to an external tool\program, the exe or bat set in the "program path" field is executed 'n' times with each single [Filename] passed as a paramter. In this way I get either 'n' multiple instances of the external program running at the same time or 'n' invocations (run\exit) of the same external program.

I think that it would be useful if there was an option to run the external program only once, even when multiple files are selected in MC. To pass all files to the external program, MC could create a temporary text file containing all file names (one for line) and than pass to the external program only this temp file as a parameter.

Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: external program run multiple times when multiple files are selected
« Reply #1 on: June 30, 2008, 12:56:47 pm »

I got this working with autohotkey scripts which allow for singleinstances.

right click a bunch of files, send to external, only one call made  ;D
Logged

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Re: external program run multiple times when multiple files are selected
« Reply #2 on: November 14, 2008, 03:55:13 am »

Hi,

hit_ny, I'm Interested as how you did this.

I am trying to configure MC external tools for AutoPano (a great panoramic tool). What I want is to select a number of images, do RMC>Send to Autopano and have a single execution of Autopano on all selected images, so that it can actually process my pano.

Currently I have the Parameters set to "[Filename]" but it spawn multiple copies of autopano on single files which is wrong.

What is the trick ??

Thanks,

Christian
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Re: external program run multiple times when multiple files are selected
« Reply #3 on: November 14, 2008, 04:11:29 am »


I just tried stacking the files in the hope that the external tool will run once on all files of the stack. But No !
It just runs on the top file of the stack.

I investigated the autohotkey trick suggested by hit_ny but it involves digging into yet another external tool which is not really practical to solve this simple case.

-C
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: external program run multiple times when multiple files are selected
« Reply #4 on: November 14, 2008, 03:05:25 pm »

Is there a need to select all the files before calling auotpano ?

If all the desired files are in the same directory then what if you select just one file, can your program pick up the rest.
Logged

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Re: external program run multiple times when multiple files are selected
« Reply #5 on: November 15, 2008, 07:11:13 am »

Is there a need to select all the files before calling auotpano ?

That's certainly a good question. I tried it and the answer is yes !
Autopano will not automatically scan the folder for other images. The reason is that there might be hundreds of other images composing different panos in the same folder.
In fact, once in autopano you can dig into some commands to actuallly search and load the other images but that defeats the purpose of selecting the images within MC. I could better just launch autopano on its own for that.

BTW I tried your suggestion of using autohotkey with #singleinstance for autopano but that does not really work.
What it does is to open a single instance of autopano (what I'm seeking) but loads each file in a separate pano project instead of a single one which give even more work to assemble the images.
But I have just discovered autohotkey after reading your post, so I'm a real newbie here.

Anyway, I really think that an option in MC to open several files with a single instance of an external tool as requested by the Original poster, would really be useful here.

Thanks and have a fine week-end,

-C
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: external program run multiple times when multiple files are selected
« Reply #6 on: November 16, 2008, 01:17:39 am »

OK, can you come up with the cmd line for auotpano to load only the desired images into a single project.

might be something like

autopano <some option> image1.jpg image2.jpg image3.jpg

Your requirement is little different than what i was using autohotkey for but i think it can be done :)
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: external program run multiple times when multiple files are selected
« Reply #7 on: November 18, 2008, 01:37:08 am »

or failing that, if you open autopano yourself, can you drag and drop from MC to autopano?

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Re: external program run multiple times when multiple files are selected
« Reply #8 on: November 18, 2008, 05:23:59 am »

or failing that, if you open autopano yourself, can you drag and drop from MC to autopano?

Yes Marko, that is possible and in fact is what I'm doing currently for autopano

-Select the first image of my pano
-Run External tool (autopano)
-Drag the other images from MC to autopano

I was just hoping for a single selection of multiple images in order to satisfy my natural laziness  :) BTW this would be useful in the case of stacked images I guess.

Thanks

-C
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)
Pages: [1]   Go Up