Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check to see if process is running

    I'm admitting now that I'm new to Javascripting, and I'm trying to edit some existing JS code that was created by someone that knew what they were doing.

    The problem that I am running into is that I have a process, PDFConvert.exe, that is initiated by a button click that takes info from different sources, combines it, and converts it to a PDF document.

    The problem is that after the PDF is created PDFConvert.exe still runs for several seconds. This creates a problem if a user selects the button again, the process will error out and the pdf will not be created.

    Is there a way to insert some JS code to check to see if PDFConvert.exe is running? And if it is running to wait x amount of seconds and try again, if it is still running to wait again?

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Well, if you want to do it from a homepage, the answer is no, you don't have that capability. It's possible that an ActiveX control could do it from JScript or the Windows Scripting Host, though.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by cschutte
    This creates a problem if a user selects the button again...
    How about setting the button's disabled property to true at the top of the function, and false at the bottom?
    *this message will self destruct in n-seconds*

  • #4
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the reply, but disabling the button will not work. The problem is that the pdfconvert.exe thread is not robust enough to handle multiple request so I need to know if it is running. If it is I want to wait x amount of seconds then query to see if pdf.exe is running again.

    The reason for that is that multiple users might be in their separate accounts trying to launch pdf.exe. So if user1 launches pdf.exe with their button and user2 tries to launch pdf.exe with his button 15 seconds later, I want something that will know that pdfconvert.exe is running and since it is running will wait x amount of seconds and try again.

    Let me know what other info you need.

  • #5
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    WMI is the only way I know of... What type of application is the UI, and where is it being executed?
    *this message will self destruct in n-seconds*

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Well, from the sounds of it, what you really need is some kind of spooler that can build a request que for it. That'd be something for the Computer Programming forum and not client side developement, though.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    LinkBacks (?)

    1. 03-12-2014, 01:57 PM

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •