blackhydra866 Posted May 27, 2009 Share Posted May 27, 2009 I want to have a script that disables my avast! antivirus before it runs the next section of the script. What the script does is run all of the messengers I use, but when avast! is enabled it starts scanning everything that is going on and it makes it go haywire and it slows the process. Right now the script is VERY basic and it just launches the messengers: Run("C:\Program Files\Xfire\xfire.exe") Run("C:\Program Files\AIM\aim.exe") Run("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") Run("C:\Program Files\Steam\Steam.exe") I don't know how to script it but could there be a way to sort of give the coordinates of the tray icon then automate a right click, then go up a bit and do a left click to stop avast! briefly? Link to comment Share on other sites More sharing options...
theholycow Posted May 27, 2009 Share Posted May 27, 2009 Yes this can easily be done, a few different ways. One, as you suggested, would be to automate a right click and the following clicks. This can be done with MouseClick, and the AutoIT window tool can tell you the coordinates for that tray icon. There is a tutorial for this. However, I've found that when I did anything coordinate based, within a week or two the coordinates would change for whatever reason, so you may consider using something like ProcessClose and simply ending Avast and then restarting it. Christianity: In the beginning, there was God, who always was there and created everything.Atheism: In the beginning, there was nothing, which exploded. Both sides look bad... Link to comment Share on other sites More sharing options...
blackhydra866 Posted May 27, 2009 Author Share Posted May 27, 2009 Thank you very much This all seems very simple to me now simulating mouse clicks. Link to comment Share on other sites More sharing options...
blackhydra866 Posted May 27, 2009 Author Share Posted May 27, 2009 (edited) Well the automated clicking did work but since the tray icon moves around quite a bit when I have other things open it's not really an option. So i'm going with the ProcessClose command and here is what my script is looking like now.. ; Close all avast! processes ProcessClose("ashDisp.exe") ProcessClose("ashServ.exe") ProcessClose("ashWebSv.exe") ProcessClose("aswUpdSv.exe") ; Waits for avast! to close ProcessWaitClose("notepad.exe") ; Run messengers Run("C:\Program Files\Xfire\xfire.exe") Run("C:\Program Files\AIM6\aim6.exe") Run("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") Run("C:\Program Files\Steam\Steam.exe") But it's just not.. working? avast continues to stay open.. Edited May 27, 2009 by blackhydra866 Link to comment Share on other sites More sharing options...
Developers Jos Posted May 27, 2009 Developers Share Posted May 27, 2009 I don't know why but do not get this warm and comfy feeling reading this request. Jos 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. Link to comment Share on other sites More sharing options...
muncherw Posted May 27, 2009 Share Posted May 27, 2009 I don't know why but do not get this warm and comfy feeling reading this request.JosI'm not sure why but the wording here struck me as hilarious! Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
Inverted Posted May 27, 2009 Share Posted May 27, 2009 (edited) Try if taskkill can terminate the process(es) This sounds to me like a trojan that disables the antivirus and spams a malicious link to any IM client. Which is silly Edited May 27, 2009 by Inverted Link to comment Share on other sites More sharing options...
blackhydra866 Posted May 27, 2009 Author Share Posted May 27, 2009 I don't know why but do not get this warm and comfy feeling reading this request.JosThis sounds to me like a trojan that disables the antivirus and spams a malicious link to any IM client. Which is silly Oh dear you guys are nuts! Every time I come home and turn on my computer I go through the same routine of opening all of my messaging applications at once but i've just really been wanting a way to do it all at once, and also disabling avast so the process goes quicker and doesn't have to scan everything that's opening in memory (which bogs down my relatively bad CPU). But yeah.. i'm doing this because i'm lazy and I love scripting . Even though i'm not very good at scripting.. lol. Trying to get better.. i've had many posts here for help.I just realized in the code I actually forgot to change that "notepad.exe" which I took from the example for the "ProcessWaitClose("notepad.exe")" command.. whoops. Do I even need this command anyway? I was just assuming that it would be a good idea to have it check for all the avast processes. I will definitely try the taskkill commands. Link to comment Share on other sites More sharing options...
SkinnyWhiteGuy Posted May 27, 2009 Share Posted May 27, 2009 Well, I can see a couple solutions to your problem, but they aren't related to AutoIt: Set up exceptions for Avira to ignore those files/folders. Don't use separate programs, go for something like Trillian, Pidgin, MirandaIM, or Digsby that is just 1 program that connects to many different Instant Messenger services. Not sure why you'd want to disable your anti-virus at the same time as you are connecting your computer to a lot of computer networks that have been known to have issues in the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 27, 2009 Developers Share Posted May 27, 2009 Oh dear you guys are nuts! Every time I come home and turn on my computer I go through the same routine of opening all of my messaging applications at once but i've just really been wanting a way to do it all at once, and also disabling avast so the process goes quicker and doesn't have to scan everything that's opening in memory (which bogs down my relatively bad CPU). But yeah.. i'm doing this because i'm lazy and I love scripting . Even though i'm not very good at scripting.. lol. Trying to get better.. i've had many posts here for help.I just realized in the code I actually forgot to change that "notepad.exe" which I took from the example for the "ProcessWaitClose("notepad.exe")" command.. whoops. Do I even need this command anyway? I was just assuming that it would be a good idea to have it check for all the avast processes. I will definitely try the taskkill commands.I can understand you wanting to automate the normal steps of starting software, but killing any running AV program really makes me wonder why in the hell you installed it in the first place.Its like running around with a condom on your thingy and when you actually about to use your thingy, you remove the condom first. Jos TheDcoder 1 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. Link to comment Share on other sites More sharing options...
blackhydra866 Posted May 27, 2009 Author Share Posted May 27, 2009 I can understand you wanting to automate the normal steps of starting software, but killing any running AV program really makes me wonder why in the hell you installed it in the first place.Its like running around with a condom on your thingy and when you actually about to use your thingy, you remove the condom first. JosWell at the end of the script (once i'm done with the first part) i'm going to do a wait command for a little while, then have it turn back on the avast processes. Also I did try to have it "exclude" all of the messenger processes I use but it's still going to scan whatever is in memory so I don't think that would really matter? Link to comment Share on other sites More sharing options...
blackhydra866 Posted May 27, 2009 Author Share Posted May 27, 2009 (edited) Revised script again: ; Closes all avast! processes ProcessClose("ashDisp.exe") ProcessClose("ashDisp.exe") ProcessClose("ashDisp.exe") ProcessClose("aswUpdSv.exe") ; Waits for all avast! processes to close ProcessWaitClose("ashDisp.exe") ProcessWaitClose("ashDisp.exe") ProcessWaitClose("ashDisp.exe") ProcessWaitClose("aswUpdSv.exe") ; Run messengers Run("C:\Program Files\Xfire\xfire.exe") Run("C:\Program Files\AIM6\aim6.exe") Run("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") Run("C:\Program Files\Steam\Steam.exe") The messengers load but avast still sits there in the tray, lol EDIT: One more tiny edit with another revision to show you what i'm trying to do here: ; Closes all avast! processes ProcessClose("ashDisp.exe") ProcessClose("ashDisp.exe") ProcessClose("ashDisp.exe") ProcessClose("aswUpdSv.exe") ; Waits for all avast! processes to close ProcessWaitClose("ashDisp.exe") ProcessWaitClose("ashDisp.exe") ProcessWaitClose("ashDisp.exe") ProcessWaitClose("aswUpdSv.exe") ; Run messengers Run("C:\Program Files\Xfire\xfire.exe") Run("C:\Program Files\AIM6\aim6.exe") Run("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") Run("C:\Program Files\Steam\Steam.exe") ; Waits for everything to load up Sleep(60000) ; Restore avast! Run("C:\Program Files\Alwil Software\Avast4\ashAvast.exe") Edited May 27, 2009 by blackhydra866 Link to comment Share on other sites More sharing options...
lordicast Posted May 28, 2009 Share Posted May 28, 2009 Its like running around with a condom on your thingy and when you actually about to use your thingy, you remove the condom first. Jos@Jos, bAHWHahhahahahah@blackhydra866, instead of using clicks why not use other commands what are you trying to do function wise? [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
muncherw Posted May 28, 2009 Share Posted May 28, 2009 If you do this everytime wouldn't it be easier to leave avast off and make a script that turns it on after a couple of minutes? Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
trangvangtt Posted March 4, 2019 Share Posted March 4, 2019 (edited) <snip> Edited March 4, 2019 by JLogan3o13 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 4, 2019 Moderators Share Posted March 4, 2019 This post should have died 10 years ago. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts