run a ruby script from delphi via shellexecute -


I have written some Ruby scripts which send me emails by calling me with some command line parameters.

On the command line, it works:

  ruby.exe mail_it.rb fromaddr = "mailaddr1@gmail.com" tolist = "mailaddr2@yahoo.com"  

But I can try that I can not work it for Win32 at Delphi 2007. Here's the latest effort:

  Process TForm1.Button1Click (Sender: Tubbed); Var Params: String; Start the parametic: = 'mail_it.rb fromaddr = "mailaddr1@gmail.com" tolist = "mailaddr2@yahoo.com"; Caption: = Intotect (Shale Acetate (Form 1. Handle, Nil, PCHAR ('Ruby .exe'), PChar (Parameters), Zero, SWSHHH); End;  

I have tried to use 'Open' as the second ultimate in ShaleXsecret, but it does not help. ShellExecute returns 42 itself, as far as I can find on other websites, it can tell "no error".

Try it out:

  Shorelakecut (0, 'Open' 'And lieutenant; press your pat here & gt; \ mail_it.rb', fromaddr = "mailaddr1@gmail.com" Tolist = "mailaddr2@yahoo.com", zero, SW_NORMAL);  

I do not have Ruby installed, but it works for me to start a .pas file with the editor. Unless you have the ruby.exe attached to the .rb files, then it should work.

-don


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -