I have written a script that processes tif images into text searchable tif images using Microsofts Document Imaging OCR engine. It works fine on my laptop and my desktop. The line that runs the program is as follows
Run Program>C:\Program Files\Common Files\Microsoft Shared\MSPaper\mspview.exe %s% "%fname%"
However On another machine the program mspview is stored in this folder
C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE
When I change the path in Macro Scheduler and run it it fails.
However the following command works from the Start/Run Box
"C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" -f "C:\testit\AGCL 004502.TIF"
I have tried all the syntax changes I can think of - any suggestions? Does anyone have MSPVIEW.EXE installed in the C:\Program Files\Common Files\Microsoft Shared\MODI\11.0 subdirectory?
Microsoft put it their on an XP installation and put it under C:\Program Files\Common Files\Microsoft Shared\MSPaper\ in another installation
Any ideas would be helpful - spent hours on this one
Command line parameters work in one machine not another
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 63
- Joined: Sat Dec 25, 2004 3:23 pm
The part that works
This is the part of the program that works - I have isolated to the command line by creating six separate one line marco that fail
/////////////////////////////////////Get rid of non tif file
Position>tif,%fname%,1,ftype
/MDL>%ftype%
If>%ftype%=0,testtype
Let>RP_WAIT=1
/Run Program>C:\Program Files\Common Files\Microsoft Shared\MSPaper\mspview.exe %s% "%fname%"
Run Program>%pp% %s% "%fname%"
Let>RP_WAIT=0
WriteLn>C:\TextSearchTiffs\log.txt,%fname%
If>r=5,please
Label>registered
Let>r=r+1
Label>testtype
Until>k,file_names_count
Some of the Marcros that have failed are:
Let>fname=C:\testit\test.TIF
//test2 Run Program> C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE -f "%fname%"
//test3 Run Program> C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE -f C:\testit\test.TIF
//test4 Run Program> "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" -f C:\testit\test.TIF
//test5 Run Program> "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" "-f" "C:\testit\test.TIF"
Run Program> "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE -f C:\testit\test.TIF"
Any ideas?
/////////////////////////////////////Get rid of non tif file
Position>tif,%fname%,1,ftype
/MDL>%ftype%
If>%ftype%=0,testtype
Let>RP_WAIT=1
/Run Program>C:\Program Files\Common Files\Microsoft Shared\MSPaper\mspview.exe %s% "%fname%"
Run Program>%pp% %s% "%fname%"
Let>RP_WAIT=0
WriteLn>C:\TextSearchTiffs\log.txt,%fname%
If>r=5,please
Label>registered
Let>r=r+1
Label>testtype
Until>k,file_names_count
Some of the Marcros that have failed are:
Let>fname=C:\testit\test.TIF
//test2 Run Program> C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE -f "%fname%"
//test3 Run Program> C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE -f C:\testit\test.TIF
//test4 Run Program> "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" -f C:\testit\test.TIF
//test5 Run Program> "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" "-f" "C:\testit\test.TIF"
Run Program> "C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE -f C:\testit\test.TIF"
Any ideas?
-
- Pro Scripter
- Posts: 63
- Joined: Sat Dec 25, 2004 3:23 pm
So what your saying is, your programs some where else, you transfered them into some folder...and its not working from the script. But its working when you go to start - run - and the directory...? Let me look at the script for a few minutes..
I think there is some error in the script, if its working when you do the 'run' thing. I will let support or Bob hansen to answer this. Give them about 1-3 hours.
I think there is some error in the script, if its working when you do the 'run' thing. I will let support or Bob hansen to answer this. Give them about 1-3 hours.
My poor communication
Okay I admit it I am poor at communication. Hopefully this wil clarify it. In office XP a program called mspview.exe exists. The above script works with this program with no difficulties.
However if you have Office 2003 it includes a newer version of mspview.exe which is stored in a different location; the newer accepts the same command line parameters as the old verison. If you just change the file path, the script does not work even though the same parameters apply.
It makes no sense to me at all as when I use the Start/Run command I can get program to run. So, I believe it is a syntax error. But what is wrong I cannot figure out. I need someone who has Office 2003 with Microsoft Document Imaging to take a command line from the Start / Run box, place it in a script with the Run Program Command from Macro Scheduler and get it to work properly. That I think would do the trick.
However if you have Office 2003 it includes a newer version of mspview.exe which is stored in a different location; the newer accepts the same command line parameters as the old verison. If you just change the file path, the script does not work even though the same parameters apply.
It makes no sense to me at all as when I use the Start/Run command I can get program to run. So, I believe it is a syntax error. But what is wrong I cannot figure out. I need someone who has Office 2003 with Microsoft Document Imaging to take a command line from the Start / Run box, place it in a script with the Run Program Command from Macro Scheduler and get it to work properly. That I think would do the trick.
You should do this:
Run Program>"C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" -f "%fname%"
The path has spaces in it so put quotes around it. Also check whether mspview needs to be run in a particular directory. If so change directory to that folder first:
ChangeDirectory>C:\Program Files\Common Files\Microsoft Shared\MODI\11.0
Run Program>"C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" -f "%fname%"
Run Program>"C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" -f "%fname%"
The path has spaces in it so put quotes around it. Also check whether mspview needs to be run in a particular directory. If so change directory to that folder first:
ChangeDirectory>C:\Program Files\Common Files\Microsoft Shared\MODI\11.0
Run Program>"C:\Program Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" -f "%fname%"
MJT Net Support
[email protected]
[email protected]
This did it
It now works - I don't understand why it works with no " " in the command line on one version and with that version if you include them it dosen't work. Regardless, it is up and working. Thank you all