AutoHotkey Community

It is currently May 26th, 2012, 12:16 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: September 12th, 2008, 9:05 pm 
Offline

Joined: August 26th, 2008, 3:34 pm
Posts: 22
Hey, script looks good, unfortunately, when I try and run it I get a missing mfc71.dll error. I have downloaded a copy and placed it in my system and system32 folders, but when I try and register the dll I get a LoadLibrary failed message :(

Any ideas? Or just the key codes for a Logitech LX710 :p

Thanks in advance


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 16th, 2008, 11:59 am 
Offline

Joined: September 16th, 2008, 11:54 am
Posts: 1
Location: Auckland, New Zealand
I'm having the same problem. Noone out there with any ideas? This dll/script seems like the only way to identify and map my fn & eject keys on my apple keyboard, and in accordace with murphy's law it doesn't work!


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Media Keys
PostPosted: September 16th, 2008, 8:54 pm 
Hi

I was trying to use this script to map the keys of a remote control I bought with Windows MCE. I fact MCE doesn't allow me to use the media keys with media player classic, and I don't want to use WMP.

But when using the AutoHotkeyRemoteControlDLL.ahk I get an error: as soon as i select any device, I'm greeted by autohotkey telling me:
Code:
Error: This DllCall requires a prior VarSetCapacity. The program is now unstable and will exit.


It's ridiculous. The error is notified on line 99 while the assertion requested is at line 97. :shock:
There must be something I'm not understanding...


Report this post
Top
  
Reply with quote  
 Post subject: Re: Media Keys
PostPosted: October 22nd, 2008, 11:21 pm 
Anon Hi Mom! wrote:
Hi

I was trying to use this script to map the keys of a remote control I bought with Windows MCE. I fact MCE doesn't allow me to use the media keys with media player classic, and I don't want to use WMP.

But when using the AutoHotkeyRemoteControlDLL.ahk I get an error: as soon as i select any device, I'm greeted by autohotkey telling me:
Code:
Error: This DllCall requires a prior VarSetCapacity. The program is now unstable and will exit.


It's ridiculous. The error is notified on line 99 while the assertion requested is at line 97. :shock:
There must be something I'm not understanding...

same error, but on line 123


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 5th, 2008, 5:44 pm 
Offline

Joined: January 14th, 2008, 9:10 pm
Posts: 35
Location: Germany
Hi,
this Script looks pretty useful to me. I tried it with my Cyberlink Remote which shows up as an HID. (Well, actually it show up as three HIDs in device manager.) And most of the buttons are detected nicely.
However, some buttons don't work yet. They are detected, but the script messes up, so hopefully somebody can help me with this.

If I use the Detect-Keys-Script for the enter-button or the number-buttons, then the button is detected, but in the appearing window the field that normally shows "AutoHotkey command to run" is missing. The saved "Keyboard Media Keys Actions.ahk" then looks like this:
Code:
Key_Action_Check:
  IfEqual, Vals, 00000052505752575455505753000000000000000000000000000000...
GoSub 00000052505752575455505753000000000000000000000000000000...
Return



00000052505752575455505753000000000000000000000000000000...; Enter-Button
  AutoHotkey command to run
  Return


The detected code is way too long.
I'm using Vista 32bit and the latest AutohotkeyRemoteControl.dll that I could find. The older one asked for mfc71.dll, but the newer one works.

Any ideas on this?

Edit: Sorry for the extremely long lines. How can I fix them?

Edit2: This is what AutoHotkeyRemoteControlDLL.ahk tells me about the enter-button:
MakeCode: 28
Flags: 0
Key: 13
Msg: 256
Extrainfo: 4291023949

Edit3: I finally cropped the long lines.


Last edited by elmulti on August 25th, 2009, 10:11 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2009, 8:31 pm 
Offline

Joined: August 20th, 2009, 7:24 pm
Posts: 6
Anonymous wrote:
ok sorry this is easy of course:


4854: ; eject -> delete
send {delete}
Return


I've been following this thread and the Autohotkey FAQ to get my Eject button to server as a 'Forward Delete' button. This on an Apple Aluminium mini Keyboard connected to a straight XP machine. Autohotkey is already working nicely to do a couple of key swaps for this keyboard.

Using the great little Keyboard Media Keys - detect keys.ahk script, I am told that this media key has the code 4852. (Interestingly, the Eject button is the only button detected by above mentioned script).

So I added the below script to my key swapping script that already works:

Key_Action_Check:
IfEqual, Vals, 4852, GoSub 4852
Return
4852: ; Eject
send {Delete}
Return

...it seems to be accepted by AHK, but does nothing!

is it obvious to anyone where I'm going wrong?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2009, 10:09 pm 
Offline

Joined: January 14th, 2008, 9:10 pm
Posts: 35
Location: Germany
Your code seems to be OK, but you don't seem to be using it correctly.
You should really take the time to read through the INSTRUCTIONS.txt file and the first few lines of the file "Keyboard Media Keys.ahk".

You need to run the "Keyboard Media Keys.ahk" file in order to make any of this work. If you just copied those 6 lines into your own script, then they will in fact do nothing at all. Try including your lines in "Keyboard Media Keys Actions.ahk" and run the main script, then your button should work like you want it to.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2009, 10:23 am 
Offline

Joined: August 20th, 2009, 7:24 pm
Posts: 6
This gets me a bit closer... using the above advice, when I run the "Keyboard Media Keys.ahk" script I can see it's pulling in my subroutine from "Keyboard Media Keys Actions.ahk" because when I forgot to add the action like this:

4852: ; Eject
Return

it correctly warned me that no action was defined.

So I changed it to:

4852: ; Eject
send {Delete}
Return

now, the script starts up, no error, is silent BUT not only does the Eject fail to do anything, I also noticed that the AHK system tray icon does not appear though an Autohotkey process is visible in Task Manager 2nd tab..

Is this to do with the DLL file? Does it need to be in a special folder? Mine is in the same folder where I run the script from.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2009, 7:56 pm 
Offline

Joined: January 14th, 2008, 9:10 pm
Posts: 35
Location: Germany
It is OK, that you don't see a tray icon. The script includes the line
Code:
#NoTrayIcon
which hides it. You can put a ";" at the beginning of this line or remove it, to see the tray icon.
In addition I suggest you try writing something like
Code:
MsgBox Test!
as the action for your button. This way it's easier to get the result by trial and error.
The DLL should be in the same folder as the script files, this doesn't seem to be your problem.

If you still can't get it to work, please post your whole "Keyboard Media Keys Actions.ahk" file as code here.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 28th, 2009, 7:13 pm 
Offline

Joined: August 20th, 2009, 7:24 pm
Posts: 6
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2009, 4:53 pm 
Offline

Joined: January 14th, 2008, 9:10 pm
Posts: 35
Location: Germany
I'm glad that I could be of help. If you need help including the script in your own custom one, let me know.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 15th, 2009, 1:26 pm 
Offline

Joined: September 15th, 2009, 1:23 pm
Posts: 1
elmulti wrote:
The saved "Keyboard Media Keys Actions.ahk" then looks like this:
Code:
Key_Action_Check:
  IfEqual, Vals, 00000052505752575455505753000000000000000000000000000000...
GoSub 00000052505752575455505753000000000000000000000000000000...
Return



00000052505752575455505753000000000000000000000000000000...; Enter-Button
  AutoHotkey command to run
  Return


The detected code is way too long.


emulti, i'm getting really long codes too, to the point where the script terminates, probably because that's just too big of a name for a label... how did you solve this?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 15th, 2009, 10:43 pm 
Offline

Joined: January 14th, 2008, 9:10 pm
Posts: 35
Location: Germany
karvastor wrote:
emulti, i'm getting really long codes too, to the point where the script terminates, probably because that's just too big of a name for a label... how did you solve this?

I didn't solve that problem. I used Michas DLL & script to change a lot of buttons, but I couldn't get the ones with the really long codes to work in AHK.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2009, 10:34 am 
Offline

Joined: November 30th, 2009, 10:33 am
Posts: 2
I tried to detect my Media: Mute (E0_20) button but it is not recognized.
What can I do?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Media Keys
PostPosted: December 16th, 2009, 2:49 am 
Offline

Joined: November 8th, 2009, 2:46 am
Posts: 234
Location: Canberra Oz
Anon Hi Mom! wrote:
Hi

I was trying to use this script to map the keys of a remote control I bought with Windows MCE. I fact MCE doesn't allow me to use the media keys with media player classic, and I don't want to use WMP.

But when using the AutoHotkeyRemoteControlDLL.ahk I get an error: as soon as i select any device, I'm greeted by autohotkey telling me:
Code:
Error: This DllCall requires a prior VarSetCapacity. The program is now unstable and will exit.


It's ridiculous. The error is notified on line 99 while the assertion requested is at line 97. :shock:
There must be something I'm not understanding...


I'm getting similar, I checked the script and it has VarSetCapacity prior to the DLLCall :?, anyone know what's happening?

Michael


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: bbwht, oldbrother and 58 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group