Hi

The easiest way is to shell out to a batch file from a command button.

. In the form's design view add a command button.
. In the command button's On-Click property put [Event Procedure] from the 
drop-down list.
. Double click just to the right of the white area (on a [...] button that 
will then appear)
. Enter something like:
        ChDrive "c"
        ChDir "\MyFolder"
        Call Shell("mybatchfile.bat", 1)
   If anyone wants to know how to make the application truly portable to 
other folders/drives (so that you don't have to hard code the drive and 
folder) let me know and I'll let you know how (I've been trying to find out 
how to do this for years and discovered it by chance just yesterday)
. In mybatchfile.bat which is in C:\MyFolder:
        perl scriptname.pl
        pause
   The pause means that the command window stays open after processing but 
is not necessary otherwise

That should do the trick. Apologies for being pedantic but I know how 
difficult it is to understand instructions that assume so much.

Ian

Reply via email to