pecha Posted May 14, 2007 Share Posted May 14, 2007 I think that he must be simple but script stops in line 19, can somebody help me AutoItSetOption ("TrayIconDebug", 1) Run (@ScriptFullPath & '\..\Prog\acad.exe') WinWait("AutoCAD 2006", "") ;~ Espera até ao proximo passo While WinExists("AutoCAD 2006", "") Sleep(100) WEnd ;- Termina os processos que ficaram pendentes While 1 If ProcessExists('AdskScSrv.exe') Then ProcessClose('AdskScSrv.exe') ElseIf ProcessExists('AdsKCleanup.0001') Then ProcessClose('AdsKCleanup.0001') ElseIf ProcessExists('WSCommCntr1.exe') Then ProcessClose('WSCommCntr1.exe') ElseIf ProcessExists('acad.exe') Then ;- Line 19 ProcessClose('acad.exe') EndIf WEnd Exit thanks Link to comment Share on other sites More sharing options...
Triblade Posted May 14, 2007 Share Posted May 14, 2007 (edited) While 1 If ProcessExists('AdskScSrv.exe') Then ProcessClose('AdskScSrv.exe') ElseIf ProcessExists('AdsKCleanup.0001') Then ProcessClose('AdsKCleanup.0001') ElseIf ProcessExists('WSCommCntr1.exe') Then ProcessClose('WSCommCntr1.exe') ElseIf ProcessExists('acad.exe') Then ;- Line 19 ProcessClose('acad.exe') EndIfWEndThis While WEnd loop never ends. If every process is closed the loop goes into overdrive and makes ur CPU mad.Try something like this just above the WEnd: Sleep(500)This should be much better. This doesn't end your loop, so the program still tries to close the processes indefinetly.Greetz,TriEdit: typo Edited May 14, 2007 by Triblade My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger) Link to comment Share on other sites More sharing options...
Toady Posted May 14, 2007 Share Posted May 14, 2007 Autocad ROCKS! www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding 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