Sign in to follow this  
Followers 0
Kiesp

Enabling/disabling hardware ?

7 posts in this topic

Hello to everyone out there :blink:

I had a brilliant (or so i think, atleast) last night when i couldnt sleep.

I want to connect my laptop to a USB power strip (incase you dont know what im talking about, it's a power strip that only supplies power when it gets power from the USB cable connected to it)

and then connect the USB cable to my laptop aswell, then i want to make a program that turns off the power to the usb port (or just disables it, in the device manager) which will be started when the battery power reaches 100% and then another program (or the same, maybe just with parameters or such) that turns the power on (or, again just enables it in the device manager) when the battery reaches like 5%

So my question to you guys is. Is it possible, using autoit to disable or enable something in the device manager. Of cause this can be done via mouse and/or keyboard automatisation. But can it be done otherwise ?

Thanks in advance

Kiesp


http://www.autoitscript.com/forum/index.php?showtopic=69911 <-- Best hacker ever :D

Share this post


Link to post
Share on other sites



i dont think he wants to kill it. i mean what would be the point ? it's really unlikely that the battery did anything to piss him off or hurt him :blink: .

jk xD

@Topic

am i dont know much about dll's but i know this, that there are certain DLL's used for automating Devices e.g Webcam.

Share this post


Link to post
Share on other sites

Batteries only last a certain amount of charges, so doing the above is going to shorten it's life dramatically, and "killing" it in no time compared to if you have treated it as you're supposed to.

Even if I had some ideas for disabling usb, I would not go near that subject when there's the life of a innocent battery on stake. :blink:

Share this post


Link to post
Share on other sites

I see what he has in mind. I would think you could use MSDN to lookup how to access the hardware.

There's currently no native way to control hardware in AutoIt, but using Devcon.exe will do the trick.

Share this post


Link to post
Share on other sites

Sorry for the late reply, but AFAIK you can't "kill" the power from an USB port: it's electrically wired to the power supply.

footswitch


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