Page 1 of 1 1
Topic Options
#118550 - 2004-04-23 05:17 PM Abort/ Stop A Function half way...
JazzM Offline
Getting the hang of it

Registered: 2004-04-23
Posts: 91
Im looking for a way to stop a function half way through. Something like a Stop button on the form. I have made a script with forms GUI and several functions. I found that some functions such as remote WMI query take long time, and i want to add a Canel option so I can abort the ongoing function process.
Is there any good way?
_________________________
I will always look out from behind these eyes...

Top
#118551 - 2004-04-23 05:19 PM Re: Abort/ Stop A Function half way...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The X in the top right corner.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#118552 - 2004-04-23 05:46 PM Re: Abort/ Stop A Function half way...
JazzM Offline
Getting the hang of it

Registered: 2004-04-23
Posts: 91
heheheehh.... I forgot the X ....
Damn... I refuse to use X...

Cause I do want to do another query... so the forms must be up and running.... So no X for me this time....
_________________________
I will always look out from behind these eyes...

Top
#118553 - 2004-04-23 05:53 PM Re: Abort/ Stop A Function half way...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Sorry... I should forget comedy and stick with my day job.
Problem is that once the WMI train leaves the station, you (KiX) have (has) no control over it. What you need to do is to fire off small "test" jobs and enumerate the result before embarking on big ones.

I make it a point to ping the machine first, then I test the admin$ share, and only if all is well, do I try WMI.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#118554 - 2004-04-23 05:56 PM Re: Abort/ Stop A Function half way...
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
the only other thing to do would be to make a seperate script that:
1, you fire off in a seperate process
2, returns the value you want
3, you get the pid of, so it it exceeds your timeout value, you can kill it
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#118555 - 2004-04-24 03:39 AM Re: Abort/ Stop A Function half way...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ja, radimus said it.
multitasking... making multiple kix process'es is the way.
many programs does not use and thus they have habit of halting in some way.
gladly kixtart exe is not that huge memory hog so you can easily start 10 instances of it even on old computer.

one instance does the display and others do the data-gather slash manipulation.
thus, the user will never see any delays and can fully control the flow...
at least he thinks he can.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 756 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.053 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org