Jump to content

Detect laptop remove from the docking station


Recommended Posts

I would like to write a script that launches EasyEject, selects "remove the laptop from its docking station". Then detects that the laptop has been physically removed from the docking station, then do some actions like Hibernate.

My first idea was to simply hibernate the laptop, then remove it from its docking station, but when resuming from Hibernation, I get several messages like "This is not the proper way to remove the PC" "DANGER!". To properly remove the laptop, EasyEject is IBM's utility to manage the docking station. Is is called by Fn+F9, and does not show a typical window, more like a menu floating above Windows.

I am asking because this involves the Fn key, which is not handled by AutoIt, also physical actions like removing the laptop from its docking station. This may prove difficult with AutoIt. So if anyone has experience with this with IBM laptops (or others), let me know, otherwise, I will not write a script and continue to do this by hand.

My typical sequence is this:

Fn+F7 then select "Internal LCD" in IBM's menu to switch back to the internal LCD display

Fn+F9 then select "Execute EasyEject actions" to prepare the safe removal of the laptop from its docking station

Physically remove the laptop from its docking station (note: no special message appears after removing the PC)

Fn+F12 to hibernate (or Shutdown(64) in Autoit).

Link to comment
Share on other sites

I am asking because this involves the Fn key, which is not handled by AutoIt, also physical actions like removing the laptop from its docking station. This may prove difficult with AutoIt. So if anyone has experience with this with IBM laptops (or others), let me know, otherwise, I will not write a script and continue to do this by hand.

:P

Use the AutoIt window tool to find IDs and names of buttons. Look at ControlClick or ControlSend.

Edited by JamesBrooks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...