Sign in to follow this  
Followers 0
Diana (Cda)

This works plugged into run, can't get it to work with "Run" command ...?

4 posts in this topic

Hi, everyone! Managing my scripting needs by myself these days, which is all thanks to this great group!

But I did run into a problem with a script in last few days that I can't figure out. If I run this part of the script to the clipboard with ClipPut and then plug into the run box, it works just fine. But when I use the code with "Run" instead, it doesn't like it:

ClipPut('"' & $Fldr_Programs_DriveLtr & "\IMAGE\img, Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe" & '" "' & $FldrPath & "\*." & $imgFormatSOURCE & '"' & " /convert=*." & $imgFormatTARGET)
The above command gives me commandline code such as this (once I plug in the folder path to make the image format conversions in:
"M:\IMAGE\img, Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe" "C:\Documents and Settings\User\Desktop\*.bmp" /convert=*.png
Any ideas?

Thanks!! ;)

Share this post


Link to post
Share on other sites



"Run Box" sets the working directory to the selected files folder. Did you set the working dir with Run()?

If you post a reproducer (short working example) we may be able to help you better.

Share this post


Link to post
Share on other sites

Hi, everyone! Managing my scripting needs by myself these days, which is all thanks to this great group!

But I did run into a problem with a script in last few days that I can't figure out. If I run this part of the script to the clipboard with ClipPut and then plug into the run box, it works just fine. But when I use the code with "Run" instead, it doesn't like it:

ClipPut('"' & $Fldr_Programs_DriveLtr & "\IMAGE\img, Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe" & '" "' & $FldrPath & "\*." & $imgFormatSOURCE & '"' & " /convert=*." & $imgFormatTARGET)
The above command gives me commandline code such as this (once I plug in the folder path to make the image format conversions in:
"M:\IMAGE\img, Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe" "C:\Documents and Settings\User\Desktop\*.bmp" /convert=*.png
Any ideas?

Thanks!! ;)

It seems to be a problem with that part: $Fldr_Programs_DriveLtr & "\IMAGE\img, Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe"

I think it should be $Fldr_Programs_DriveLtr & "\IMAGE\img\Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe" to get correct path to IrfanView.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

It seems to be a problem with that part: $Fldr_Programs_DriveLtr & "\IMAGE\img, Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe"

I think it should be $Fldr_Programs_DriveLtr & "\IMAGE\img\Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe" to get correct path to IrfanView.

Br,

UEZ

Hi! Thanks. No, that much was certain. That part of the code is fine.

I didn't post all the rest of the script because it would confuse the issue as it deals with the variables and such. ClipPut above yielded the perfect result that worked in the RUN box. I refined the variables a bit:

ClipPut('"' & $pathToEXE & '" "' & $FldrPath & "\*." & $imgFormatSOURCE & '"' & " /convert=*." & $imgFormatTARGET)
And that gives me this, in a test of one particular folder full of BMPs that need converting to PNGs, which I then plug into the RUN box:
"M:\IMAGE\img, Irfanview v4.10\APP- Irfanview v4.25\i_view32.exe" "C:\Documents and Settings\User\Desktop\Wkt- CS\*.bmp" /convert=*.png
I run that and all the PNGs get converted just fine.

Hey, don't know what happened but sorry. I just tried substituting RUN for CLIPPUT and this time, it did work! Yesterday I must have been missing something and didn't realize it. I'm going to test it for the other image conversion that I need.

...

Yup. My bad. Sorry about that. Go figure, Run today worked in place of ClipPut just fine. So, end result is that I run either of these 2 scripts and a folder full of images gets converted in a snap with no fuss, no muss!

Thanks everyone. End result is great working code, it seems.

Cheers. ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0