I am working on automation of a business process that looks like this. Through the web interface (php) user enters few parameters about product, and then I need to generate few files in different format. This is metal fabrication business and plasma cutting machine needs .dxf file. I have installed CAD program that I want to feed with AutoCAD (.scr) script generated during the web phase. This works from the command line: `s:\bcad\icad.exe /b s:\scripts\my.scr` which tells the OS to execute icad.exe and start executing my.scr. In my.scr there are instructions for drawing the shape, exporting to .dxf, saving to native format .dwg, printing to .pdf and finally exiting/closing icad.exe. Then I need to move these files to a different locations. I was thinking to make it as a perl script which will scan the directory where web script drops the my.scr constantly or every few minutes and execute above command, then finally delete the my.scr. My web script is in php and I tried exec(), but process starts in the background, sitting there and my web page hangs. I would appreciate if someone can show me few lines of code or point me to an existing similar solution to this problem Thanks, Shreko

In reply to Windows scripting by shreko

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.