Sign in to follow this  
Followers 0
ppat

Detect laptop remove from the docking station

2 posts in this topic

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).

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0