Diana (Cda) Posted October 1, 2010 Share Posted October 1, 2010 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=*.pngAny ideas? Thanks!! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 1, 2010 Share Posted October 1, 2010 "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. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
UEZ Posted October 1, 2010 Share Posted October 1, 2010 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=*.pngAny 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Diana (Cda) Posted October 2, 2010 Author Share Posted October 2, 2010 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, UEZHi! 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=*.pngI 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now