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 

Windows-D key causes trouble, howto fix?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
braintje
Guest





PostPosted: Wed Feb 18, 2009 2:50 am    Post subject: Windows-D key causes trouble, howto fix? Reply with quote

First of all, I realy love this great program!!
Now my problem: ...

I'v made a very simple script to catch WINDOWS-D (#d) and make it dump the current date.

heres my code
Code:
; WIN-d  output current date as text
;--------------------------------------------------------------

#d::
   FormatTime, TimeString,, yyyy'-'MM'-'dd
   Send, %Timestring%
return


now when doing regular windows things like email etc ... windows will now and then get confused and when i press the key "d" (WITHOUT the windows key) it prints out the date or minimizes all my applications (the normal windows behaviour for WINDOWS-D key)

My question:
- How to make the default WINDOWS-D key dead.
- if there is an error in my script, please let me know.
Back to top
firace



Joined: 08 Feb 2009
Posts: 28

PostPosted: Wed Feb 18, 2009 3:43 pm    Post subject: Reply with quote

Your script looks fine to me... but i'm no expert... would be curious to see what the explanation is
Back to top
View user's profile Send private message
vahju



Joined: 17 Feb 2008
Posts: 296

PostPosted: Wed Feb 18, 2009 8:57 pm    Post subject: Reply with quote

Code:
#d::
   FormatTime, TimeString,, yyyy'-'MM'-'dd
   Send, %Timestring%
   Send, {# up}{d up} ;<-------Try this
return
Back to top
View user's profile Send private message
poo_noo



Joined: 08 Dec 2006
Posts: 248
Location: Sydney Australia

PostPosted: Wed Feb 18, 2009 9:20 pm    Post subject: Reply with quote

This might work too. It should only fire the hotkey when the WIN key is in down state. Untested though
Code:
#d::
GetKeyState RWINstate, RWin
If RWINstate != D
   Return   ; do nothing
GetKeyState LWINstate, LWin
If LWINstate != D
   Return   ; do nothing
FormatTime, TimeString,, yyyy'-'MM'-'dd
Send, %Timestring%
return

_________________
Paul O
Back to top
View user's profile Send private message Visit poster's website
braintje
Guest





PostPosted: Wed Feb 18, 2009 11:47 pm    Post subject: Reply with quote

oo thanx for the feedback guys!! Very Happy


both seem very plausible sollutions to me.

i'll try the sollution from vahju first.
Ill let you know if the problem comes back.

as extra infomation i would like to say that i use a lot of hotkeys controlled by autohotkey. Yeah i know, i'm one of those guys that prefer the keyboard above the mouse Cool

anyway, all those other hotkeys do not make any trouble at all though they are way more advanced than the simple windows-d script.

I'll be back Wink
thanx a lot guys!
Back to top
braintje
Guest





PostPosted: Sat Mar 07, 2009 7:15 pm    Post subject: Reply with quote

hmmm, i was so happy it did work until today Sad

now i have the same problem with the key "u"

same story as with windows-d key
sometimes but not allways, when i simply press the key "u" windows starts the program "narator" it is a program i even never use lol

so i think the problem is deeper to be found in windows or autohotkey or both.

i use windows xp english sp3
Back to top
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Sat Mar 07, 2009 7:26 pm    Post subject: Reply with quote

BTW you know that DATE and TIME commands can be run directly from comspec right?

Just go to start - run - type cmd

Enter Date or Time and you will see what I mean. Now those can both be run from comspec Wink
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 3113
Location: MN, USA

PostPosted: Sat Mar 07, 2009 7:38 pm    Post subject: Reply with quote

braintje wrote:
i use a lot of hotkeys controlled by autohotkey... they are way more advanced than the simple windows-d script.


The obvious solution would be that one of these is leaving the windows key down. I'd investigate that possibility first.
Back to top
View user's profile Send private message Visit poster's website
braintje
Guest





PostPosted: Mon Mar 09, 2009 3:06 am    Post subject: Reply with quote

TheLaughingMan wrote:
BTW you know that DATE and TIME commands can be run directly from comspec right?

Just go to start - run - type cmd

Enter Date or Time and you will see what I mean. Now those can both be run from comspec Wink


sure, i knew that hehe

i use the date "hotkey" to fill in the date where i need it in windows programs, is very handy so i dont have to type the date over and over again.

i do not understand jaco0646, are you joking?
Back to top
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Mon Mar 09, 2009 5:31 am    Post subject: Reply with quote

Why not try adding an additional modifier and see if you get the same behavior? Instead of #d, switch it to ^#d, which isn't particularly obtrusive to your normal keystrokes.
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
braintje
Guest





PostPosted: Sat Mar 21, 2009 2:41 am    Post subject: Reply with quote

i found in the manual (yes i know we all should rtfm) Smile ....
to use Sendplay as prefered to Send

now (so far) it works as it should for about +- 10 days now
the trouble did not come back once at all.
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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