Originally posted by BioHazard
View Post
Está genial, Gracias.

if nConstant == nil then if nBattStatus == "10" then nConstant = DialogEx.Show("Dialog1", true, 200, 100); end end
if nConstant == nil then if nBattStatus == "10" then nConstant = Dialog.Message("Warning", "Battery charge is at 10%", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end end
Page.StartTimer(5000, 10); Page.StartTimer(5000, 20);
sDLLPath = "AutoPlay\\Docs\\battery.dll" nBattStatus = DLL.CallFunction(sDLLPath, "BattPercentEx", "", DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL); nPowerSource = DLL.CallFunction(sDLLPath, "BattPowerEx", "", DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL); if (e_ID == 10) then if (nPowerSource == "1") then sReturn = "External AC Power" Image.Load("icon", "AutoPlay\\Images\\icon_ac.png"); else sReturn = "Internal Battery" Image.Load("icon", "AutoPlay\\Images\\icon_dc.png"); end Progress.SetRange("progress_charged", 0, 100); Progress.SetCurrentPos("progress_charged", nBattStatus); Input.SetText("power_source", sReturn); Input.SetText("battery_charge", nBattStatus.."%"); elseif (e_ID == 20) then if nBattStatus > "101" then Dialog.Message("Warning", "Battery charge is at 10%", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); Page.StopTimer(20); end end
Leave a comment: