Search found 10 matches
- 21 Dec 2020, 12:42
- Forum: Ask for Help (v1)
- Topic: DllCall to CallNtPowerInformation: cannot find function inside DLL
- Replies: 8
- Views: 472
Re: DllCall to CallNtPowerInformation: cannot find function inside DLL
Oh yes, that does help, thanks! I'll need to figure out why my readings are consistently like that, with some tests with the sleep parameters. Also, I didn't realize that, on a machine that is used as a server, is always on and accessible from the internet, sleep must most probably be disabled and t...
- 21 Dec 2020, 08:17
- Forum: Ask for Help (v1)
- Topic: DllCall to CallNtPowerInformation: cannot find function inside DLL
- Replies: 8
- Views: 472
Re: DllCall to CallNtPowerInformation: cannot find function inside DLL
Thank you just me. Although that doesn't explain much more than a couple of words. A few points that are unclear: -I understand that TimeRemaining decrements. It doesn't increment, instead. Although that is not written anywhere. - What does it mean a MaxIdlenessAllowed of zero? - When does TimeRemai...
- 21 Dec 2020, 06:21
- Forum: Ask for Help (v1)
- Topic: DllCall to CallNtPowerInformation: cannot find function inside DLL
- Replies: 8
- Views: 472
Re: DllCall to CallNtPowerInformation: cannot find function inside DLL
Sure Here it is: #NoEnv SendMode Input structSize:=4*4 VarSetCapacity(myStruct, structSize, 0) returnValue:=DllCall("PowrProf\CallNtPowerInformation", "Uint", 12, "Str", "NULL", "Uint", 0, "Ptr", &myStruct, "Uint", structSize) msgbox % "ErrorLevel: " . ErrorLevel . "`nreturnValue: " . returnValue . ...
- 19 Dec 2020, 10:22
- Forum: Ask for Help (v1)
- Topic: DllCall to CallNtPowerInformation: cannot find function inside DLL
- Replies: 8
- Views: 472
Re: DllCall to CallNtPowerInformation: cannot find function inside DLL
That worked!!!
For the enumerator, it was enough using "Uint", 12
Also, I found that the struct size was wrong: it must be 4*4 bytes even though the last member is an Uchar.
Thank you very much
For the enumerator, it was enough using "Uint", 12
Also, I found that the struct size was wrong: it must be 4*4 bytes even though the last member is an Uchar.
Thank you very much
- 18 Dec 2020, 17:34
- Forum: Ask for Help (v1)
- Topic: DllCall to CallNtPowerInformation: cannot find function inside DLL
- Replies: 8
- Views: 472
DllCall to CallNtPowerInformation: cannot find function inside DLL
Hi, I have little experience using DllCall and I am stuck with this DLL. I want to extract idle info from CallNtPowerInformation, specifically the SystemPowerInformation structure. That should give me a more accurate idle time compared to A_TimeIdle, considering that some cbt softwares as Skype, MS ...
- 10 Jul 2017, 04:30
- Forum: AHK Studio
- Topic: XML Class
- Replies: 22
- Views: 29093
Re: XML Class
You're great maestrith, it works well :) In order to loop through the DTMInfo nodes, and extract some name and version values, I do the following: mytext:="" IfExist, %DTMCatalog% { FileRead, xmlcontents, %DTMCatalog% NewXML:=New XML("xml") NewXML.XML.LoadXML(xmlcontents) NewXML.Language() list:=New...
- 07 Jul 2017, 10:29
- Forum: AHK Studio
- Topic: XML Class
- Replies: 22
- Views: 29093
Re: XML Class
Yes, great that worked! One step harder... I am blocked again on an error: in this case the attribute has a "d2p1" namespace, as follows: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <DTMCatalogueFile xmlns="http://tempuri.org/XMLSchema.xsd"> <DTMCatalogue DTMCatalogue=""> <DTMCatalogData...
- 04 Jul 2017, 11:19
- Forum: AHK Studio
- Topic: XML Class
- Replies: 22
- Views: 29093
Re: XML Class
Hi, Great tool, thanks. Anyway I am very new to AH and a practical example would be providential. In example, I am trying to simply read one value from the following xml file, specifically the content of unity.ApplicationPath, that is "C:\Users\Public\Documents\Schneider Electric\Unity Pro" Could yo...
- 10 Feb 2017, 09:54
- Forum: Ask for Help (v1)
- Topic: Error on Runwait, %comspec% /c query session Topic is solved
- Replies: 6
- Views: 3123
Re: Error on Runwait, %comspec% /c query session Topic is solved
Sorry for the lack of information. I'll try to recover here.:) It should run on Windows 7 64bit Enterprise edition SP1. The screenshot comes from the execution of the whole application where the line is used, that prints the output into command prompt. Here's the full application Autologin.ahk Actua...
- 09 Feb 2017, 05:13
- Forum: Ask for Help (v1)
- Topic: Error on Runwait, %comspec% /c query session Topic is solved
- Replies: 6
- Views: 3123
Re: Error on Runwait, %comspec% /c query session Topic is solved
Using the code you proposed it still doesn't work, but it changes a bit the behavior. In fact, if I run the whole application I can see the output on command prompt. I get a "Invalid parameter(s)" message: https://s28.postimg.org/lvbt3fhxp/2017_02_09_10_26_14_C_Windows_system32_cmd.jpg At least it f...