Dinosaurr Posted December 21, 2008 Share Posted December 21, 2008 While 1 Select Case ProcessExists("uTorrent.exe") And ProcessExists("pg2.exe") = 0 If ProcessExists("pg2.exe") = 0 Then Run("pg2.exe") EndIf Case ProcessExists("pg2.exe") And ProcessExists("uTorrent.exe") = 0 ProcessClose("pg2.exe") If ProcessExists("pgfix.exe") = 0 Then Run("pgfix.exe") EndIf ControlClick("Warning", "", "Button1") Sleep(750) ControlClick("PGFix", "", "Button1") EndSelect WEnd This is the code for my script, but when it is running, when i try to close uTorrent, it will close and the window wont show, but the process doesnt close so PG2 won't close. Any suggestions? Link to comment Share on other sites More sharing options...
BrettF Posted December 21, 2008 Share Posted December 21, 2008 How does this go for you? While 1 Select Case (ProcessExists("pg2.exe") <> 0) And (ProcessExists("uTorrent.exe") = 0) MsgBox(0, "", "Case 2") ProcessClose("pg2.exe") If ProcessExists("pgfix.exe") = 0 Then Run("pgfix.exe") MsgBox(0, "", "Running pgfix.exe") EndIf ;ControlClick("Warning", "", "Button1") ;Sleep(750) ;ControlClick("PGFix", "", "Button1") Case (ProcessExists("uTorrent.exe") <> 0) And (ProcessExists("pg2.exe") = 0) MsgBox(0, "", "Case 1") If ProcessExists("pg2.exe") = 0 Then ;Run("pg2.exe") MsgBox(0, "", "Running Pg2.exe") EndIf EndSelect WEnd Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Dinosaurr Posted December 21, 2008 Author Share Posted December 21, 2008 (edited) How does this go for you? While 1 Select Case (ProcessExists("pg2.exe") <> 0) And (ProcessExists("uTorrent.exe") = 0) MsgBox(0, "", "Case 2") ProcessClose("pg2.exe") If ProcessExists("pgfix.exe") = 0 Then Run("pgfix.exe") MsgBox(0, "", "Running pgfix.exe") EndIf ;ControlClick("Warning", "", "Button1") ;Sleep(750) ;ControlClick("PGFix", "", "Button1") Case (ProcessExists("uTorrent.exe") <> 0) And (ProcessExists("pg2.exe") = 0) MsgBox(0, "", "Case 1") If ProcessExists("pg2.exe") = 0 Then ;Run("pg2.exe") MsgBox(0, "", "Running Pg2.exe") EndIf EndSelect WEnd i can close the program now, thanks for the help! [edit] but may i ask what the <> 0 does? Edited December 21, 2008 by Dinosaurr Link to comment Share on other sites More sharing options...
BrettF Posted December 21, 2008 Share Posted December 21, 2008 The biggest change was the brackets.... I also switched them, because of the order and stuff. I can't remember why now, but there was a reason! Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
rabbitkillrun Posted December 22, 2008 Share Posted December 22, 2008 <> means does not equal... Link to comment Share on other sites More sharing options...
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