quielb Posted April 19, 2006 Posted April 19, 2006 I want to check to see if my autoit exe is already running. Is there a way to get the PID of self? And when I use WinGetProcess which PID will it return? The Pid of the other autoit exe or the PID of the autoit exe I just started? I tried: if WinGetProcess("magreader.exe") = -1 Then MsgBox(0,"Already Running", "The Magstripe Reader is already running use ALT-SHIFT-D to access") exit EndIf And of course it exits every time cause of course magreader.exe is running.
Valuater Posted April 19, 2006 Posted April 19, 2006 maybe $g_szVersion = "My XP Cleaner" If WinExists($g_szVersion) Then MouseMove(500,5) MsgBox(262208, "* NOTE * ", "*XPClean Menu* was already running ", 5) SoundPlay ($Sound_lnk,1) Exit; It's already running EndIf AutoItWinSetTitle($g_szVersion) thats what i use 8)
Developers Jos Posted April 19, 2006 Developers Posted April 19, 2006 I want to check to see if my autoit exe is already running. Is there a way to get the PID of self? And when I use WinGetProcess which PID will it return? The Pid of the other autoit exe or the PID of the autoit exe I just started? I tried: if WinGetProcess("magreader.exe") = -1 Then MsgBox(0,"Already Running", "The Magstripe Reader is already running use ALT-SHIFT-D to access") exit EndIf And of course it exits every time cause of course magreader.exe is running. Check out the standard udf _Singleton() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
quielb Posted April 19, 2006 Author Posted April 19, 2006 I can probably use ProcessList( "magreader.exe" ) to get all the running instances of magreader.exe but how do I get PID of self?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now