wakillon Posted September 21, 2010 Share Posted September 21, 2010 (edited) Only for LapTop and inspired of PowerMeterPlus, I tried to do it in AutoIt expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=07.ico #AutoIt3Wrapper_outfile=TinyBatteryBar.exe #AutoIt3Wrapper_Res_Comment=Tested on Xp 32bit #AutoIt3Wrapper_Res_Description=Indicate the level of battery charge and remaining time. #AutoIt3Wrapper_Res_Fileversion=1.0.1 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=Y #AutoIt3Wrapper_Res_LegalCopyright=Copyright ? 2010 wakillon #AutoIt3Wrapper_Res_Language=1036 ://////=__= ://////=__= #AutoIt3Wrapper_Res_Icon_Add=Icons03.ico #AutoIt3Wrapper_Res_Icon_Add=Icons07.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs -------------------------------------------------------------------------------------------------------------------- AutoIt Version : 3.3.6.1 Author : wakillon Script Fonction : Tiny Battery Bar, indicate the level of battery charge and remaining time. #ce -------------------------------------------------------------------------------------------------------------------- #Include <ProgressConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <GUIConstants.au3> #include <Constants.au3> #Include <WinAPIEx.au3> #Include <String.au3> #include <Misc.au3> #Include <Date.au3> Opt ( "TrayOnEventMode", 1 ) Opt ( "TrayMenuMode", 1 ) Global $_Timer = _NowCalc ( ) Global $_GuiHeight = ( @DesktopHeight/4 ) Global $_GuiWidth = 20 Global $_GuiXPos = ( @DesktopWidth - 20 -10 ) Global $_GuiYPos = ( @DesktopHeight - $_GuiHeight - _GetTaskbarHeight ( ) -10 ) Global $_Data[4], $_Font = "ARIAL", $_Init=1, $_XPos, $_StateLabel, $_ProgressBar, $_PercentLabel, $_Gui, $_StartItem, $_AboutItem Global $_TitleKey = 'TinyBatterryBar', $_RegKeySettings If Not _Singleton ( @ScriptName, 1 ) Then Exit OnAutoItExitRegister ( "_OnAutoItExit" ) If Not _IsLaptopPC ( ) Then Exit MsgBox ( 4096, "Error", "It's not a LapTop PC", 6 ) _Gui ( ) _SetTrayMenu ( ) _ReduceMemory ( ) While 1 $_NowCalc = _NowCalc ( ) If _DateDiff ( "s", $_Timer, $_NowCalc ) >= 10 Or $_Init Then $_Timer = $_NowCalc _BatteryStatus ( ) If IsArray ( $_Data ) Then If $_Data[2] < 10 Then TraySetIcon ( @ScriptFullPath, -5 ) TraySetState ( 4 ) GUICtrlSetColor ( $_StateLabel, 0xFF0000 ) GUICtrlSetColor ( $_ProgressBar, 0xFF0000 ) Else TraySetIcon ( @ScriptFullPath, 0 ) TraySetState ( 8 ) GUICtrlSetColor ( $_StateLabel, 0x000000 ) GUICtrlSetColor ( $_ProgressBar, 0x009300 ) EndIf GUICtrlSetState ( $_StateLabel, $GUI_ENABLE ) GUICtrlSetData ( $_ProgressBar, $_Data[2] ) GUICtrlSetData ( $_PercentLabel, $_Data[2] & "%" ) GUICtrlSetData ( $_StateLabel, $_Data[0] ) WinSetOnTop ( $_Gui, '', 1 ) $_Init=0 EndIf EndIf Sleep ( 20 ) If _GetHoveredHwnd ( ) = $_Gui Then $_WinPos = WinGetPos ( $_Gui ) If $_WinPos[0] = $_GuiXPos Then $_XPos = 10 Else $_XPos = $_GuiXPos EndIf WinMove ( $_Gui , "", $_XPos, $_GuiYPos ) EndIf WEnd Func _Gui ( ) $_Gui = GUICreate ( "", $_GuiWidth, $_GuiHeight, $_GuiXPos, $_GuiYPos, $WS_POPUP+$WS_THICKFRAME ) GUISetFont ( 8, 400, 2, $_Font, $_Gui, 5 ) $_StateLabel = GUICtrlCreateLabel ( "", 0, 3, $_GuiWidth, 20, $SS_CENTER ) $_ProgressBar = GUICtrlCreateProgress ( 0, 22, $_GuiWidth, $_GuiHeight-40, $PBS_VERTICAL ) DllCall ( "UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle ( $_ProgressBar ), "wstr", " ", "wstr", " " ) GUICtrlSetStyle ( $_ProgressBar, 5 ) GUICtrlSetColor ( $_ProgressBar, 0x009300 ) $_PercentLabel = GUICtrlCreateLabel ( "", 0, $_GuiHeight-15, $_GuiWidth, 20, $SS_CENTER ) GuiSetStyle ( $WS_POPUPWINDOW, $WS_EX_CLIENTEDGE + $WS_EX_TOOLWINDOW ) GUISetState ( ) EndFunc ;==> _Gui ( ) Func _GetHoveredHwnd ( ) Local $iRet = DllCall ( "user32.dll", "int", "WindowFromPoint", "long", MouseGetPos ( 0 ), "long", MouseGetPos ( 1 ) ) If IsArray ( $iRet ) Then Return HWnd ( $iRet[0] ) Return SetError ( 1, 0, 0 ) EndFunc ;==> _GetHoveredHwnd ( ) Func _GetTaskbarHeight ( ) Local Const $SPI_GETWORKAREA = 48 Local $WorkArea, $stRect = DllStructCreate ( "long left;long top;long right;long bottom" ) Local $iResult = _WinAPI_SystemParametersInfo ( $SPI_GETWORKAREA, 0, DllStructGetPtr ( $stRect ), 0 ) If $iResult = True Then $WorkArea = DllStructGetData ( $stRect, "bottom" ) - DllStructGetData ( $stRect, "top" ) If Not @error Then Return @DesktopHeight - $WorkArea Else Return 0 EndIf EndFunc ;==> _GetTaskbarHeight ( ) Func _BatteryStatus ( ) $_Data = _WinAPI_GetSystemPowerStatus ( ) If Not IsArray ( $_Data ) Then Return If BitAND ( $_Data[1], 128 ) Then $_Data[0] = 'Not present' For $i = 1 To 3 $_Data[$i] = '?' Next Else Switch $_Data[2] Case 0 To 100 $_Data[2] =$_Data[2] Case Else $_Data[2] = '?' EndSwitch Switch $_Data[3] Case -1 $_Data[3] = '?' Case Else $H = ( $_Data[3] - Mod ( $_Data[3], 3600 ) ) / 3600 $M = ( $_Data[3] - Mod ( $_Data[3], 60 ) ) / 60 - $H * 60 $_Data[3] = StringFormat ( $H & ':%02d', $M ) EndSwitch Switch $_Data[0] Case 0 $_Data[0] = $_Data[3] Case 1 $_Data[0] = 'Chg' Case Else $_Data[0] = '?' EndSwitch EndIf EndFunc ;==> _BatteryStatus ( ) Func _StartWithWindows ( ) $_ItemGetState = TrayItemGetState ( $_StartItem ) If $_ItemGetState = 64+1 Then RegWrite ( "HKCUSoftwareMicrosoftWindowsCurrentVersionRun", $_TitleKey, "REG_SZ", @ScriptFullPath ) Else RegDelete ( "HKCUSoftwareMicrosoftWindowsCurrentVersionRun", $_TitleKey ) EndIf EndFunc ;==> _StartWithWindows ( ) Func _IsLaptopPC ( $_myComputer='.' ) $_objWMIService = ObjGet ( "winmgmts://" & $_myComputer & "/root/cimv2" ) $_colItems = $_objWMIService.ExecQuery ( "Select * from Win32_Battery" ) For $_objItem in $_colItems If $_objItem <> '' Then Return True Next Return False EndFunc ;==> _IsLaptopPC ( ) Func _ReduceMemory ( $i_PID=-1 ) If $i_PID <> -1 Then Local $ai_Handle = DllCall ( "kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID ) Local $ai_Return = DllCall ( "psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0] ) DllCall ( 'kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0] ) Else Local $ai_Return = DllCall ( "psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1 ) EndIf Return $ai_Return[0] EndFunc ;==> _ReduceMemory ( ) Func _About ( ) MsgBox ( 64 + 8192, "About", "Informations" & @CRLF & @CRLF & StringTrimRight ( @ScriptName, 4 ) & @CRLF & @CRLF _ & "This program is Freeware. It may be distributed and copied, and should be Changed and Distributed under a different Name or Author." & @CRLF _ & @CRLF & @CRLF & "Thanks, To use " & StringTrimRight ( @ScriptName, 4 ) & " !" & @CRLF & @CRLF & "wakillon." ) TrayItemSetState ( $_AboutItem , $TRAY_UNCHECKED ) EndFunc ;==> _About ( ) Func _SetTrayMenu ( ) TraySetToolTip ( "TinyBatteryBar v1.01" & " RightClick to Traymenu" ) TraySetIcon ( @ScriptFullPath, 0 ) $_StartItem = TrayCreateItem ( "Start With Windows" ) TrayItemSetOnEvent ( -1, "_StartWithWindows" ) $_RegRead = RegRead ( "HKCUSoftwareMicrosoftWindowsCurrentVersionRun", $_TitleKey ) If $_RegRead <> '' Then TrayItemSetState ( $_StartItem, $TRAY_CHECKED ) TrayCreateItem ( "" ) $_AboutItem = TrayCreateItem ( "About" ) TrayItemSetOnEvent ( -1, "_About" ) TrayCreateItem ( "" ) $_ExitItem = TrayCreateItem ( "Exit" ) TrayItemSetOnEvent ( -1, "_Exit" ) TraySetClick ( 16 ) TraySetState ( ) EndFunc ;==> _SetTrayMenu ( ) Func _Exit ( ) Exit EndFunc ;==> _Exit ( ) Func _OnAutoItExit ( ) Opt ( "TrayIconHide", 0 ) Local $_Space="" If @OSVersion = "WIN_XP" Then $_Space = _StringRepeat ( " ", 8 ) TrayTip ( "TinyBatteryBar", $_Space & "by wakillon...", 1, 1 ) Sleep ( 2000 ) TrayTip ( '', '', 1, 1 ) EndFunc ;==> _OnAutoItExit ( )Icons + WinAPIEx.au3Icons.7z Scripts and executables with full embeded files are available on GoogleCode, see link in my sig. Simple and practical, battery bar move if mouse is over, If it can help... Edited July 25, 2014 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
SeF Posted September 21, 2010 Share Posted September 21, 2010 You just forgot to mention that WinAPIEx UDF is necessary to make it work. I don't have a laptop here to test it. Anyway, good job! Link to comment Share on other sites More sharing options...
wakillon Posted September 21, 2010 Author Share Posted September 21, 2010 (edited) You just forgot to mention that WinAPIEx UDF is necessary to make it work. I don't have a laptop here to test it. Anyway, good job! Thanks, I inserted it in the icons archive ! Edited November 3, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Yashied Posted September 23, 2010 Share Posted September 23, 2010 Several comments:Using the _ReduceMemory() within the loop is a very bad idea. This will reduce performance than memory usage. Enough to call once at the script beginning.If you are using a WinAPIEx UDF then _WinAPI_EmptyWorkingSet() function does the same as _ReduceMemory().You can use a Battery UDF to get additional information about the installed battery.Use TimerDiff() or AdlibRegister() instead of _NowCalc() and _DateDiff().Use #AutoIt3Wrapper_Res_Icon_Add directives instead of FileInstall().Anyway, it's a good utility. 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...
wakillon Posted September 24, 2010 Author Share Posted September 24, 2010 Thanks for your advices ! I'll try to fix all this...And I forget to thank you for WinAPIEx.au3 ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wakillon Posted September 25, 2010 Author Share Posted September 25, 2010 (edited) Corected and Updated ! expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=07.ico #AutoIt3Wrapper_outfile=TinyBatteryBar.exe #AutoIt3Wrapper_Res_Comment=Tested on Xp 32bit #AutoIt3Wrapper_Res_Description=Indicate the level of battery charge and remaining time. #AutoIt3Wrapper_Res_Fileversion=1.0.1 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=Y #AutoIt3Wrapper_Res_LegalCopyright=Copyright ? 2010 wakillon #AutoIt3Wrapper_Res_Language=1036 ://////=__= ://////=__= #AutoIt3Wrapper_Res_Icon_Add=Icons\03.ico #AutoIt3Wrapper_Res_Icon_Add=Icons\07.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs -------------------------------------------------------------------------------------------------------------------- AutoIt Version : 3.3.6.1 Author : wakillon Script Fonction : Tiny Battery Bar, indicate the level of battery charge and remaining time. #ce -------------------------------------------------------------------------------------------------------------------- #Include <ProgressConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <GUIConstants.au3> #include <Constants.au3> #Include <WinAPIEx.au3> #Include <String.au3> #include <Misc.au3> #Include <Date.au3> Opt ( "TrayOnEventMode", 1 ) Opt ( "TrayMenuMode", 1 ) Global $_Timer = _NowCalc ( ) Global $_GuiHeight = ( @DesktopHeight/4 ) Global $_GuiWidth = 20 Global $_GuiXPos = ( @DesktopWidth - 20 -10 ) Global $_GuiYPos = ( @DesktopHeight - $_GuiHeight - _GetTaskbarHeight ( ) -10 ) Global $_Data[4], $_Font = "ARIAL", $_Init=1, $_XPos, $_StateLabel, $_ProgressBar, $_PercentLabel, $_Gui, $_StartItem, $_AboutItem Global $_TitleKey = 'TinyBatterryBar', $_RegKeySettings If Not _Singleton ( @ScriptName, 1 ) Then Exit OnAutoItExitRegister ( "_OnAutoItExit" ) If Not _IsLaptopPC ( ) Then Exit MsgBox ( 4096, "Error", "It's not a LapTop PC", 6 ) _Gui ( ) _SetTrayMenu ( ) _ReduceMemory ( ) While 1 $_NowCalc = _NowCalc ( ) If _DateDiff ( "s", $_Timer, $_NowCalc ) >= 10 Or $_Init Then $_Timer = $_NowCalc _BatteryStatus ( ) If IsArray ( $_Data ) Then If $_Data[2] < 10 Then TraySetIcon ( @ScriptFullPath, -5 ) TraySetState ( 4 ) GUICtrlSetColor ( $_StateLabel, 0xFF0000 ) GUICtrlSetColor ( $_ProgressBar, 0xFF0000 ) Else TraySetIcon ( @ScriptFullPath, 0 ) TraySetState ( 8 ) GUICtrlSetColor ( $_StateLabel, 0x000000 ) GUICtrlSetColor ( $_ProgressBar, 0x009300 ) EndIf GUICtrlSetState ( $_StateLabel, $GUI_ENABLE ) GUICtrlSetData ( $_ProgressBar, $_Data[2] ) GUICtrlSetData ( $_PercentLabel, $_Data[2] & "%" ) GUICtrlSetData ( $_StateLabel, $_Data[0] ) WinSetOnTop ( $_Gui, '', 1 ) $_Init=0 EndIf EndIf Sleep ( 20 ) If _GetHoveredHwnd ( ) = $_Gui Then $_WinPos = WinGetPos ( $_Gui ) If $_WinPos[0] = $_GuiXPos Then $_XPos = 10 Else $_XPos = $_GuiXPos EndIf WinMove ( $_Gui , "", $_XPos, $_GuiYPos ) EndIf WEnd Func _Gui ( ) $_Gui = GUICreate ( "", $_GuiWidth, $_GuiHeight, $_GuiXPos, $_GuiYPos, $WS_POPUP+$WS_THICKFRAME ) GUISetFont ( 8, 400, 2, $_Font, $_Gui, 5 ) $_StateLabel = GUICtrlCreateLabel ( "", 0, 3, $_GuiWidth, 20, $SS_CENTER ) $_ProgressBar = GUICtrlCreateProgress ( 0, 22, $_GuiWidth, $_GuiHeight-40, $PBS_VERTICAL ) DllCall ( "UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle ( $_ProgressBar ), "wstr", " ", "wstr", " " ) GUICtrlSetStyle ( $_ProgressBar, 5 ) GUICtrlSetColor ( $_ProgressBar, 0x009300 ) $_PercentLabel = GUICtrlCreateLabel ( "", 0, $_GuiHeight-15, $_GuiWidth, 20, $SS_CENTER ) GuiSetStyle ( $WS_POPUPWINDOW, $WS_EX_CLIENTEDGE + $WS_EX_TOOLWINDOW ) GUISetState ( ) EndFunc ;==> _Gui ( ) Func _GetHoveredHwnd ( ) Local $iRet = DllCall ( "user32.dll", "int", "WindowFromPoint", "long", MouseGetPos ( 0 ), "long", MouseGetPos ( 1 ) ) If IsArray ( $iRet ) Then Return HWnd ( $iRet[0] ) Return SetError ( 1, 0, 0 ) EndFunc ;==> _GetHoveredHwnd ( ) Func _GetTaskbarHeight ( ) Local Const $SPI_GETWORKAREA = 48 Local $WorkArea, $stRect = DllStructCreate ( "long left;long top;long right;long bottom" ) Local $iResult = _WinAPI_SystemParametersInfo ( $SPI_GETWORKAREA, 0, DllStructGetPtr ( $stRect ), 0 ) If $iResult = True Then $WorkArea = DllStructGetData ( $stRect, "bottom" ) - DllStructGetData ( $stRect, "top" ) If Not @error Then Return @DesktopHeight - $WorkArea Else Return 0 EndIf EndFunc ;==> _GetTaskbarHeight ( ) Func _BatteryStatus ( ) $_Data = _WinAPI_GetSystemPowerStatus ( ) If Not IsArray ( $_Data ) Then Return If BitAND ( $_Data[1], 128 ) Then $_Data[0] = 'Not present' For $i = 1 To 3 $_Data[$i] = '?' Next Else Switch $_Data[2] Case 0 To 100 $_Data[2] =$_Data[2] Case Else $_Data[2] = '?' EndSwitch Switch $_Data[3] Case -1 $_Data[3] = '?' Case Else $H = ( $_Data[3] - Mod ( $_Data[3], 3600 ) ) / 3600 $M = ( $_Data[3] - Mod ( $_Data[3], 60 ) ) / 60 - $H * 60 $_Data[3] = StringFormat ( $H & ':%02d', $M ) EndSwitch Switch $_Data[0] Case 0 $_Data[0] = $_Data[3] Case 1 $_Data[0] = 'Chg' Case Else $_Data[0] = '?' EndSwitch EndIf EndFunc ;==> _BatteryStatus ( ) Func _StartWithWindows ( ) $_ItemGetState = TrayItemGetState ( $_StartItem ) If $_ItemGetState = 64+1 Then RegWrite ( "HKCU\Software\Microsoft\Windows\CurrentVersion\Run", $_TitleKey, "REG_SZ", @ScriptFullPath ) Else RegDelete ( "HKCU\Software\Microsoft\Windows\CurrentVersion\Run", $_TitleKey ) EndIf EndFunc ;==> _StartWithWindows ( ) Func _IsLaptopPC ( $_myComputer='.' ) $_objWMIService = ObjGet ( "winmgmts://" & $_myComputer & "/root/cimv2" ) $_colItems = $_objWMIService.ExecQuery ( "Select * from Win32_Battery" ) For $_objItem in $_colItems If $_objItem <> '' Then Return True Next Return False EndFunc ;==> _IsLaptopPC ( ) Func _ReduceMemory ( $i_PID=-1 ) If $i_PID <> -1 Then Local $ai_Handle = DllCall ( "kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID ) Local $ai_Return = DllCall ( "psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0] ) DllCall ( 'kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0] ) Else Local $ai_Return = DllCall ( "psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1 ) EndIf Return $ai_Return[0] EndFunc ;==> _ReduceMemory ( ) Func _About ( ) MsgBox ( 64 + 8192, "About", "Informations" & @CRLF & @CRLF & StringTrimRight ( @ScriptName, 4 ) & @CRLF & @CRLF _ & "This program is Freeware. It may be distributed and copied, and should be Changed and Distributed under a different Name or Author." & @CRLF _ & @CRLF & @CRLF & "Thanks, To use " & StringTrimRight ( @ScriptName, 4 ) & " !" & @CRLF & @CRLF & "wakillon." ) TrayItemSetState ( $_AboutItem , $TRAY_UNCHECKED ) EndFunc ;==> _About ( ) Func _SetTrayMenu ( ) TraySetToolTip ( "TinyBatteryBar v1.01" & " RightClick to Traymenu" ) TraySetIcon ( @ScriptFullPath, 0 ) $_StartItem = TrayCreateItem ( "Start With Windows" ) TrayItemSetOnEvent ( -1, "_StartWithWindows" ) $_RegRead = RegRead ( "HKCU\Software\Microsoft\Windows\CurrentVersion\Run", $_TitleKey ) If $_RegRead <> '' Then TrayItemSetState ( $_StartItem, $TRAY_CHECKED ) TrayCreateItem ( "" ) $_AboutItem = TrayCreateItem ( "About" ) TrayItemSetOnEvent ( -1, "_About" ) TrayCreateItem ( "" ) $_ExitItem = TrayCreateItem ( "Exit" ) TrayItemSetOnEvent ( -1, "_Exit" ) TraySetClick ( 16 ) TraySetState ( ) EndFunc ;==> _SetTrayMenu ( ) Func _Exit ( ) Exit EndFunc ;==> _Exit ( ) Func _OnAutoItExit ( ) Opt ( "TrayIconHide", 0 ) Local $_Space="" If @OSVersion = "WIN_XP" Then $_Space = _StringRepeat ( " ", 8 ) TrayTip ( "TinyBatteryBar", $_Space & "by wakillon...", 1, 1 ) Sleep ( 2000 ) TrayTip ( '', '', 1, 1 ) EndFunc ;==> _OnAutoItExit ( ) Edited February 14, 2014 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Dizzy Posted January 23, 2011 Share Posted January 23, 2011 Hi, i'm missing the <WinAPIEx.au3>. Where can i find it? Thanks Dizzy Link to comment Share on other sites More sharing options...
guinness Posted January 23, 2011 Share Posted January 23, 2011 Where can i find it?Really?! >> UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
wakillon Posted January 23, 2011 Author Share Posted January 23, 2011 Hi,i'm missing the <WinAPIEx.au3>.Where can i find it?ThanksDizzyWinAPIEx.au3 is already include in the Icons.7z in the first post ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts 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