Página 1 de 1

Nombre Del Proceso

Publicado: 27 May 2009, 00:28
por SainT
Hola, me gustaria que mi programa no lo puedieran ejecutar mas de 1 vez, por eso queria saber como hacer para que no cambie el nombre del proceso cambiando el nombre. ^^ gracias

Re: Nombre Del Proceso

Publicado: 27 May 2009, 08:12
por Levignot
Q3. How can I prevent more than one copy of my script from running at once / detect
another copy of my script running?
A1. You can use a function called _Singleton to detect multiple instances of your script. An example
of how to use this code:

Código: Seleccionar todo

#include <Misc.au3>

_Singleton("TheNameOfMyScript")

In this instance, the script will immediately exit if there is already one copy running. If you simply

want know if another copy is running, you can use code similar to the next example:

#include <Misc.au3>

If _Singleton("MyScriptName", 1) Then

; We know the script is already running. Let the user know.

MsgBox(0, "Script Name", "This script is already running. Using multiple copies of this

script at the same breaks the [(UltimaCoder)] License!")

Exit

Endif

Extraido de: Learning to Script with AutoIt V3 Last Updated 14 Apr 2009.pdf

Re: Nombre Del Proceso

Publicado: 27 May 2009, 09:54
por SainT
thx!!