AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with locking Vista

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Mfr
Guest





PostPosted: Mon Jan 14, 2008 9:38 pm    Post subject: Problem with locking Vista Reply with quote

Hi *,

if I use this script
Code:
#m::
Send, Mailings.M@rcFriedrich.de
return

and I press "left Windows key" + "m" Windows types "Maiings." (without the character "l") more or less and locks windows so I have to log in again.

I think "left Windows key" + "l" means "lock Windows" but how can I switch this off?

I never have had that with XP!

Also the typing is quite slowly in comparison with XP (the old Laptop was as fast as "Cut & Paste" with the new one under Vista you can watch each character appearing).

Regards

Marc
Back to top
Kellianjaxon



Joined: 05 Jan 2008
Posts: 39

PostPosted: Thu Jan 17, 2008 2:03 am    Post subject: Reply with quote

From AHK help:
Quote:

There may be times when a hotkey should wait for its own modifier keys to be released before continuing. Consider the following example:

^!s::Send {Delete}

Pressing Control-Alt-S would cause the system to behave as though you pressed Control-Alt-Delete (due to the system's aggressive detection of Ctrl-Alt-Delete). To work around this, use KeyWait to wait for the keys to be released; for example:

^!s::
KeyWait Control
KeyWait Alt
Send {Delete}
return


As for slow hotstrings, have you tried experimenting with SetKeyDelay? Also, you might want to try out SendInput instead of Send, in which case you don't need to worry about SetKeyDelay.
Back to top
View user's profile Send private message
MFr
Guest





PostPosted: Sun Jan 20, 2008 9:12 pm    Post subject: Reply with quote

Hi Kellianjaxon,

thanks for the idea!
I changed the code to
Code:
; Window m (Mailadresse Mailings.M@rcFriedrich.de)
; --------
#m::
Send, Mailings.M@rcFriedrich.de
return

; Window t (Mailadresse Mailings.M@rcFriedrich.de)
; --------
#t::
SendInput, Mailings.M@rcFriedrich.de
return


and made some tests (input to ultraedit):
Code:
Win-m: Mailings.M@rcFriedrich.de
Win-t: Maiin
Win-m: Mailings.M@rcFriedrich.de
Win-t: Maiin
Win-m: Maiings.M
Win-t: Maiin
Win-m: Mailings.M@rcFriedrich.de

-> SendInput alsways locks my Vista opens regedit and some other windows-applikations...
-> Send sometimes worked fine (and slowly - I think it depends on how long the (left) windows-key is pressed)

I think that the key-down messages (or what else is used) are not send to the applikation but to windows - like win-l locks vista. There must be a change between XP and Vista...

Regard

Marc
Back to top
MFr
Guest





PostPosted: Sun Jan 20, 2008 9:19 pm    Post subject: Reply with quote

add on:

If I press the (left) window-key long it is the same behavior like SendInput:
Code:
Win-m (very short): Mailings.M@rcFriedrich.de
Win-m (very long): Maiin


=> I think the Send command starts to early with sending the key-messages. It shold wait for key-up for all used keys (especial for shift-, alt-, ctrl- and windows-keys) before it sends the keystrokes.

Does anybody can reproduce this behavior?

Regard

Marc
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2472
Location: Australia, Qld

PostPosted: Mon Jan 21, 2008 2:34 am    Post subject: Reply with quote

Kellianjaxon already posted one workaround:
Quote:
To work around this, use KeyWait to wait for the keys to be released


Also, this topic has been brought up before.
Windows Vista: Windows key - Send conflict
Chris wrote:
samc wrote:
LCtrl-L however doesn't do anything (passes l through), and LWin-L unfortunately acts like LWin and locks the screen!
...
I wonder if Win-L is handled by a lower part of the OS as a security measure.
Yes, that's probably it. And because of it, there probably won't be a complete solution. Microsoft has apparently decided that the Windows key is the exclusive domain of the OS, similar to Ctrl-Alt-Del and the behavior of FN keys on some laptops.

Rodolfo wrote:
I found a workaround (don't know if this has been posted elsewhere...)

At least for the problem I was having in Vista x64, which was that I couldn't run this script because it would press the Win+L combination and lock the computer:

Code:

#Numpad1::
SendInput myemail@hotmail.com
return


Right on the "l", the problem showed up.... This is my workaraound (as there only seems to be a problem with the letter L, but could work with any letter given its proper ascii code):

Code:

#Numpad1::
SendInput myemail@hotmai{ASC 0108}.com
return


Hope this help somebody Razz

(Oh and btw, I have UAC enabled and I am running the AutoHotkey.exe with the "Run As Administrator" option turned on because of a special need while launching UltraExplorer through a AHK script ... don't know if my workaraound woulnd't work if the latter conditions didn't exist, but I think it still would).
Back to top
View user's profile Send private message
MFr
Guest





PostPosted: Mon Jan 21, 2008 8:19 pm    Post subject: Reply with quote

Hi lexikos,

now it woks fine with KeyWait Smile (after I found out that Vista was kidding me with the "VirtualStore" thing Confused - sorry for that Embarassed ).

many thanks

Marc
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group