Loading ...
Sorry, an error occurred while loading the content.

enfuse windows VB app

Expand Messages
  • Alan Pinstein
    I put together a simple VB app for drag-n-drop enfuse goodness. Just take the code below, correct the ENFUSE path to your enblend.exe, and save it as
    Message 1 of 15 , Jan 4, 2008
    • 0 Attachment
      I put together a simple VB app for drag-n-drop enfuse goodness.

      Just take the code below, correct the ENFUSE path to your
      enblend.exe, and save it as enfuse-dropper.vbs. You can now drag-n-
      drop multiple images onto the VBS, name your output file, and get the
      result instantly. It's a time-saver vs going to the command line.

      Enjoy,
      Alan

      ENFUSE = "C:\Documents and Settings\Stuart\Desktop\enblend-3.1\enfuse"

      Set arguments = WScript.Arguments

      ' make sure files were dropped
      If arguments.Count = 0 Then
      WScript.Echo "Drop the input image files onto the icon to start."
      WScript.Quit 1
      End If

      ' determine the directory of the input files
      outputDirectory = GetDirectoryOfFile( arguments(1) )

      outputFile = """" & outputDirectory & UserInput("Name the output file
      (will be in directory " & outputDirectory & "):", "Output File Name",
      "output.jpg") & """"

      enfuseInputFiles = ""
      For I = 0 to arguments.length - 1
      enfuseInputFiles = enfuseInputFiles & " """ & arguments(I) & """"
      Next

      enfuseCommand = """" & ENFUSE & """ -v -o " & outputFile & " " &
      enfuseInputFiles

      set WshShell = WScript.CreateObject("WScript.Shell")
      WshShell.Run enfuseCommand


      Function UserInput( myPrompt, title, defaultAnswer )
      ' This function prompts the user for some input.
      ' When the script runs in CSCRIPT.EXE, StdIn is used,
      ' otherwise the VBScript InputBox( ) function is used.
      ' myPrompt is the the text used to prompt the user for input.
      ' The function returns the input typed either on StdIn or in InputBox
      ( ).
      ' Written by Rob van der Woude
      ' http://www.robvanderwoude.com
      ' Check if the script runs in CSCRIPT.EXE
      If UCase( Right( WScript.FullName, 12 ) ) = "\CSCRIPT.EXE" Then
      ' If so, use StdIn and StdOut
      WScript.StdOut.Write myPrompt & " "
      UserInput = WScript.StdIn.ReadLine
      Else
      ' If not, use InputBox( )
      UserInput = InputBox( myPrompt, title, defaultAnswer )
      End If
      End Function

      Function GetDirectoryOfFile(path)
      GetDirectoryOfFile = Left(path, InStrRev(path, "\"))
      End Function
    • Alan Pinstein
      Hmm.. that got wrapped really bad. I ve posted it online: http://tourbuzz.net/www/enfuse.vbs Regards, Alan ... [Non-text portions of this message have been
      Message 2 of 15 , Jan 4, 2008
      • 0 Attachment
        Hmm.. that got wrapped really bad. I've posted it online:

        http://tourbuzz.net/www/enfuse.vbs

        Regards,
        Alan

        On Jan 4, 2008, at 4:13 PM, Alan Pinstein wrote:

        > I put together a simple VB app for drag-n-drop enfuse goodness.
        >
        > Just take the code below, correct the ENFUSE path to your
        > enblend.exe, and save it as enfuse-dropper.vbs. You can now drag-n-
        > drop multiple images onto the VBS, name your output file, and get the
        > result instantly. It's a time-saver vs going to the command line.
        >
        > Enjoy,
        > Alan
        >
        > ENFUSE = "C:\Documents and Settings\Stuart\Desktop\enblend-3.1\enfuse"
        >
        > Set arguments = WScript.Arguments
        >
        > ' make sure files were dropped
        > If arguments.Count = 0 Then
        > WScript.Echo "Drop the input image files onto the icon to start."
        > WScript.Quit 1
        > End If
        >
        > ' determine the directory of the input files
        > outputDirectory = GetDirectoryOfFile( arguments(1) )
        >
        > outputFile = """" & outputDirectory & UserInput("Name the output file
        > (will be in directory " & outputDirectory & "):", "Output File Name",
        > "output.jpg") & """"
        >
        > enfuseInputFiles = ""
        > For I = 0 to arguments.length - 1
        > enfuseInputFiles = enfuseInputFiles & " """ & arguments(I) & """"
        > Next
        >
        > enfuseCommand = """" & ENFUSE & """ -v -o " & outputFile & " " &
        > enfuseInputFiles
        >
        > set WshShell = WScript.CreateObject("WScript.Shell")
        > WshShell.Run enfuseCommand
        >
        > Function UserInput( myPrompt, title, defaultAnswer )
        > ' This function prompts the user for some input.
        > ' When the script runs in CSCRIPT.EXE, StdIn is used,
        > ' otherwise the VBScript InputBox( ) function is used.
        > ' myPrompt is the the text used to prompt the user for input.
        > ' The function returns the input typed either on StdIn or in InputBox
        > ( ).
        > ' Written by Rob van der Woude
        > ' http://www.robvanderwoude.com
        > ' Check if the script runs in CSCRIPT.EXE
        > If UCase( Right( WScript.FullName, 12 ) ) = "\CSCRIPT.EXE" Then
        > ' If so, use StdIn and StdOut
        > WScript.StdOut.Write myPrompt & " "
        > UserInput = WScript.StdIn.ReadLine
        > Else
        > ' If not, use InputBox( )
        > UserInput = InputBox( myPrompt, title, defaultAnswer )
        > End If
        > End Function
        >
        > Function GetDirectoryOfFile(path)
        > GetDirectoryOfFile = Left(path, InStrRev(path, "\"))
        > End Function
        >
        >
        >



        [Non-text portions of this message have been removed]
      • Aaron Spence
        G day Alan, Works great, thanks. Aaron. www.panedia.com
        Message 3 of 15 , Jan 4, 2008
        • 0 Attachment
          G'day Alan,

          Works great, thanks.

          Aaron.
          www.panedia.com
        • Ricardo Araujo
          I didn t try it yet, but thank you Alan! acessar o site ... [Non-text portions of this message have been removed]
          Message 4 of 15 , Jan 4, 2008
          • 0 Attachment
            I didn't try it yet, but thank you Alan!

            acessar o site <http://www.tourvirtualbrasil.com.br>


            Alan Pinstein escreveu:
            >
            > Hmm.. that got wrapped really bad. I've posted it online:
            >
            > http://tourbuzz.net/www/enfuse.vbs <http://tourbuzz.net/www/enfuse.vbs>
            >
            > Regards,
            > Alan
            >
            > On Jan 4, 2008, at 4:13 PM, Alan Pinstein wrote:
            >
            > > I put together a simple VB app for drag-n-drop enfuse goodness.
            > >
            > > Just take the code below, correct the ENFUSE path to your
            > > enblend.exe, and save it as enfuse-dropper.vbs. You can now drag-n-
            > > drop multiple images onto the VBS, name your output file, and get the
            > > result instantly. It's a time-saver vs going to the command line.
            > >
            > > Enjoy,
            > > Alan
            > >
            > > ENFUSE = "C:\Documents and Settings\Stuart\Desktop\enblend-3.1\enfuse"
            > >
            > > Set arguments = WScript.Arguments
            > >
            > > ' make sure files were dropped
            > > If arguments.Count = 0 Then
            > > WScript.Echo "Drop the input image files onto the icon to start."
            > > WScript.Quit 1
            > > End If
            > >
            > > ' determine the directory of the input files
            > > outputDirectory = GetDirectoryOfFile( arguments(1) )
            > >
            > > outputFile = """" & outputDirectory & UserInput("Name the output file
            > > (will be in directory " & outputDirectory & "):", "Output File Name",
            > > "output.jpg") & """"
            > >
            > > enfuseInputFiles = ""
            > > For I = 0 to arguments.length - 1
            > > enfuseInputFiles = enfuseInputFiles & " """ & arguments(I) & """"
            > > Next
            > >
            > > enfuseCommand = """" & ENFUSE & """ -v -o " & outputFile & " " &
            > > enfuseInputFiles
            > >
            > > set WshShell = WScript.CreateObject("WScript.Shell")
            > > WshShell.Run enfuseCommand
            > >
            > > Function UserInput( myPrompt, title, defaultAnswer )
            > > ' This function prompts the user for some input.
            > > ' When the script runs in CSCRIPT.EXE, StdIn is used,
            > > ' otherwise the VBScript InputBox( ) function is used.
            > > ' myPrompt is the the text used to prompt the user for input.
            > > ' The function returns the input typed either on StdIn or in InputBox
            > > ( ).
            > > ' Written by Rob van der Woude
            > > ' http://www.robvanderwoude.com <http://www.robvanderwoude.com>
            > > ' Check if the script runs in CSCRIPT.EXE
            > > If UCase( Right( WScript.FullName, 12 ) ) = "\CSCRIPT.EXE" Then
            > > ' If so, use StdIn and StdOut
            > > WScript.StdOut.Write myPrompt & " "
            > > UserInput = WScript.StdIn.ReadLine
            > > Else
            > > ' If not, use InputBox( )
            > > UserInput = InputBox( myPrompt, title, defaultAnswer )
            > > End If
            > > End Function
            > >
            > > Function GetDirectoryOfFile(path)
            > > GetDirectoryOfFile = Left(path, InStrRev(path, "\"))
            > > End Function
            > >
            > >
            > >
            >
            > [Non-text portions of this message have been removed]
            >
            >
            > ------------------------------------------------------------------------
            >
            > No virus found in this incoming message.
            > Checked by AVG Free Edition.
            > Version: 7.5.516 / Virus Database: 269.17.13/1208 - Release Date: 3/1/2008 15:52
            >


            [Non-text portions of this message have been removed]
          • Jim Watters
            Alan, Thank you. Works like a charm. Jim ... -- Jim Watters Yahoo ID: j1vvy ymsgr:sendIM?j1vvy jwatters @ photocreations . ca http://photocreations.ca
            Message 5 of 15 , Jan 4, 2008
            • 0 Attachment
              Alan,

              Thank you. Works like a charm.

              Jim
              > Alan Pinstein escreveu:
              >
              >> Hmm.. that got wrapped really bad. I've posted it online:
              >>
              >> <http://tourbuzz.net/www/enfuse.vbs>
              >>
              >> Regards,
              >> Alan
              >>
              >> On Jan 4, 2008, at 4:13 PM, Alan Pinstein wrote:
              >>
              >>
              >>> I put together a simple VB app for drag-n-drop enfuse goodness.
              >>>
              >>> Just take the code below, correct the ENFUSE path to your
              >>> enblend.exe, and save it as enfuse-dropper.vbs. You can now drag-n-
              >>> drop multiple images onto the VBS, name your output file, and get the
              >>> result instantly. It's a time-saver vs going to the command line.
              >>>
              >>> Enjoy,
              >>> Alan
              >>>


              --
              Jim Watters

              Yahoo ID: j1vvy ymsgr:sendIM?j1vvy
              jwatters @ photocreations . ca
              http://photocreations.ca
            • Flemming V. Larsen
              ... From: Alan Pinstein ... This works fine - much like the window-batchscript. But I d like the same performance as the extended batch-script Erik Krause
              Message 6 of 15 , Jan 5, 2008
              • 0 Attachment
                ----- Original Message -----
                From: "Alan Pinstein"


                > Hmm.. that got wrapped really bad. I've posted it online:
                >
                > http://tourbuzz.net/www/enfuse.vbs
                >

                This works fine - much like the window-batchscript.
                But I'd like the same performance as the extended batch-script Erik Krause
                wrote on my request:

                --snip
                @echo off
                %~d1
                cd %~p1
                :loop
                c:\enfuse\enfuse -w -o "%~n1_blended.tif" %1 %2 %3
                shift
                shift
                shift
                if exist %1 goto :loop
                --snap

                With this script I can drop more sets of bracket shots and have it "Enfused"
                3 by 3.
                But it has some restriction with a maximum lengths of the command line - so
                I can't drop a full directory with hundreds of shots on it. Depending on the
                filesnames I can only do around 50 files at a time.

                Could this be done without the restrictions using vbscript?

                It should work like this:
                1. Drop a directory of bracket shot over the icon.
                2. The script generates an array-list of the filenames.
                3. A pop-message ask you to set the numbers of shots to blend in each run
                (eg. 3 )
                4. Another pop-message ask you for the output path/name.
                5. Enfuse run through the bracket-sets and save the output files with seq.
                numbers until all is done.

                Best regards

                Flemming
              • Alan Pinstein
                Yeah, sure that could be done. I don t think VB would have any kind of limit problem. If you drop a directory, it s just one path anyway. The VB script is a
                Message 7 of 15 , Jan 5, 2008
                • 0 Attachment
                  Yeah, sure that could be done. I don't think VB would have any kind
                  of limit problem. If you drop a directory, it's just one path anyway.

                  The VB script is a great starting point for any customizations
                  desired. I have never done custom dialogs in VB before, so it'd take
                  some research. I don't have time right now to do that :(

                  Alan

                  On Jan 5, 2008, at 7:07 AM, Flemming V. Larsen wrote:

                  >
                  > ----- Original Message -----
                  > From: "Alan Pinstein"
                  >
                  > > Hmm.. that got wrapped really bad. I've posted it online:
                  > >
                  > > http://tourbuzz.net/www/enfuse.vbs
                  > >
                  >
                  > This works fine - much like the window-batchscript.
                  > But I'd like the same performance as the extended batch-script Erik
                  > Krause
                  > wrote on my request:
                  >
                  > --snip
                  > @echo off
                  > %~d1
                  > cd %~p1
                  > :loop
                  > c:\enfuse\enfuse -w -o "%~n1_blended.tif" %1 %2 %3
                  > shift
                  > shift
                  > shift
                  > if exist %1 goto :loop
                  > --snap
                  >
                  > With this script I can drop more sets of bracket shots and have it
                  > "Enfused"
                  > 3 by 3.
                  > But it has some restriction with a maximum lengths of the command
                  > line - so
                  > I can't drop a full directory with hundreds of shots on it.
                  > Depending on the
                  > filesnames I can only do around 50 files at a time.
                  >
                  > Could this be done without the restrictions using vbscript?
                  >
                  > It should work like this:
                  > 1. Drop a directory of bracket shot over the icon.
                  > 2. The script generates an array-list of the filenames.
                  > 3. A pop-message ask you to set the numbers of shots to blend in
                  > each run
                  > (eg. 3 )
                  > 4. Another pop-message ask you for the output path/name.
                  > 5. Enfuse run through the bracket-sets and save the output files
                  > with seq.
                  > numbers until all is done.
                  >
                  > Best regards
                  >
                  > Flemming
                  >
                  >
                  >



                  [Non-text portions of this message have been removed]
                • Pat Swovelin
                  ... How is this better than the original .BAT Erik wrote (below)? I see that it has a loop and shift s but I don t know what they do, can you please
                  Message 8 of 15 , Jan 5, 2008
                  • 0 Attachment
                    On 1/5/2008 4:07 AM, Flemming V. Larsen rambled on about ...:
                    > This works fine - much like the window-batchscript.
                    > But I'd like the same performance as the extended batch-script Erik
                    > Krause
                    > wrote on my request:
                    >
                    > --snip
                    > @echo off
                    > %~d1
                    > cd %~p1
                    > :loop
                    > c:\enfuse\enfuse -w -o "%~n1_blended.tif" %1 %2 %3
                    > shift
                    > shift
                    > shift
                    > if exist %1 goto :loop
                    > --snap
                    How is this better than the original .BAT Erik wrote (below)? I see
                    that it has a loop and "shift"s but I don't know what they do, can you
                    please illuminate me? Thanks.

                    --snip
                    @echo off
                    %~d1
                    cd %~p1
                    c:\enfuse\enfuse -w -o "%~n1_blended.tif" %*
                    --snap




                    Pat Swovelin
                    Cool Guy @ Large
                  • Andrey Ilyin
                    I ve edited VB, setting correct path to enfuse, but when I drop files on the icon - nothing happens, just the notepad launches with the text of script. What am
                    Message 9 of 15 , Jan 6, 2008
                    • 0 Attachment
                      I've edited VB, setting correct path to enfuse, but when I drop files
                      on the icon - nothing happens, just the notepad launches with the
                      text of script.

                      What am I doing wrong?

                      Andrey
                    • Viktor Balogh
                      That was my problem too, until I moved the enfuse.exe to the root C: (so I don t have problems with long filenames with spaces in it) and then I set the path
                      Message 10 of 15 , Jan 6, 2008
                      • 0 Attachment
                        That was my problem too,
                        until I moved the enfuse.exe to the root C:\
                        (so I don't have problems with long filenames with spaces in it)
                        and then I set the path in the VB script to

                        ENFUSE = "C:\enfuse.exe"

                        After that it works perfectly.

                        Viktor

                        -------------------------------------

                        Visit my panoramic photoblog!

                        http://vrphoto.hu
                        Spherical panoramas by Viktor Balogh

                        ---------- Original Message -----------
                        From: "Andrey Ilyin" <andrey@...>
                        To: PanoToolsNG@yahoogroups.com
                        Sent: Sun, 06 Jan 2008 09:30:13 -0000
                        Subject: [PanoToolsNG] Re: enfuse windows VB app

                        > I've edited VB, setting correct path to enfuse, but when I drop files
                        > on the icon - nothing happens, just the notepad launches with the
                        > text of script.
                        >
                        > What am I doing wrong?
                        >
                        > Andrey
                        >
                        >
                        ------- End of Original Message -------



                        [Non-text portions of this message have been removed]
                      • Flemming V. Larsen
                        E.g. with Tokina 10-17 @ 10mm I do 6 around, 1 up and 2 down. It gives 9 sets x 3 bracket (-2,0,+2). With the extended script I can drop all 27 photos and have
                        Message 11 of 15 , Jan 6, 2008
                        • 0 Attachment
                          E.g. with Tokina 10-17 @ 10mm I do 6 around, 1 up and 2 down. It gives 9
                          sets x 3 bracket (-2,0,+2).
                          With the extended script I can drop all 27 photos and have them blended 3 by
                          3 in one go, instead of having to drop them in 3 by 3 9 times.

                          You can change the script to your preferred number of bracketing shots by
                          altering "%1 %2 %3" in line 5 and the number of "shift".

                          - Flemming

                          ----- Original Message -----
                          From: "Pat Swovelin"

                          > On 1/5/2008 4:07 AM, Flemming V. Larsen rambled on about ...:
                          >> This works fine - much like the window-batchscript.
                          >> But I'd like the same performance as the extended batch-script Erik
                          >> Krause
                          >> wrote on my request:
                          >>
                          >> --snip
                          >> @echo off
                          >> %~d1
                          >> cd %~p1
                          >> :loop
                          >> c:\enfuse\enfuse -w -o "%~n1_blended.tif" %1 %2 %3
                          >> shift
                          >> shift
                          >> shift
                          >> if exist %1 goto :loop
                          >> --snap
                          > How is this better than the original .BAT Erik wrote (below)? I see
                          > that it has a loop and "shift"s but I don't know what they do, can you
                          > please illuminate me? Thanks.
                          >
                          > --snip
                          > @echo off
                          > %~d1
                          > cd %~p1
                          > c:\enfuse\enfuse -w -o "%~n1_blended.tif" %*
                          > --snap
                          >
                          >
                          >
                          >
                          > Pat Swovelin
                          > Cool Guy @ Large
                        • Erik Krause
                          ... Please be patient. I m currently working on a batch that doesn t need install or changing paths, takes a set of images or a folder and implements Flemmings
                          Message 12 of 15 , Jan 6, 2008
                          • 0 Attachment
                            On Saturday, January 05, 2008 at 22:19, Pat Swovelin wrote:

                            > How is this better than the original .BAT Erik wrote (below)? I see
                            > that it has a loop and "shift"s but I don't know what they do, can you
                            > please illuminate me? Thanks.

                            Please be patient. I'm currently working on a batch that doesn't need
                            install or changing paths, takes a set of images or a folder and
                            implements Flemmings request of specifying a number for the amount of
                            images in one series. It's working here, but probably not on other
                            computers. If you want to test, please download from
                            http://www.erik-krause.de/enfuse_droplet.zip extract to the folder
                            where enfuse resides and create a droplet on the desktop (or wherever
                            you want). Please report bugs and ask off list.

                            best regards


                            Erik Krause
                            http://www.erik-krause.de
                          • Pat Swovelin
                            On 1/6/2008 4:13 AM, Viktor Balogh s hamster got loose on the keyboard ... I believe you can use the DOS shorthand form of paths and put the file where you
                            Message 13 of 15 , Jan 6, 2008
                            • 0 Attachment
                              On 1/6/2008 4:13 AM, Viktor Balogh's hamster got loose on the keyboard
                              and typed ...:
                              > That was my problem too,
                              > until I moved the enfuse.exe to the root C:\
                              > (so I don't have problems with long filenames with spaces in it)
                              > and then I set the path in the VB script to
                              >
                              > ENFUSE = "C:\enfuse.exe"

                              I believe you can use the DOS shorthand form of paths and put the file
                              where you want it.

                              If you use C:\Graphics\Enfuse work area\ it'll blow up because it has
                              both embedded spaces and is longer than 8 characters.

                              But if you replace everything after the 6th character with a tilde and a
                              #1 C:\Graphics\Enfuse~1\ it won't.

                              Of course YMMV

                              > After that it works perfectly.
                              >
                              > Viktor




                              Pat Swovelin
                              Cool Guy @ Large
                            • Alan Pinstein
                              What version of windows are you on? I think you have to be on a certain version for VB to work out-of-the-box. Alan ... [Non-text portions of this message have
                              Message 14 of 15 , Jan 7, 2008
                              • 0 Attachment
                                What version of windows are you on? I think you have to be on a
                                certain version for VB to work out-of-the-box.

                                Alan

                                On Jan 6, 2008, at 4:30 AM, Andrey Ilyin wrote:

                                > I've edited VB, setting correct path to enfuse, but when I drop files
                                > on the icon - nothing happens, just the notepad launches with the
                                > text of script.
                                >
                                > What am I doing wrong?
                                >
                                > Andrey
                                >
                                >
                                >



                                [Non-text portions of this message have been removed]
                              • Erik Krause
                                ... This is most likely because the Windows Script Host (WSH) is not running. WSH was considered a security risk in the past... best regards Erik Krause
                                Message 15 of 15 , Jan 7, 2008
                                • 0 Attachment
                                  On Sunday, January 06, 2008 at 9:30, Andrey Ilyin wrote:

                                  > I've edited VB, setting correct path to enfuse, but when I drop files
                                  > on the icon - nothing happens, just the notepad launches with the
                                  > text of script.

                                  This is most likely because the Windows Script Host (WSH) is not
                                  running. WSH was considered a security risk in the past...

                                  best regards
                                  Erik Krause
                                  http://www.erik-krause.de
                                Your message has been successfully submitted and would be delivered to recipients shortly.