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 

Keyboard Media Keys (for USB HID devices!)
Goto page Previous  1, 2, 3
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Lexikos



Joined: 17 Oct 2006
Posts: 7299
Location: Australia

PostPosted: Wed Dec 16, 2009 10:53 am    Post subject: Reply with quote

Try removing the percent signs around the variable:
Code:
NameSize = 5000
VarSetCapacity(Name, %NameSize%)

What the above actually does is create a variable named 5000, retrieve an empty string from it and fail to set Name's capacity. (Percent signs in expressions are used for double-derefs.)
Back to top
View user's profile Send private message Visit poster's website
Sebastiar



Joined: 15 Dec 2009
Posts: 3

PostPosted: Fri Jan 22, 2010 1:13 am    Post subject: Reply with quote

Key_Action_Check:
IfEqual, Vals, 5154565548, GoSub 5154565548
Return


5154565548: ; Word
COntrolSend,, {f1}
Return



The F1 is sent to the desktop, I need to send to the active window

as it should do?
Back to top
View user's profile Send private message
applove



Joined: 15 Mar 2010
Posts: 1

PostPosted: Mon Mar 15, 2010 4:05 am    Post subject: Reply with quote

buglawton wrote:
I put the test message in and could see the key is being detected... so I commented it out and uncommented my original send delete command... lo and behold it now works! Even the Ctrl-Alt-Delete key combo now works on XP using the Apple mini keyboard, using Eject ast the substitute key for Delete.

Cool!

And many thanks for the help.


Hello buglawton & other Gurus,

I recently bought a apple wireless mini keyboard (bluetooth 2 battery version) to use with my HP laptop and I have been using the UAWKS to get some of the non-functional keys working.

However, just like your quest a few months ago, I too tried to see if there is any way of using the eject button as the normal windows 'delete'.

A lot of googling around pointed me towards your post and I tried to copy your technique. But I am from an absolutely non-tech background and though I tried my best, I could not get anything working except for some wierd error messages.

I would be eternally grateful if you could help me out with the please Rolling Eyes

Can you please send me the .ahk files that I need to change (the ones that are successfully working for you?) so that I can compile them and run the scripts on my machine.

I love the great little keyboard, but desperately miss the normal delete button Crying or Very sad

BTW I am using Windows 7.

Thanks & regards,
Max
Back to top
View user's profile Send private message
Kermet
Guest





PostPosted: Sun Jun 06, 2010 8:06 am    Post subject: Reply with quote

Hello,

the script itself works fine, but with my logitech keyboard there is one problem:
the volume-wheel and the mute-button are still handled by windows 7 itself with ther default functions, so when remapped with the script i get double commands (the remapped one and the original command).
is there a way to disable the handling from windows itself or catch the functions exclusive with autohotkey?

thanks
Back to top
alvinp
Guest





PostPosted: Fri Jul 02, 2010 9:05 pm    Post subject: Reply with quote

applove wrote:
buglawton wrote:
I put the test message in and could see the key is being detected... so I commented it out and uncommented my original send delete command... lo and behold it now works! Even the Ctrl-Alt-Delete key combo now works on XP using the Apple mini keyboard, using Eject ast the substitute key for Delete.

Cool!

And many thanks for the help.


Hello buglawton & other Gurus,

I recently bought a apple wireless mini keyboard (bluetooth 2 battery version) to use with my HP laptop and I have been using the UAWKS to get some of the non-functional keys working.

However, just like your quest a few months ago, I too tried to see if there is any way of using the eject button as the normal windows 'delete'.

A lot of googling around pointed me towards your post and I tried to copy your technique. But I am from an absolutely non-tech background and though I tried my best, I could not get anything working except for some wierd error messages.

I would be eternally grateful if you could help me out with the please Rolling Eyes

Can you please send me the .ahk files that I need to change (the ones that are successfully working for you?) so that I can compile them and run the scripts on my machine.

I love the great little keyboard, but desperately miss the normal delete button Crying or Very sad

BTW I am using Windows 7.

Thanks & regards,
Max


This script helped me a lot - the lack of the delete key was driving me insane! Here's my config if you need it. Just download and run!

http://www.alvinpoh.com/how-to-remap-keyboard-keys-in-windows-such-as-the-with-apple-keyboard/
Back to top
DHMH



Joined: 17 Jul 2008
Posts: 225

PostPosted: Mon Aug 09, 2010 12:28 pm    Post subject: Reply with quote

@topic:
Does this work with AverMedia remote control? I saw something like that already in this forum Very Happy
Back to top
View user's profile Send private message Visit poster's website
Guest5
Guest





PostPosted: Thu Aug 19, 2010 11:19 pm    Post subject: MFC71.DLL error Reply with quote

Hi,
I've got a few key remaps running successfully but am struggling to get the much-coveted 'eject-to-fwd-delete' function working.
I've tried following Alvin's advice but keep getting this error when I try to run the files he's provided links to. "The program can't start because MFC71.DLL is missing from your computer." followed by "RegisterDevice failed. Errorcode: -3"
Any advice or a quick solution to getting 'eject-to-fwd-delete' wroking please?
Thanks
Back to top
tabakkie
Guest





PostPosted: Sun Sep 12, 2010 6:23 pm    Post subject: Reply with quote

I also have been trying to map forward delete to the eject button on my macbook.

I've actually got it working, but when I press it once it executes 2 delete actions, 1 when pressed and 1 when released.

How can I disable the release action?

Thanks.


this is my code:



Key_Action_Check:
IfEqual, Vals, 0000, GoSub 0000
Return

0000: ; eject
send {delete}
Return
Back to top
tabakkie
Guest





PostPosted: Wed Sep 15, 2010 11:50 pm    Post subject: Reply with quote

anybody? see above...
Back to top
specter333



Joined: 15 Jan 2007
Posts: 527

PostPosted: Fri Dec 31, 2010 6:17 pm    Post subject: Reply with quote

Hi, great script.

I've been testing your script to see if it will recognize the key on my remote that I can't detect with AHKHID. It seems to work pretty much the same, it sees all the other keys but the power key.
http://www.autohotkey.com/forum/viewtopic.php?t=41397&start=256

At this page,http://www.lvr.com/hidpage.htm I found a tool that gave me the usage and usage page for the power button it's usage 1 usage page 128 which is actually defined as a monitor usage page. I put this info into your script and it still doesn't receive input from it.

Can anyone tell me why the AHK scripts can't dectect this button and if there is a work around? Other software has detected it and allowed me to use it but I want to use it with AHK scripts.

Any ideas would be appreciated. Thanks
Back to top
View user's profile Send private message
darkeyez



Joined: 03 Jun 2011
Posts: 8

PostPosted: Sun Jun 05, 2011 12:15 am    Post subject: Reply with quote

can't seem to get these to run on my computer. get errors for the goto function and when I replace it with gosub, I get the gui in Japanese... wth?

i
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
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