Not seen the DOS black screen

Started by evilaro, September 19, 2010, 03:17:41 PM

Previous topic - Next topic

evilaro

Hi:

When I execute exiftool.exe I see the DOS black screen.

If I add the -q parameter I do not see the message, still I see
the black screen.

Is there a possibility of not seen it?

Thanks

emilio [evilaro]
www.evilfoto.eu
*************

Phil Harvey

Did you check all of the Properties settings?  I can't check now, but there may be a Windows Property to keep the cmd window hidden.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

evilaro

Thanks Phil:

Yes there is API way to do it.

Emilio


Quote from: Phil Harvey on September 19, 2010, 03:50:56 PM
Did you check all of the Properties settings?  I can't check now, but there may be a Windows Property to keep the cmd window hidden.

- Phil
www.evilfoto.eu
*************

Phil Harvey

Some more details may be useful in case people may want to do this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

evilaro

Phil:

I should have state it better...

I can do it using this function that works with dBASE PLUS
which is the program I use to do the aplication.

Still I feel all this hidding in DOS is very complicated

It should be a RUN/invisible exiftool  ;)

I am putting the function here, it might give a idea.

Emilio [evilaro]




function RunHidden(cDOScommands,cBatchfile)
// Example: RunHidden("copy test1.txt LPT1"+chr(13)+chr(10)+"copy test2.txt LPT1")
*/
   #define SW_HIDE         0
   local nCommands, cType, nMessage
   if((argCount()<2).or.(empty(cBatchfile)))
     cBatchfile = "Junk.bat"
   endif
   //
   // Find the number of commands to enter in the batch file ......................
   cType = type("Argvector(1)")
   if(cType = "A")
     nCommands = ALEN(cDOScommands,1)
   elseif(cType = "C")
      if(empty(cDOScommands))
         nMessage=msgbox("Empty Command. Operation Abandoned.","Alert",0+16)
         return
      endif
      nCommands = 1
   else
      nMessage=msgbox("False Command format. Operation Abandoned.","Alert",0+16)
      return
   endif

   // Pass commands in the batch file .............................................
   nH = fcreate(cBatchfile)
   for i=1 TO nCommands
       if (cType="A")
          if (not empty(cDOScommands))
             fputs(nH,cDOScommands)
          endif
       elseif(cType="C")
          fputs(nH,cDOScommands)
       endif
   endfor
   fclose(nH)

   if (type("WinExec") # "FP")
      extern CWORD WinExec(CSTRING, CUINT) Kernel32
   endIf

   WinExec(cBatchfile+Chr(0), SW_HIDE)
return
// -- eof: RunHidden()



Quote from: Phil Harvey on September 20, 2010, 11:17:27 AM
Some more details may be useful in case people may want to do this.

- Phil
www.evilfoto.eu
*************

evilaro

Hello:

I have received this sugestion to execute exiftool (or any other executable)
without seen the black DOS screen.
It works very nicelly and also with more complex parameters.

I hope it helps...

Emilio [evilaro]

     mxffff='Myimage.jpg'
     os = new oleautoclient("Wscript.shell")
     os.run('cmd /K exiftool.EXE  "&mxffff" > C:\aaaa\exif.txt  & Exit', 0, false)

   
www.evilfoto.eu
*************