Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-01-2005, 05:43 PM   PM User | #1
cschutte
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
cschutte is an unknown quantity at this point
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?
cschutte is offline   Reply With Quote
Old 03-01-2005, 08:18 PM   PM User | #2
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
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
liorean is offline   Reply With Quote
Old 03-01-2005, 09:44 PM   PM User | #3
codegoboom
Regular Coder

 
Join Date: Aug 2004
Location: codegoboom@yahoo.com
Posts: 999
Thanks: 0
Thanked 0 Times in 0 Posts
codegoboom is an unknown quantity at this point
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*
codegoboom is offline   Reply With Quote
Old 03-01-2005, 10:21 PM   PM User | #4
cschutte
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
cschutte is an unknown quantity at this point
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.
cschutte is offline   Reply With Quote
Old 03-01-2005, 10:29 PM   PM User | #5
codegoboom
Regular Coder

 
Join Date: Aug 2004
Location: codegoboom@yahoo.com
Posts: 999
Thanks: 0
Thanked 0 Times in 0 Posts
codegoboom is an unknown quantity at this point
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*
codegoboom is offline   Reply With Quote
Old 03-01-2005, 11:39 PM   PM User | #6
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
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
liorean is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:55 PM.


Advertisement
Log in to turn off these ads.