Code Monkey home page Code Monkey logo

deviceidpnp's People

Contributors

xmcqcx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

deviceidpnp's Issues

Multiple devices

Hello, I'm trying to do the following: In oMyDevices.Push, I put the DeviceID of 2 devices. I want it to only execute the action when they are connected. It works. But I also wanted it to display an error when they are not connected. So I added the two separately in oMyDevices.Push, but when I pull a device it performs the action. Is there a way to do this?

Not detecting HDMI connection properly.

Thank you for the script, it's a huge lifesaver for my use case with KVM switch, I encounter some issues and I'd appreciate any help.

I'm currently using version 1.2.0 for AutoHotkey 1.0 from your commit history, and I have HDMI monitor hooked up to a KVM switch to my main PC and work laptop. The idea is that if I switch KVM with hotkey, it will disconnect the HDMI monitor from my main PC, and then it should switch video signals to my laptop. If I switch KVM with hotkey again, it will connect the HDMI monitor back to my main PC, and switch the signal to my main PC.

I'm stuck on detecting the connection status, when I connect the HDMI monitor, it says connected, and then disconnected even though it's still plugged in. When I disconnect the HDMI monitor, it says disconnected and nothing else. Which is correct. Do you have any ideas on what could be the issue? Thanks!

oMyDevices := {}
oMyDevices.Push({"DeviceName":"Generic Monitor (HDMI)", "DeviceID":"DISPLAY\XXX0133\5&707AA03&2&UID45312"})

DevicesActions(ThisDeviceStatusHasChanged) {

    If (ThisDeviceStatusHasChanged = "Generic Monitor (HDMI) Connected")
            voice := ComObjCreate("SAPI.SpVoice")
            ;voice.rate := -10
            voice.volume := 100
         voice.Speak("Connected")

    If (ThisDeviceStatusHasChanged = "Generic Monitor (HDMI) Disconnected")
            voice := ComObjCreate("SAPI.SpVoice")
            ;voice.rate := -10
            voice.volume := 100
         voice.Speak("Disconnected")

Below is the list of DeviceID from DeviceIDFinder.ahk when toggling KVM switch

HID-compliant consumer control device:
HID\VID_046D&PID_C539&MI_01&COL02\E&48D3944&0&0001

HID-compliant mouse:
HID\VID_046D&PID_C539&MI_01&COL01\E&48D3944&0&0000

Microphone (FIFINE K678 Microphone):
SWD\MMDEVAPI\{0.0.1.00000000}.{5F8FF0C5-DD7E-4FC7-B90B-C3C9EE0F24F5}

USB Input Device:
USB\VID_046D&PID_C539&MI_02\D&2A09E01C&0&0002

HID-compliant headset:
HID\VID_3142&PID_0002&MI_03&COL02\8&25C062B9&0&0001

USB Input Device:
USB\VID_3142&PID_0002&MI_03\7&665864A&0&0003

Generic USB Hub:
USB\VID_214B&PID_7250\B&3A944CE5&0&2

HID-compliant vendor-defined device:
HID\VID_046D&PID_C539&MI_02&COL01\E&1F4A047E&0&0000

FIFINE K678 Microphone:
USB\VID_3142&PID_0002&MI_00\7&665864A&0&0000

G502 LIGHTSPEED:
USB\VID_046D&PID_C539&LAMPARRAY\D&2A09E01C&0&4_SLOT00

LIGHTSPEED Receiver:
USB\VID_046D&PID_C539&LAMPARRAY\D&2A09E01C&0&4_SLOT01

LIGHTSPEED Receiver:
USB\VID_046D&PID_C539&LAMPARRAY\D&2A09E01C&0&4_SLOT02

LIGHTSPEED Receiver:
USB\VID_046D&PID_C539&LAMPARRAY\D&2A09E01C&0&4_SLOT03

LIGHTSPEED Receiver:
USB\VID_046D&PID_C539&LAMPARRAY\D&2A09E01C&0&4_SLOT04

LIGHTSPEED Receiver:
USB\VID_046D&PID_C539&LAMPARRAY\D&2A09E01C&0&4_SLOT05

LIGHTSPEED Receiver:
USB\VID_046D&PID_C539&LAMPARRAY\D&2A09E01C&0&4_SLOT06

Generic Monitor (HDMI):
DISPLAY\XXX0133\5&707AA03&2&UID45312

USB Billboard Device   :
USB\VID_2109&PID_8817\0000000000000001

HID-compliant vendor-defined device:
HID\VID_046D&PID_C539&MI_02&COL02\E&1F4A047E&0&0001

G502 LIGHTSPEED:
USB\VID_046D&PID_C539\C&F49C187&0&4

Generic SuperSpeed USB Hub:
USB\VID_2109&PID_0817\MSFT30000000000

HID-compliant vendor-defined device:
HID\VID_046D&PID_C539&MI_02&COL03\E&1F4A047E&0&0002

HID Keyboard Device:
HID\VID_046D&PID_C539&MI_00\E&28647706&0&0000

USB Input Device:
USB\VID_046D&PID_C539&MI_00\D&2A09E01C&0&0000

Generic USB Hub:
USB\VID_2109&PID_2817\MSFT20000000000

USB Input Device:
USB\VID_046D&PID_C539&MI_01\D&2A09E01C&0&0001

USB Composite Device:
USB\VID_3142&PID_0002\REV1.0

HID-compliant consumer control device:
HID\VID_3142&PID_0002&MI_03&COL01\8&25C062B9&0&0000

HID-compliant vendor-defined device:
HID\VID_046D&PID_C539&MI_01&COL04\E&48D3944&0&0003

HID-compliant system controller:
HID\VID_046D&PID_C539&MI_01&COL03\E&48D3944&0&0002

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.