 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
shipoopi Guest
|
Posted: Fri Apr 11, 2008 2:27 pm Post subject: ExitApp not working |
|
|
| Code: |
#notrayicon
#singleinstance force
loop,
{
winkill,Data Execution Prevention - Microsoft Windows
}
Sleep, 30000
ExitApp
|
I have the above code added to my list of startup programs on my work laptop. I keep getting an annoying message because of an issue with my antivirus software. Eventually the problem will be fixed the right way, but for now I wrote the above script to kill the repeating window. This script consumes a lot of CPU power, so I want it to automatically close after 30 seconds. But it doesn't close after 30 seconds. What am I doing wrong? |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 761 Location: Florida
|
Posted: Fri Apr 11, 2008 2:33 pm Post subject: |
|
|
| Code: |
#notrayicon
#singleinstance force
Settimer,Exit,30000
loop,
{
winkill,Data Execution Prevention - Microsoft Windows
Sleep,100
}
Exit:
ExitApp |
_________________ [Join IRC!]
 |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
|
| Back to top |
|
 |
Firewolf91
Joined: 19 Oct 2007 Posts: 134 Location: PA
|
Posted: Fri Apr 11, 2008 3:12 pm Post subject: |
|
|
does the error continuously pop up forever? or only for a certain amount of time or popups?
you could have it loop with a sleep of around 100 that detects when the popup exists, then closes it after.
what to do:
find the title of the popup window, make sure it's not a variable name in the title. if it is a specific title, great.
use:
| Code: | | IfWinExist, titleOfAntivirusPopup |
If necessary, (to make sure you find the right window) add a comma after this code and include some text IN the window that will always show up. i.e. the name of the file or error or warning.
so you could use:
| Code: | SetTimer, loopAV, 150 ;(timeTillRelaunchOfLoopAV)
return
loopAV:
IfWinExist, Data Execution Prevention - Microsoft Windows
WinKill, Data Execution Prevention - Microsoft Windows
return
^!H:: ; press CTRL-ALT-H to shutdown script
ExitApp |
NOTE: this should work if memory serves me right, and the cpu usage isn't bad. i have code somewhere to do something similar, so if this doesn't bring down the cpu usage...holler back and i'll check it out.
this code was not tested. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|