Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

blockinput not working under windows vista


  • Please log in to reply
12 replies to this topic
Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
hi friends...till date i use to execute my script under windows xp version but today when i executed it in windows vista then the 'Blockinput' method didnt worked in short it was not blocking....did anyone encounter this problem??? can anyone help me in getting it work under vista??
thanks always

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009

hi friends...till date i use to execute my script under windows xp version but today when i executed it in windows vista then the 'Blockinput' method didnt worked in short it was not blocking....did anyone encounter this problem??? can anyone help me in getting it work under vista??
thanks always

Hi old friend,
I have Vista 32 bit, and blockinput works as expected. Would you please post a script that illustrates the problem?

Leef_me

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
well just a simple script like this
lcontrol & esc::
BlockInput,on
Return

lalt & esc::  
BlockInput,off
Return
well thanks for a quick response

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009
I hit the hotkeys "lcontrol & esc"
:roll: then the keyboard and mouse didn't work :roll:
then I hit "lalt & esc" and all was normal again
Just as expected.

Is that the behavior you expect? Is that the behavior you get?

Here is another thread I was involved in that help my understanding.
<!-- m -->http://www.autohotke... ... blockinput<!-- m -->

:?: How about you try my version?
f1::
secs=5
msecs:=secs*1000

msgbox when you hit ok, the keyboard and mouse will be blocked for %secs% seconds
settimer, unblock, -%msecs%
BlockInput,on
Return

unblock: 
BlockInput,off
msgbox keyboard and mouse restored to normal function
Return


Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009

I hit the hotkeys "lcontrol & esc"
then the keyboard and mouse didn't work
then I hit "lalt & esc" and all was normal again
Just as expected.

Is that the behavior you expect? Is that the behavior you get?

yes i want this behaviour but it doesnt works as its not blocking anything
thanks

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
hi leef_me i dnt knw hw its working on ur pc bcoz i tried ur code of blockinput on vista its not working man....

michail
  • Members
  • 23 posts
  • Last active: May 30 2010 09:11 PM
  • Joined: 11 Apr 2010
Windows 7 and I have the same problem. BlockInput doesn't work at all. Maybe because of UAC? Jasdeep, try to run Autohotkey as Admin

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
thanks michail for the reply but even after running it as a admin it didnt worked

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
any clues to make it working under vista and win7??????????????

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
I've read from a few different sources that BlockInput requires admin rights on Vista and 7.

It works just fine for me running as admin - on Windows 7 with UAC disabled and Windows Vista SP2 with UAC enabled. As a limited user (tested only on my Vista VM, which has UAC enabled), I am denied access. The following may be used to troubleshoot:
if DllCall("BlockInput", "int", 1)  ; attempt to block
    DllCall("BlockInput", "int", 0)  ; unblock
else
    MsgBox BlockInput failed, error %A_LastError%.
; ERROR_ACCESS_DENIED = 5

even after running it as a admin it didnt worked

I have no explanation for that. Are you sure it was running as admin?
MsgBox % A_IsAdmin  ; Should display 1.
A limited workaround when BlockInput doesn't work is to create numerous hotkeys, as in Andreone's script or to register a keyboard hook (a mouse hook would also be feasible).

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
thanks lexikos i will give it a try

Jasdeep
  • Members
  • 258 posts
  • Last active: Apr 23 2010 01:36 PM
  • Joined: 09 Nov 2009
thanks man its working when i run the program as an administrator. Previously also i run with administrator but it was not working and the reason was i was checking it on an VMware image (virtual image of windows 7) but yesterday when i checked it on genuine copy of windows 7 it started working.

[Deleted double post. ~jaco0646]

Adab
  • Guests
  • Last active:
  • Joined: --
I had this problem as well with 7, but I cleared it all up when I ran the program in compatility mode with Windows XP SP 3