using actions

Thorsten Maerz <[email protected]> Sat, 22 Mar 2003 11:58:58 +0100
Newsgroups gmane.mail.sylpheed.claws.windows
Message-ID <[email protected]>
Hi Steffen,

I'm starting a new thread cause I think a small action introduction may be
helpful for other users too and is more obvious this way.


1. Try if external commands are working at all in actions:
   On Win9x/Me, try
     command /c dir
   On WinNT/2K/XP, try
     cmd /c dir
   This should open an output window and show the directory contents.

   No? Then probably the gspawn_win32_helper.exe application cannot be found
   in your path. The installer should have installed an apppath entry to be
   able to use it from your sylpheed/bin directory, but you can try to put it
   into your windows dir (or put sylpheed/bin into your PATH variable).
   The executable can be downloaded separately too:
     http://claws-w32.sourceforge.net/sylpheed/claws/scripts/gspawn-win32-helper.zip

2. Now try to get command output into the textview. Append a "|" to the action
   mentioned above:
     cmd /c dir|

   If you run this on a multipart mail, the output is displayed in the viewer
   for that window (select it from the list of attachments).
   On singlepoart mails, the output should directly visible in the viewer.

3. Now let's get perl running.
   There are different possibilities which perl to use. I used ActiveState for
   several years and recently tried some other distros. Indigo-Perl is smaller
   than ActiveState and works perfectly by just unzipping the archive - no
   installation is necessary (apart from extending PATH to find perl.exe).

   First, create a perl script "c:\hello.pl" with following line
         print qx(set)."\n";
   Then create an action command for it:
         perl c:\hello.pl
   
   This should dump your environment variable to an output window.

   No?
   - Is perl.exe in your path? your can force using a specific perl version
     by giving the absolute path, e.g. "c:\perl\bin\perl.exe c:\hello.pl".
   - The Perl.exe from Cygwin and from MinGW/MSys will not work (these are
     modified versions. Most other versions - e.g. if compiled from the
     original perl source - will work).
   

I recommend using the debug enabled version and watch the console output
while running the action. E.g. if the application cannot be found, a
message like this should be dumped:
  spawn:Failed to execute child process (No such file or directory)

If the gspawn-win32-helper.exe cannot be found, following message should
be dumped:
  spawn:Failed to execute helper program

Regards,
-- 
Thorsten Maerz          <[email protected]>
Sylpheed-claws/Win32:   http://claws-w32.sf.net
signature.asc (application/pgp-signature, 194 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1-nr1 (Windows XP)

iD8DBQE+fEH1cVjFyoO8k5MRAoSqAJ9OLD38I15u3qBXh9rj3YMBZ5Il2wCeLsaY
8/JYVUlFSpbrz8VV1TQi6iA=
=EtVQ
-----END PGP SIGNATURE-----