Author Topic: External programm with parameter or DDE?  (Read 5335 times)

0 Members and 1 Guest are viewing this topic.

webazubi

  • Member
  • **
  • Posts: 17
    • View Profile
External programm with parameter or DDE?
« on: 2019-08-28 21:47:46 »
Hello.
I want to start an external program (bat-File) from thumbs. Is it possible to put a parameter after the order test.bat?
Like test.bat /xxx

In the batch file I want to read the paramter like
echo %2 or something.

I tried to write a parameter in the thumbs10.ini-file after the external programm-order, but it doesn't work.

Maybe it is possible to solve it with the DDE-Options in Thumbs? I don't know how DDE works. The help says only, how Thumbs works, when DDE comes. But how can thumbs send a DDE-order to an extrernal batch with parameter?
Thanks

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 933
    • View Profile
Re: External programm with parameter or DDE?
« Reply #1 on: 2019-08-29 06:13:47 »
Hello.
I want to start an external program (bat-File) from thumbs. Is it possible to put a parameter after the order test.bat?
Like test.bat /xxx

In the batch file I want to read the paramter like
echo %2 or something.

ThumbsPlus passes the names of selected files as parameters to the batchfile. When no files have been selected, it will (or won't, depending on settings) pass the folder name instead. So, a command like ECHO %2 will echo the name of the second file that was selected. I don't know what will happen when you put other parameters on the command line, but it wouldn't surprise me if those are ignored (but then, what purpose would they serve? You cannot specify any variable there. If you want to make the batch file say 'XXX', just put 'ECHO XXX' in it and don't worry about command line options).

As for DDE, I don't think batch files have a DDE interface.
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

webazubi

  • Member
  • **
  • Posts: 17
    • View Profile
Re: External programm with parameter or DDE?
« Reply #2 on: 2019-08-29 14:29:57 »
Hello.
The reason for the wanted parameter is that I have a lot of scanned dia. For a presentation, some dia has to be turned and mirrored. But at the end I want to know, how the dia was in original turned and mirrored.
So I start a batch file with the images als Parameter, where I
1) type the orientation-number (1-8),
2) then a txt-file will created with the exif-information from the file
3) with exiftool, the image will be turned oder mirrored
4) after that the txt-file becomes the new orientation-value.

With a parameter like 1 or 8 after the batch-order, I could make buttons for turning and must not type manually the number for the orientation.
I also thought about a second batch file that gives the paramter, but I hoped there was a easier / quicker way.
Hoping for Version 11!

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 933
    • View Profile
Re: External programm with parameter or DDE?
« Reply #3 on: 2019-08-29 15:21:35 »
That looks like a rather complicated approach.

I have no further suggestions if that's how you want to do it, but did you know that if the scanned slides are in JPEG format, you can rotate and flip them losslessly in ThumbPlus (Image | Quick Process)?  Or, if you want to maintain their as-scanned orientation, you can rotate and flip just their thumbnail in the database (Thumbnail | Orient), and then run a slideshow in which the thumbnail orientation is used to display the slide correctly (Options | Viewing | Other | Use database thumbnail orientation when displaying images). I didn't test that, but it should work.
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

webazubi

  • Member
  • **
  • Posts: 17
    • View Profile
Re: External programm with parameter or DDE?
« Reply #4 on: 2019-08-30 19:58:05 »
>rotate and flip them losslessly in ThumbPlus
Yes, but then I have no protocol  or log file about the action I made. The way 1. click on Batch to make protocol, 2. rotate and 3. batch again for protocol seems to be longer then rotating and flipping (!) with exiftool. But I try that. Now with the batch, it takes about 10 sec for 1 image (old slow PC).

>rotate and flip just their thumbnail in the database
Thats a very good hint. But for the endversion, I think it would be better to place an save the orientations in Exif-Fields than in the database. The scans are for an archive, and maybe in 100 Years, jpg lives but Thumbs-DB not :-(

Possible is also to make a protocol about the diffrence between Exif- and Thumbs-Orientation.
When a thumbs ist rotated, it seems that this information is saved in the database as a new file type. In the table "Thumbnail", all jpgs have normal the number 8 (in my sytem) as filetype. When I rotate the thumb, the Filetype change to 56 (for 180° Rotation) or 24 for 90°. Maybe I can save the original orientation from Exif in a user-field and compare it with the Filetype. That result I could export to a txt-file, that maybe in 500 years can be read :-)
Or I export the result to exiftools and let the PC set the new orientations in exif-field from the database over 1-2 nights.
« Last Edit: 2019-08-30 20:02:59 by webazubi »

webazubi

  • Member
  • **
  • Posts: 17
    • View Profile
Re: External programm with parameter or DDE?
« Reply #5 on: 2019-08-31 05:35:24 »
Hallo. Another problem:
>rotate and flip them losslessly in ThumbPlus
Where saves Thumbs the information about flipping or rotating a image (not the thumbs)? Seems to be not in Exif-Field.

Example:
I have a normal orientated image (top-left). Then I cklick in Thumbs IMAGE-QUICK PROCESS-TURN 90 CW.
Result: The image ist rotated, but the Exif-Field has not changed: top-left.

If I open this image in Photoshop, the File-Information says also "normal" for the orientation, but the image was opened in Photoshop correctly rotated.
So where is the rotated  information saved?
Thanks

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 933
    • View Profile
Re: External programm with parameter or DDE?
« Reply #6 on: 2019-08-31 11:29:56 »
The actual pixels in the image have been rearranged to rotate it. So, the orientation remains top-left.
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.