| View previous topic :: View next topic |
| Author |
Message |
braintje Guest
|
Posted: Wed Feb 18, 2009 2:50 am Post subject: Windows-D key causes trouble, howto fix? |
|
|
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
|
Posted: Wed Feb 18, 2009 3:43 pm Post subject: |
|
|
| Your script looks fine to me... but i'm no expert... would be curious to see what the explanation is |
|
| Back to top |
|
 |
vahju
Joined: 17 Feb 2008 Posts: 296
|
Posted: Wed Feb 18, 2009 8:57 pm Post subject: |
|
|
| Code: | #d::
FormatTime, TimeString,, yyyy'-'MM'-'dd
Send, %Timestring%
Send, {# up}{d up} ;<-------Try this
return |
|
|
| Back to top |
|
 |
poo_noo
Joined: 08 Dec 2006 Posts: 248 Location: Sydney Australia
|
Posted: Wed Feb 18, 2009 9:20 pm Post subject: |
|
|
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 |
|
 |
braintje Guest
|
Posted: Wed Feb 18, 2009 11:47 pm Post subject: |
|
|
oo thanx for the feedback guys!!
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
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
thanx a lot guys! |
|
| Back to top |
|
 |
braintje Guest
|
Posted: Sat Mar 07, 2009 7:15 pm Post subject: |
|
|
hmmm, i was so happy it did work until today
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
|
Posted: Sat Mar 07, 2009 7:26 pm Post subject: |
|
|
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  _________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞ |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Sat Mar 07, 2009 7:38 pm Post subject: |
|
|
| 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 |
|
 |
braintje Guest
|
Posted: Mon Mar 09, 2009 3:06 am Post subject: |
|
|
| 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  |
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)
|
Posted: Mon Mar 09, 2009 5:31 am Post subject: |
|
|
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 |
|
 |
braintje Guest
|
Posted: Sat Mar 21, 2009 2:41 am Post subject: |
|
|
i found in the manual (yes i know we all should rtfm) ....
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 |
|
 |
|