So I use a Lenovo Laptop and when at work I use a dock, is there a way to detect when I am using the dock so that I can start certain scripts and what not when I turn the computer on and then have other things run when it's not on the dock? Or perhaps does anyone know of a script or program that already does this?
I read a few posts regarding screen resolution and I suppose I "could" try and use that as a detection method but I don't know how reliable that will be or if there is a better way..
If not I suppose it's okay I'm just curious..
Thank you.
Detect when plugged into dock?
- Iomega0318
- Posts: 83
- Joined: 06 Apr 2015, 14:56
- Location: Wolfforth, TX
- Contact:
Re: Detect when plugged into dock?
I use a script that does this with number of monitors, because I have 2 at work and only 1 at home. Obviously that wouldn't work, if you use the same amount on and off the dock.
Re: Detect when plugged into dock?
quick google results show that its tough, and that the drivers report the docking state to the OS, which makes it unreliable across different systems
if its just for your personal use, you can try some of these
http://lmgtfy.com/?q=winapi+detect+if+laptop+is+docked
if its just for your personal use, you can try some of these
http://lmgtfy.com/?q=winapi+detect+if+laptop+is+docked
- Iomega0318
- Posts: 83
- Joined: 06 Apr 2015, 14:56
- Location: Wolfforth, TX
- Contact:
Re: Detect when plugged into dock?
This could work, I only use the laptop when I am at home, no dock and too lazy to hook up other monitors lol..diaewad wrote:I use a script that does this with number of monitors, because I have 2 at work and only 1 at home. Obviously that wouldn't work, if you use the same amount on and off the dock.
See this I did not know lol, I had no idea how the dock interacts with the computer..guest3456 wrote:quick google results show that its tough, and that the drivers report the docking state to the OS, which makes it unreliable across different systems
if its just for your personal use, you can try some of these
http://lmgtfy.com/?q=winapi+detect+if+laptop+is+docked
Re: Detect when plugged into dock?
Depending on the environment you have at work you could check also for network drives or maybe wifi
ciao
toralf
toralf
- Iomega0318
- Posts: 83
- Joined: 06 Apr 2015, 14:56
- Location: Wolfforth, TX
- Contact:
Re: Detect when plugged into dock?
I use Ethernet at work, WiFi at home and we use a VPN when we work from home to connect to all the same network drives.. Can you detect which network connection your using, I didn't know that was possible :) I am loving AHK more and more each day lol..
Who is online
Users browsing this forum: No registered users and 224 guests