Fullerene Posted December 28, 2009 Share Posted December 28, 2009 Please suggest what is the best way in AUTOIT! to find out if the computer currently works using electric grid or batteries (UPS device) ? I think there is some WINDOWS function responsible for such information but I didn't find anything in the help file.Thanks a lot! Link to comment Share on other sites More sharing options...
KaFu Posted December 28, 2009 Share Posted December 28, 2009 Maybe this gives you a start, found it in this thread.http://msdn.microsoft.com/en-us/library/aa372715%28VS.85%29.aspxhttp://www.codeproject.com/KB/system/OSEvents.aspx?fid=1528689 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Fullerene Posted December 28, 2009 Author Share Posted December 28, 2009 Maybe this gives you a start, found it in this thread.http://msdn.microsoft.com/en-us/library/aa372715%28VS.85%29.aspxhttp://www.codeproject.com/KB/system/OSEvents.aspx?fid=1528689http://msdn.microsoft.com/en-us/library/aa373232(VS.85).aspx :It seems ACLineStatus variable is what I need. The only question is how to incorporate this in my AUTOIT! script. Link to comment Share on other sites More sharing options...
jvanegmond Posted December 28, 2009 Share Posted December 28, 2009 http://msdn.microsoft.com/en-us/library/aa373232(VS.85).aspx :It seems ACLineStatus variable is what I need. The only question is how to incorporate this in my AUTOIT! script.Through this function: http://msdn.microsoft.com/en-us/library/aa372693(VS.85).aspx github.com/jvanegmond Link to comment Share on other sites More sharing options...
Yashied Posted December 28, 2009 Share Posted December 28, 2009 (edited) Maybe this will help you.http://www.autoitscript.com/forum/index.php?showtopic=89539 Edited December 28, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Fullerene Posted December 28, 2009 Author Share Posted December 28, 2009 I'm a complete novice. Could you please show how to use this functionBOOL WINAPI GetSystemPowerStatus( __out LPSYSTEM_POWER_STATUS lpSystemPowerStatus);using DllCall function in AUTOIT.I start with DllCall("kernel32.dll", "int", "GetSystemPowerStatus" ....)How to work with lpSystemPowerStatus?Thanks a lot! Link to comment Share on other sites More sharing options...
Juvigy Posted December 28, 2009 Share Posted December 28, 2009 This will work for laptops - if they are on AC or DC , but how you can find if your desctop is on GRID or UPS power would be very tricky if impossible to check with AUTOIT. Link to comment Share on other sites More sharing options...
Fullerene Posted December 28, 2009 Author Share Posted December 28, 2009 (edited) This will work for laptops - if they are on AC or DC , but how you can find if your desctop is on GRID or UPS power would be very tricky if impossible to check with AUTOIT.It would be a pity if no way exists. The main task is to manage UPS which is connected to the computer through USB. Is it possible with AUTOIT?P.S. The examples with the laptop battery were very useful to see anyway. Edited December 28, 2009 by Fullerene Link to comment Share on other sites More sharing options...
Developers Jos Posted December 28, 2009 Developers Share Posted December 28, 2009 (edited) It would be a pity if no way exists. The main task is to manage UPS which is connected to the computer through USB. Is it possible with AUTOIT?P.S. The examples with the laptop battery were very useful to see anyway.This will depend on the supplier's USB driver whether that has any means of interfacing since it isn't an internal battery.Assume you also installed some software from the UPS supplier which can check the status of the UPS device attached? Edited December 28, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Fullerene Posted December 28, 2009 Author Share Posted December 28, 2009 This will depend on the supplier's USB driver whether that has any means of interfacing since it isn't an internal battery.Assume you also installed some software from the UPS supplier which can check the status of the UPS device attached?Yeah... You're right. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now