forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


task tracking

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
thomas
Newbie


Joined: 15 Jan 2003
Posts: 23
Location: Germany

PostPosted: Wed Apr 02, 2003 9:07 am    Post subject: task tracking Reply with quote

Hello,

if it possible to track task with vds script?

I have a compiled vds-script. The problem is now, that I can start this program repeatedly, but I want that I can start this program only one time. Is it possible with vds?

Thanks
Thomas
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Apr 02, 2003 9:14 am    Post subject: Reply with quote

You'll need to add the following code to your script and recompile it. Add
the following to the very beginning of your script:
Code:


%Z = Your App Name
if @winexists(%Z)
  stop
end




You can replace the "%Z" in the @winexists(%Z) function with the actual
title text of yor program if ya want. I would actually recommend creating
your dialog with the "CLASS" attribute naming a custom window class for
your dialog and then checking for the classname instead of the window's
title text.

Code:


%Z = #ClassName
if @winexists(%Z)
  stop
end



Hope this helps. Smile

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
thomas
Newbie


Joined: 15 Jan 2003
Posts: 23
Location: Germany

PostPosted: Wed Apr 02, 2003 10:10 am    Post subject: Reply with quote

Thanks!!

But I can not use the function @winexits, becouse my application shown no window. The EXE File is only seeable in the task manager as a task.

Another Idea?
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Apr 02, 2003 10:43 am    Post subject: Reply with quote

The only other thing I can think of would be to define a dialog and not to
show it. Something like this:
Code:

if @winexists(#MyApp)
  stop
end

dialog create,My App,0,0,0,0,CLASS MyApp

rem  rest of program code here...



I thought about recommending the "list winlist,..." command, but again without
a window it probably won't show up in the list either.

Wish there was more. Sad Confused
But maybe this will work out for you. Smile

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Apr 02, 2003 11:57 am    Post subject: Reply with quote

Try out VDSMEM.DLL. It can pass parameters between your programs so you'll be able to
set a variable in Windows memory that you can check for when starting up your prog.

As far as I remember one of the examples included with the DLL even does something
like this.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Apr 02, 2003 12:11 pm    Post subject: Reply with quote

Ya can try this program and see if yours shows up in the list - only
thing is, your program will prolly have the default class given to it
by VDS without a window of it's own (not sure what that is off top
of my head). This program uses LIST WINLIST with the NCI flags.

http://forum.vdsworld.com/viewtopic.php?t=1347

I'd prolly just create a window and not show it as bweckel
suggested... Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Apr 02, 2003 7:45 pm    Post subject: Reply with quote

In VDS 5, there will be something that makes finding your program much
easier when it has no dialog at all. But in the mean time, I had sent you
some code, and also see you have posted here also. All the suggestions
are about the same. You will need to create a dialog, but do not use
SHOW.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Apr 03, 2003 1:11 pm    Post subject: Reply with quote

what about adding an entry to the registry

and your program runs it gives it the value of 1 and when it closes, it gives it the value of 0

and whenever your program runs, it checks the value of the registry entry to see if it is already running

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu Apr 03, 2003 2:38 pm    Post subject: Reply with quote

Serge wrote:
what about adding an entry to the registry

and your program runs it gives it the value of 1 and when it closes, it gives it the value of 0

and whenever your program runs, it checks the value of the registry entry to see if it is already running

Serge


I thought about that also. But what happens then if the program crashes without writing its
exit value to the registry? Then when the user starts up the program again it will be fooled into
assuming that it is already running Wink

Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Apr 03, 2003 2:45 pm    Post subject: Reply with quote

good point dr dread Sad

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group