AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 152 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10, 11  Next
Author Message
 Post subject:
PostPosted: July 21st, 2008, 1:48 am 
Offline

Joined: July 21st, 2008, 1:36 am
Posts: 1
I've cobbled together my first script, to allow playback of BluRay from the Vista Media Center main menu, by using PowerDVD.

In the script, I want PowerDVD to close, when the BACK button on the MCE Remote is pressed.

The keyboard shortcut equivalent is BACKSPACE and I've put this in the script, but the remote sends something else.

I ran AutoHotkeyRemoteControlDLL and got this for the BACK button on the MCE Remote:

Device:4-Size:3 -> RawData: ->02<-->00<-->00<-
Device:4-Size:3 -> RawData: ->02<-->24<-->02<-

But I am not sure how to integrate this info into the script. Where should I place it?

Here is the script:

Code:
; Start sequence
IfWinNotExist, CyberLink PowerDVD
{
WinActivate, Windows Media Center

Run "C:\Program Files\CyberLink\PowerDVD8\PowerDVD8.exe" \FULSCREEN
WinActivate, CyberLink PowerDVD
WinMaximize

Sleep, 2500
WinMinimize, Windows Media Center
WinActivate, CyberLink PowerDVD
}
else
{
WinActivate, Windows Media Center

Sleep, 1000
WinMinimize, Windows Media Center
WinActivate, CyberLink PowerDVD
}
return




Backspace::
IfWinExist, CyberLink PowerDVD
{

IfWinNotExist, Windows Media Center
{
Run C:\Windows\ehome\ehshell.exe
}

Sleep, 1000
;WinRestore , Windows Media Center
Run C:\Windows\ehome\ehshell.exe
WinClose, CyberLink PowerDVD
ExitApp
}

IfWinExist, MediaPortal
{
Send, , Backspace, C:\Windows\ehome\ehshell.exe
}
return



Thanks!


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 4th, 2008, 10:09 am 
Offline

Joined: January 17th, 2007, 3:10 pm
Posts: 1
Thank you for such great addition, Micha!

I have been able to program Griffin Powermate volume control using your HID DLL in no time.
Finally, I could get the correct functionality from the device, which due to some problem in the original driver was not working for me.
Now that volume knob is not just decorating my desk, but actually doing something useful :lol:

I can post the code here, if anybody is having the same problem. This is specific only for
alternate Windows shells, where the Griffin's driver seems to have problem accessing the
sound mixer.

Greetings


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 22nd, 2008, 6:24 am 
I am using this product:
http://www.sandiotech.com/sandio_product.php
(it is a mouse with 3 DIGITAL joysticks)

When running this script, I get a mouse and HID which seem to be registered to it. (well two mice, two keyboards, and HID, but doesn't seem to matter which keyboard or mouse i have registered)

For mouse, it registers standard 5 buttons (3rd is scrollwheel), HID is mentioned at the bottom of post.

The mouse lets me bind directions to keys, so that part isn't really an issue (except it spams them at a rate of one press every 10ms direction is held down! - I would like a fix for this [debouncer, sorta])

What I want to use, is the pressing in of the joysticks (like the pressing in of the scrollwheel) to be mapped to something, which the software/driver does not allow. The only one that does anything (which is uncustomizable, just like button 4 and 5, lol - thankfully I have autohotkeys) is pushing in the middle stick, which simulates pressing mouse4 and mouse5 at the same time.

I would like to figure out how to use pushing in of the other two sticks, but this is not being detected in Michas script.
On HID, michas script doesn't register any actions, except if i move the middle joystick. No matter the direction pressed, every - let's say 10ms - it returns a seemingly random byte every time, the last one always being 00 though.

Device:0-Size:8 -> RawData: ->00<-->ac<-->01<-->00<-->00<-->00<-->00<-->00<-
Device:0-Size:8 -> RawData: ->00<-->ac<-->01<-->77<-->00<-->00<-->00<-->00<-
Device:0-Size:8 -> RawData: ->00<-->ac<-->01<-->62<-->00<-->00<-->00<-->00<-
Device:0-Size:8 -> RawData: ->00<-->ac<-->01<-->c7<-->00<-->00<

but as I've said, I'm only looking to map pressing of the 2 joysticks.
I'm thinking it's possible that they aren't even used, like the switches attached to the other 2 joystick pressings aren't wired to anything, or at least don't return any signal... :(


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 22nd, 2008, 6:39 am 
I think my problem can just be ignored, I think there isn't any way of using the other two sticks (or really the middle stick either, without conflicting with button 4 and 5) for this reason

-nothing show up on a test program that comes with the mouse, that shows the binary code for button presses (not the joystick movements though, those were separate), like micha's except in binary instead of decimal.

-micha's doesn't detect it either (this is on the mouse registered), it was just less obvious to me, because it was in decimal, which doesn't really make sense, but whatever.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2008, 1:17 pm 
To be able to know which HID device you are seeing with the AutoHotkeyRemoteControlDLL.ahk script ...

If you don't know, which device is your remote control, try to register all entries one by one and press a key on your remote control to see, if it is recognized.


... I found these:

Online database DriverAgent, which gives me in the case of the example screenshot on/from Micha's autohotkey.net page: vendor = Topseed, product = unknown
Single file on linux-usb.org, which gives me the same info

Image

HTH
________________________________________________________
New here? Please, before you post...
1. Read the tutorial and try the examples. -> 2. Take a look at the command list to get an idea of what you could do. -> 3. Create your script. Consult the documentation and the FAQ if you get stuck. -> 4. Search the forum if you need help or examples, method 1 (forum), method 2 (site), method 3 (Google). -> 5. Post your code on the forum in the "Ask for Help" section if you still run into problems (but read this first). -> 6. There is more AHK on autohotkey.net and the Wiki and there is an AHK IRC chat.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2008, 10:16 am 
Offline

Joined: August 23rd, 2008, 8:55 pm
Posts: 4
The autohotkeyremotecontrol program doesn't recognize my Fn key under any of the entries.

I have a Dell XPS M1730. I have to press 'Fn + PauseBreak' to get Company of Heroes game to pause. The PauseBreak key is on my F12 key, so that is why I have to hit the Fn key with it. So, been trying to make pausing the game to the space bar and it just isn't working.

Is there anything else I could do to get this to work?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 28th, 2008, 2:04 pm 
Offline

Joined: August 27th, 2008, 7:41 pm
Posts: 3
Hey i have aspire 8920 (acer) and i cant find my 'Fn' key and also not these touch keys :cry: :cry:

Image


how i can find the touch keys / Fn key ?

thx !


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 6th, 2008, 8:26 pm 
Offline

Joined: June 11th, 2005, 9:34 am
Posts: 264
Location: England ish
I'm trying to use this with my xbox 360 wired usb joypad(made my madcatz). In order to pick up the "X" button.

but the messege only changes when i rotate the left thumbpad, and it does not change by pressing buttons, or pulling the triggers.

does any one know about this?

_________________
::
I Have Spoken
::


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2008, 11:17 pm 
OK, I'm totally lost...

Using Vista Home Premium and a Harmony 550 remote, transmitting into a Microsoft MCE Remote Receiver, hooked up via USB.

I want to map the Harmony's equivalents to the Microsoft MCE Remotes "My PIctures" and "My VIdeos" to AHK scripts.

If I try to run AutoHotkeyRemoteControlDLL.ahk , I get an error reading "GetDeviceCount fehlgeschlagen. ErrorCode -3."

I have the mfc80 DLLs, the AutoHotkeyRemoteControlDLL.ahk file, and AutoHotkeyRemoteControl.dll all in the same folder.

Any clues for an obvious newbie?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2008, 12:13 am 
Nevermind... Installed the C+ Redist & rebooted. All's well...


Report this post
Top
  
Reply with quote  
PostPosted: November 12th, 2008, 2:46 am 
Offline

Joined: November 11th, 2008, 9:17 pm
Posts: 9
Hi all,

And many thanks for such an interesting script and topic. Ive noticed a few posts on how to integrate what the RemoteControldll returns into an ahk script for eaxample.

Device:4-Size:3 -> RawData: ->02<-->00<-->00<-
Device:4-Size:3 -> RawData: ->02<-->24<-->02<-

how is this interpreted in ones own ahk script. Im a complete newbie and apols but if i know this icould play around a bit and learn a bit more.

i dont follow most of the code but know basic ahk functions. i imagine most of Michas code is unnecessary for what i want to do, for example use extra buttons on a gyro mouse for paging backwards of forwards in IE etc.

Again apols if its simple but we all gotta start somewhere.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2008, 1:29 pm 
Hi,

i have a Dell 7-Button Mouse at work (produced by Logitech i guess).
The two additional Buttons are the Tilt Wheel Buttons (flip scrollwheel to the left or right). Unfortunetly the dll doesn't realize that the tilt function has been used :(

ImageImage

It would be great to get this working, as i'd like to use the tilt wheel function to switch thru the Tabs in firefox, for example.

at home i use a 10 Button Logitech MX 1000 Bluetooth mouse, which also has this tilt wheel function. I haven't tried the dll until now with MX1000 but i hope it works there. If not, it would be nice if some could give me some advises how to get it work, since the Logitech software does not work if i connect the mouse via the internal bluetooth interface and not via their USB Dongle.

Thanks and best Regards

Kornelis


Report this post
Top
  
Reply with quote  
PostPosted: November 23rd, 2008, 7:08 pm 
Offline

Joined: September 25th, 2006, 7:13 pm
Posts: 6
Location: Peru
I use the A4Tech mouse model WOP-35 (http://www.a4tech.com/ennew/download%20driver.asp?cmodnum=WOP-35); it has 5 buttons (4 are programmables) and 2 wheels for horizontal and vertical scrolling; the foremost wheel is at the same time the third (middle) button, the rear wheel is only wheel.
AHK has no problem with the five buttons. But neither Windows XP Professional or Vista (32 and 64 bit), nor AHK detect independently the rear wheel. Both wheels scroll vertically, and if I assign horizontal scroll to a wheel with AHK, the other makes the same. Now I'm using Windows XP SP2 (32 bit) and Vista (64 bit) on different computers.
The mouse A4Tech wheel technology is different from that of Microsoft (Logitech and clones). Microsoft mouse has only one wheel that tilts for horizontal scrolling. Windows Vista support is for Microsoft's mouse, not for others.
Micha's AutoHotkeyRemoteControlDLL.ahk script recognizes my mouse but I have not been able to make a functional script that appropriately puts into operation the two wheels. I'm not a programmer :cry: . In panel "Device Description" appears:
1 KEYBOARD
2 KEYBOARD
3 MOUSE
4 MOUSE

Clicking on "3 MOUSE", panel "Device Info" shows:
DeviceID: 2
Buttoncount:2
Samplerate:60
Name:\??\Root#RDP_MOU#0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd}
USAGE: 2 USAGEPAGE: 1

And clicking on "4 MOUSE", panel "Device Info" shows:
DeviceID: 32
Buttoncount:5
Samplerate:100
Name:\??\Root#*PNP0F03#1_0_21_0_31_0#{378de44c-56ef-11d1-bc8c-00a0c91405dd}
USAGE: 2 USAGEPAGE: 1

Clicking "Register" button, the next information is the same to both of them ("3 MOUSE" y "4 MOUSE"):
"Respond from device" (scrolling foremost or rear wheel, up or down): the result is 4 most of times, but sometimes appears 0 (when appears 0, all next elements are 0 too).

FOREMOST WHEEL (when result from "Respond from device" is 4):
UPWARD:
Flags: 0
BtnFlag: 1024
ButtonData: 120
RawButton: 0
X: 0
y: 0
Extrainfo: 0

DOWNWARD:
Flags: 0
BtnFlag: 1024
ButtonData: 65416
RawButton: 0
X: 0
y: 0
Extrainfo: 0

REAR WHEEL (when result from "Respond from device" is 4):
UPWARD:
Flags: 0
BtnFlag: 1024
ButtonData: 240
RawButton: 0
X: 0
y: 0
Extrainfo: 0

DOWNWARD:
Flags: 0
BtnFlag: 1024
ButtonData: 65296
RawButton: 0
X: 0
y: 0
Extrainfo: 0

I wish to assign horizontal scrolling for foremost wheel (middle button), and vertical scrolling for rear wheel. AHK (via menu item "View -> Key history and script info") recognizes the wheels, but the script, using the detected "virtual key" and "scan code", doesn't function, neither Windows XP nor Windows Vista; notwithstanding Vista offers support for horizontal scrolling. The following are the values detected by AHK:
FOREMOST WHEEL:
Upward: vk: 9F, sc: 001
Downward: vk: 9E, sc: 001
REAR WHEEL:
Upward: vk: 9F, sc: 002
Downward: vk: 9E, sc: 002

The following one is my nonfunctional script:
Code:
;HORIZONTAL SCROLLING FOR FOREMOST WHEEL:
vk9Fsc001:: ;SCROLL LEFT.
ControlGetFocus, control, A
SendMessage, 0x114, 0, 0, %control%, A ;0x114 is WM_HSCROLL (Windows Message Horizontal Scroll) and the 0 after it is SB_LINELEFT (Scroll Bar Line Left).
return

vk9Esc001:: ;SCROLL RIGHT.
ControlGetFocus, control, A
SendMessage, 0x114, 1, 0, %control%, A ;0x114 is WM_HSCROLL and the 1 after it is SB_LINERIGHT.
return

;VERTICAL SCROLLING FOR REAR WHEEL:
vk9Fsc002:: ;SCROLL UP.
ControlGetFocus, control, A
SendMessage, 0x115, 0, 0, %control%, A ;0x115 is WM_VSCROLL and the 0 after it is SB_LINEUP.
return

vk9Esc002:: ;SCROLL DOWN.
ControlGetFocus, control, A
SendMessage, 0x115, 1, 0, %control%, A ;0x115 is WM_VSCROLL and the 1 after it is SB_LINEDOWN.
return
AHK can't discriminate both wheels independently.
It is desirable that AHK (via the menu item "View -> Key history and script info") includes automatically Micha's dll, avoiding troublesome scripts that we, the common and anguished users, cannot do.
I wish to do a script using the excellent works of Micha and Chris, that eliminate heavy drivers. Could you please help me?
Thank you very much in advance.
Sorry my English.

_________________
¿Cuándo traducimos AHK al español?


Last edited by Cholito on January 1st, 2009, 8:43 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 6th, 2008, 4:44 pm 
Offline

Joined: January 14th, 2008, 9:10 pm
Posts: 35
Location: Germany
Thanks Micha for the DLL and the scripts!

I get the impression that you wrote it for the exact remote control that I have now (old Cyberlink model, black). Your sample script works very nicely with my remote without changing the devices.

I'm wondering if there is a way to access the sleep-button (looks like a power-button) as well.
Windows Vista allows me to disable it, to trigger a shutdown with it or to send the computer into sleep mode with this key.
Unfortunately your script doesn't detect the sleep/power-button. The simple AHK-command "Sleep::" also doesn't work.

In addition, I can't change the buttons for Enter, Numbers, Clear and OK, but that's less important to me right now.


Edit: Media Center still tries to launch a DVD if I hit the DVD-Button, in addition to what AHK does upon pressing the button. Is there a way to totally overwrite the old function of this button?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Above my head
PostPosted: December 13th, 2008, 7:04 pm 
I am new at this, please bear with me,

I am using a second mouse and a second keyboard. Both are to be used to send hotkeys. Here's what I can gather using AutoHotkeyRemoteControlDLL:

_________________________________________________________
My regular keyboard is registering as a keyboard with Device ID 7.
My hotkey keyboard is registering as a keyboard with Device ID 3.

When the space key is pressed on either keyboard I receive:

Code:
MakeCode: 57
Flags: 1
Key: 32
Msg: 257
Extrainfo: 0

_________________________________________________________
My regular mouse is registering as a mouse with Device ID 11.
My hotkey mouse is registering as a mouse with Device ID 10.

When the left mouse button is pressed on either mouse I receive:

Code:
Flags: 0
BtnFlag: 1
ButtonData: 0
RawButton: 0
X: 0
Y: 0
Extrainfo: 0


What I would like to do is create a script that will allow me to make a hotkey for each key and button. I don't mind entering them in one key at a time if I had a model (That is why I posted the "space key[/code]


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 152 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10, 11  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], Google Feedfetcher, IsNull, JamixZol and 56 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