Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Battery percentage refresh DLL

$
0
0
Hi can anyone point me in the right direction to get this to work.
I am using a battery percentage DLL for my Laptop. I would like the DLL to refresh every say 10 seconds or more. to give me the exact percentage of the battery. The problem is, once the application is running, it only gives the percentage, from when it started, and don't change.
I have plaid around with times but cant get it to work.

My question is can a DLL be refreshed say every 10 seconds or even a minute. If not, how can this be done. I don't want the application to reload.

Here is the code I am using.
Code:
--BATTERY--
function TextToLabel(op, arg)
    result = Label.GetText("Label1");
    if result == "" then
        Label.SetText("Label1", op..": "..arg);
    else
        Label.SetText("Label1", op..": "..arg.."\r\n"..result);
    end
end

Label.SetText("Label1", "");
----------------------------------------------------------------------------
DLLPath = _SourceFolder.."\\AutoPlay\\Docs\\Battery.dll";

result = DLL.CallFunction(DLLPath, "LifePercent","", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);

TextToLabel("LifePercent", result.."%");

Viewing all articles
Browse latest Browse all 2105