AutoHotkey Community

It is currently May 27th, 2012, 11:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Disabling a window
PostPosted: July 13th, 2010, 7:52 pm 
Offline

Joined: May 15th, 2009, 4:49 pm
Posts: 14
Location: Tulsa, OK
We have an issue with a recent upgrade on our PC's at work.. Basically we get a svchost.exe - Application Error box that pops up. If the user clicks OK or CANCEL, the computer will restart. IT isn't going to have a fix in place for a week or two.

The title is svchost.exe - Application Error
The class is: ahk_class #32770

I have tried a few methods, but nothing is working. What I would like to do is prevent someone from hitting a SPACEBAR or ENTER into the window by mistake, which would trigger a restart.

I tried:

Code:
IfWinActive, ahk_class #32770
Send !Tab
loop, 50
return


I also tried:

Code:
IfWinActive, svchost.exe - Application Error
Send !Tab
return


I also tried to use a WinHide approach too, but with no success.



Any ideas???


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2010, 8:32 pm 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
Can you move it outside of the visible screen?

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2010, 8:34 pm 
Offline

Joined: May 15th, 2009, 4:49 pm
Posts: 14
Location: Tulsa, OK
Yes, but that only eliminates mouseclicks, not key presses if/when the window is made active, or becomes active after another window closes.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2010, 8:34 pm 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Is this piece of code your entire code?!

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2010, 8:38 pm 
Offline

Joined: May 15th, 2009, 4:49 pm
Posts: 14
Location: Tulsa, OK
Yeah, it's just few things I've tried..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2010, 8:56 pm 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
In that case, you obviously need to put that inside an infinite loop or something like that.
Code:
Loop
  IfWinActive, svchost.exe - Application Error
    Send, !{Tab}


Notice that it should be {Tab} (as seen here: http://www.autohotkey.com/docs/commands/Send.htm).

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2010, 9:02 pm 
Offline

Joined: June 7th, 2008, 6:00 am
Posts: 389
Code:
WinSet, Style, +0x8000000, (WinTitle)


Disables mouse clicks and keystrokes on the specified window.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2010, 9:40 pm 
Offline

Joined: May 15th, 2009, 4:49 pm
Posts: 14
Location: Tulsa, OK
Very nice.. That's pretty much what I was looking for.. I will try that and put it in an infinite loop as previously suggested..

Thanks for the help..

H


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2010, 11:30 pm 
Offline

Joined: June 7th, 2008, 6:00 am
Posts: 389
Hannibal_32 wrote:
Very nice.. That's pretty much what I was looking for.. I will try that and put it in an infinite loop as previously suggested..

Thanks for the help..

H

If you were referring to my post, it doesn't need an infinite loop. Just needs to be set once. ;)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, MSN [Bot] and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group