[solved] cannot add run to a script

Discuss and share scripts and script files...
Post Reply
lian00
Posts: 429
Joined: 09 Jul 2014 17:12

[solved] cannot add run to a script

Post by lian00 »

Hello, I use a script in conjunction with NConvert to add a watermark to an image file. It works without any problem. I tried to add a run command asking the script to launch a program, but it won’t work at all. The script is located in a button in the toolbar, and if I click the button, I see the code and the script won’t work.

The original script

Code: Select all

foreach($file, "<get SelectedItemsPathNames |>") {
  $rand = rand(1,5);
  $nomfichier = "E:\truc\essai-cadre-"."$rand".".png";
  wait 1000;
    runret("""C:\Program Files\nconvert\nconvert.exe"" -resize longest 500 -quiet -wmflag center -wmfile"." $nomfichier"." -D -out jpeg -o E:\truc\alternative\%-alter.jpg"." $file""");
        wait 1000;
   }
   end confirm ("Allez à Alternative ? !!PENSER à uploader l'image!!") == 0;
          goto "E:\truc\alternative";
I try to add the line - and tested in different places of the code

Code: Select all

run "C:\Program Files (x86)\FTP Rush\FTPRush.exe";
Last edited by lian00 on 13 Jun 2026 21:57, edited 1 time in total.
Windows 10 64 bits

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: cannot add run to a script

Post by highend »

if I click the button, I see the code and the script won’t work
Then it isn't indented correctly...
One of my scripts helped you out? Please donate via Paypal

lian00
Posts: 429
Joined: 09 Jul 2014 17:12

Re: cannot add run to a script

Post by lian00 »

highend wrote: 13 Jun 2026 17:55
if I click the button, I see the code and the script won’t work
Then it isn't indented correctly...
Sorry, but I don’t know exactly what you mean.
Windows 10 64 bits

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: cannot add run to a script

Post by highend »

If you see the code of the script instead of it being executed, the script is not indented correctly...

rtfm "idh_scripting.htm#idh_scripting_multi";
One of my scripts helped you out? Please donate via Paypal

lian00
Posts: 429
Joined: 09 Jul 2014 17:12

Re: cannot add run to a script

Post by lian00 »

OK, thanks. I have another error now, but I should solved it by myself.
Windows 10 64 bits

Post Reply