The DAM Forum
Welcome, Guest. Please login or register.
May 23, 2013, 06:16:41 AM

Login with username, password and session length
Search:     Advanced search
Jan 9, 2012
John Beardsworth's new Lightroom site
Lightroom Solutions
27960 Posts in 5113 Topics by 2914 Members
Latest Member: imthedamstar
* Home Help Search Login Register
+  The DAM Forum
|-+  Software Discussions
| |-+  iView MediaPro
| | |-+  help me to send a image to an external program
« previous next »
Pages: [1] Print
Author Topic: help me to send a image to an external program  (Read 2857 times)
mantra
Jr. Member
**
Posts: 57


View Profile
« on: January 09, 2010, 08:57:19 AM »

Hi
i still use iview because i love it

well but there some bugs
one is the 8+3 files names and often the helper application don't work perfectly

so i use this script
but i need help

may i add in the script to ability to run a program with a command line
well there is a script to send to photoshop
but for example to send to geosetter (it's only an example) with a command line geosetter.exe /Edit
how can i edit to script to accept a command line
i mean if i substitute "C:\Programs\Adobe\Adobe Photoshop CS3\Photoshop.exe" with "C:\Programs\geosetter\geosetter.exe" /edit it doesn't work

Code:
Option Explicit
 
Const Title = "Photoshop cs3"
Const appEditor = "C:\Programs\Adobe\Adobe Photoshop CS3\Photoshop.exe"
Const maxcmd = 8192
 
Dim fso, app, file, ext, sh, cmd, skipped, selected
 
Set app = CreateObject("iView.Application")
 
If (app.Catalogs.count > 0) Then
   If (app.ActiveCatalog.Selection.Count = 0) Then
      MsgBox "Select at least one raw file", vbCritical, Title
   Else
      skipped = 0 : selected = 0 : cmd = """" & appEditor & """"
       
      For Each file In app.ActiveCatalog.Selection
         If file.Mounted Then
            selected = selected+1 
            cmd = cmd & " """ & file.Path & """"
         Else
            skipped = skipped+1
         End If
      Next
 
      If Len(cmd) >= maxcmd Then
         MsgBox "Too many files selected", vbCritical, Title
      ElseIf selected > 0 then
         Set app = Nothing
         If skipped > 0 Then
            MsgBox   "Some selected items are not available" & vbCrLf & _
                  "online and will be ignored", vbExclamation, Title
         End If
         Set sh = CreateObject("wscript.shell")
         sh.Exec cmd
         Set sh = Nothing
      Else
         MsgBox "No selected files are online", vbCritical, Title
      End If
   End If
End If
Logged

Giovanni
peterkrogh
Administrator
Hero Member
*****
Posts: 5682


View Profile
« Reply #1 on: January 19, 2010, 05:29:38 AM »

Giovanni,
Why are you not simply setting up the program as a helper application and using right-click?
Peter
Logged
mantra
Jr. Member
**
Posts: 57


View Profile
« Reply #2 on: January 19, 2010, 09:49:22 AM »

Giovanni,
Why are you not simply setting up the program as a helper application and using right-click?
Peter
because with the help application i can't add command lines
Logged

Giovanni
johnbeardy
Administrator
Hero Member
*****
Posts: 1813


View Profile WWW
« Reply #3 on: January 19, 2010, 10:04:49 AM »

To add pieces of text, use "&" . There's already an example in that script.

John
Logged
mantra
Jr. Member
**
Posts: 57


View Profile
« Reply #4 on: January 19, 2010, 12:26:09 PM »

To add pieces of text, use "&" . There's already an example in that script.

John
thanks
should i add
Code:
Const appEditor = "C:\Programs\geosetter\geosetter.exe" & "/Edit"
?
Logged

Giovanni
johnbeardy
Administrator
Hero Member
*****
Posts: 1813


View Profile WWW
« Reply #5 on: January 19, 2010, 12:32:02 PM »

Assuming that's the correct command line yes. Often you need to leave a space.

Test command lines by creating a batch file - a Notepad file with a bat extension. You should be able to double click it to run it.

John
Logged
ianw
Full Member
***
Posts: 162


View Profile
« Reply #6 on: January 19, 2010, 01:30:37 PM »

Giovanni,

I've just tried adding GeoSetter as a helper application within iView.  When I right-click on an image and select Open With and then GeoSetter it works for me.  GeoSetter will show all the images in the directory of the selected image.  However it does focus on the selected image and it is highlighted with a blue border, as is the GeoSetter standard.

If you select multiple images - I tried just 2 - then it only highlights one of them.  As it works by directory then it might not like it if you were to select images from multiple locations.

If you are intent on the script then the same limitations would probably also apply.  You can see the GeoSetter options by typing, at the DOS prompt, "c:\program files\geosetter\geosetter" -h  This will start GeoSetter and tell you that wrong parameters have been used and then show you what is available.  However it does suggest that multiple files can be passed in, which doesn't seem to work.  Any problems with this would need to be taken up on the GeoSetter forum.

Ian
Logged
mantra
Jr. Member
**
Posts: 57


View Profile
« Reply #7 on: March 08, 2010, 08:27:34 AM »

Assuming that's the correct command line yes. Often you need to leave a space.

Test command lines by creating a batch file - a Notepad file with a bat extension. You should be able to double click it to run it.

John
thanks John
Code:
Const Title = "Geosetter"
Const appEditor = "H:\geosetter\GeoSetter.exe" & "/show"
Const maxcmd = 8192
does not work Sad
Logged

Giovanni
mantra
Jr. Member
**
Posts: 57


View Profile
« Reply #8 on: March 08, 2010, 08:31:24 AM »

Giovanni,

I've just tried adding GeoSetter as a helper application within iView.  When I right-click on an image and select Open With and then GeoSetter it works for me.  GeoSetter will show all the images in the directory of the selected image.  However it does focus on the selected image and it is highlighted with a blue border, as is the GeoSetter standard.

If you select multiple images - I tried just 2 - then it only highlights one of them.  As it works by directory then it might not like it if you were to select images from multiple locations.

If you are intent on the script then the same limitations would probably also apply.  You can see the GeoSetter options by typing, at the DOS prompt, "c:\program files\geosetter\geosetter" -h  This will start GeoSetter and tell you that wrong parameters have been used and then show you what is available.  However it does suggest that multiple files can be passed in, which doesn't seem to work.  Any problems with this would need to be taken up on the GeoSetter forum.

Ian
well thank Ian
but i have folders with tons of photos
i did it with iview with the helper application and it works
but geosetter read all the metadata of the all photos , and it slows a lot

giovanni
Logged

Giovanni
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!