A one instance

For general discussion related FlowStone
Shoo
Posts: 33
Joined: Fri Sep 02, 2011 8:37 am
Location: Russia

Re: A one instance

Post by Shoo »

Morph wrote:The TaskList command can make a list of instances of a given program. Then compare if the lines of text exceeds more than that of one program then kill the process. I can build example if needed.


Yes! An example is a best help!

DSP wrote:Another idea would be to setup inter application communication using UDP and the network modules.
This is a very interesting idea! But I am weak in the networks, and therefore need an example. Please!
Morph
Posts: 53
Joined: Tue Jul 13, 2010 1:59 pm

Re: A one instance

Post by Morph »

Here is a finished module:
OneInstanceOnly.fsm
(729 Bytes) Downloaded 1141 times
It uses tasklist that comes with Windows Vista or later.
For Windows XP or older be sure you have tasklist.exe in your system32 folder. It can be downloaded here: http://www.computerhope.com/download/winxp.htm
Last edited by Morph on Wed Jul 18, 2012 5:58 pm, edited 1 time in total.
Shoo
Posts: 33
Joined: Fri Sep 02, 2011 8:37 am
Location: Russia

Re: A one instance

Post by Shoo »

A nice tool!
I did not have it, and I do not know about it. I download it. Thank you!

But the example does not work. Do not start even the first instance.
After compiling in a FlowStone (Launch on completion) - OK, and standalone Example.exe - is not run (your message).
I deleted the tasklist.txt temp file - do not start anyway.
But the idea is understandable, I debug it myself.
Thank you!

(Sorry this is a Google translate text.)
Morph
Posts: 53
Joined: Tue Jul 13, 2010 1:59 pm

Re: A one instance

Post by Morph »

Yes, i forgot the list of module .dll files depends on the OS, so it can not be compared like that. But using a combination of find and find reversed seems to work. I have updated the file above, try download it again.
Shoo
Posts: 33
Joined: Fri Sep 02, 2011 8:37 am
Location: Russia

Re: A one instance

Post by Shoo »

Yes, this time I was engaged in the same :)
I was able to automatically detect the application name.
You can rename an application, but it still identifies itself.

I renamed tasklist.exe, because the parser is tuned up strictly to it's format of output; with the other versions may be not work.
Attachments
OneInstanceWithParser.zip
(36.66 KiB) Downloaded 1099 times
Morph
Posts: 53
Joined: Tue Jul 13, 2010 1:59 pm

Re: A one instance

Post by Morph »

Good idea! Here is another solution for the parser that seems more stable. I think there's no need to rename tasklist.

OneInstanceOnly2.fsm
(3.36 KiB) Downloaded 1152 times

Now the module can just be dropped into a schematic and should work also when renaming the EXE.
Shoo
Posts: 33
Joined: Fri Sep 02, 2011 8:37 am
Location: Russia

Re: A one instance

Post by Shoo »

Yes, It's work. :)
MyDogRamsey
Posts: 12
Joined: Fri Jan 06, 2012 7:29 am

Re: A one instance

Post by MyDogRamsey »

What you can't make a simple API call in Flowstone? The windows API has efficient means of controlling windows..
Shoo
Posts: 33
Joined: Fri Sep 02, 2011 8:37 am
Location: Russia

Re: A one instance

Post by Shoo »

How make API call in Flowstone?
Example, please...

PS:
No Ruby.
MyDogRamsey
Posts: 12
Joined: Fri Jan 06, 2012 7:29 am

Re: A one instance

Post by MyDogRamsey »

Shoo wrote:How make API call in Flowstone?
Example, please...

PS:
No Ruby.

Yes, how do you make api calls? With Ruby I suppose?
Post Reply