Loading ...
Sorry, an error occurred while loading the content.

Re: Help..invoking a gui application in windows

Expand Messages
  • negedi
    If you want to wait that program is finished use this: system( notepad.exe ); If you what to deatach from program use this: system( start notepad.exe ); Also
    Message 1 of 2 , May 21, 2004
    • 0 Attachment
      If you want to wait that program is finished use this:
      system("notepad.exe");

      If you what to deatach from program use this:
      system("start notepad.exe");

      Also fork() and then exec() can work for you


      --- In perlguitest@yahoogroups.com, Chris Hilton <chilton@n...> wrote:
      > You could just use system() to run a program, but assuming you need
      to run
      > the program in a detached process so your Perl program can interact
      with it,
      > you probably want to use the Win32::Process module.
      >
      > use Win32::Process;
      > use Win32;
      > sub ErrorReport{
      >
      > print Win32::FormatMessage( Win32::GetLastError() );
      >
      > }
      > Win32::Process::Create($ProcessObj,
      >
      > "C:\\winnt\\system32\\notepad.exe",
      >
      > "notepad temp.txt",
      >
      > 0,
      >
      > NORMAL_PRIORITY_CLASS,
      >
      > ".")|| die ErrorReport();
      > Chris Hilton
      >
      > -----Original Message-----
      > From: jagadish [mailto:sjagadish2001@y...]
      > Sent: Tuesday, 30 March, 2004 21:50
      > To: perlguitest@yahoogroups.com
      > Subject: [perlguitest] Help..invoking a gui application in windows
      >
      >
      >
      > hi,
      > i have a gui Machine learning tool which i need to invoke
      > using perl and also pass necessary parameter such as input file
      etc,
      > could someone please tell me how i can achieve taht.
      >
      > thanks
      >
      >
      >
      > _____
      >
      > Yahoo! Groups Links
      >
      >
      > * To visit your group on the web, go to:
      > http://groups.yahoo.com/group/perlguitest/
      > <http://groups.yahoo.com/group/perlguitest/>
      >
      >
      > * To unsubscribe from this group, send an email to:
      > perlguitest-unsubscribe@yahoogroups.com
      > <mailto:perlguitest-unsubscribe@yahoogroups.com?
      subject=Unsubscribe>
      >
      >
      > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service
      > <http://docs.yahoo.com/info/terms/> .
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.