Sign in to follow this  
Followers 0
Turranius

Problem with _Timer_GetIdleTime() and Windows 10 Version 1511

5 posts in this topic

#1 ·  Posted (edited)

I was wondering if anyone have any solution for this...

Consider the following small script.

 

#include <Timers.au3>

HotKeySet("+{ESC}", "_Quit")

While 1
    SplashTextOn("Test of idle timer. Shift-Esc to quit.", "This timer should go up if you do not touch anything." & @CRLF & @CRLF & _Timer_GetIdleTime(),-1,100)
    Sleep(1000)
WEnd

Func _Quit()
    SplashOff()
    Exit
EndFunc

All it does is show the current idle time from _Timer_GetIdleTime().

 

Now, if you have Windows 10 and have updated to Version 1511 (Check winver. Its the big November update), Game Controller movements no longer reset the timer for some reason.

I have a software that automatically lowers the volume of the machine (ment for arcade machines that are on 24/7) after it has been idle for a while and with this recent change, if you are playing a game using a Game Controller, the audio fades out because _Timer_GetIdleTime() says you are idle.

 

Anyone have any ideas or solutions/workarounds? I tried looking for a small "Has the joystick been moved" UDFs but they are all too big and only work on the primary game controller (I have 5 connected).

 

Thanks in advance!

Edited by Turranius

Share this post


Link to post
Share on other sites



Downgrad your Windows, or report the bug to microsoft. Or write a script using MouseMove(), Send() etc. so your system never idles.

 

Share this post


Link to post
Share on other sites

I will report it, but in the meantime I'm looking for a workaround or if someone knows a better if_idle function to use =)

 

Using mousemove etc so my system never idles is not at all what I'm after.

Share this post


Link to post
Share on other sites

Here you were complaining that the timer never went past 16, and now you're saying the same thing is causing the idle timer to never reset? Are these 2 scenarios the same situation, or are you having two different problems?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

They are not related. I've been googling some more on this and this is what I found out. Please bare with me.

 

With the release version of Windows 10 (10240?), it had a bug. Moving the game controllers reset the idle time, and thus _Timer_GetIdleTime()

With the release of version 1511 (big november update), the problem was apparently fixed. Game Controllers only do NOT reset the idle timer, as Microsoft apparently thinks that is correct. When I googled this, it seems that "problem" has been happening for people for a long time (before Windows 10).

The "16ms" problem I wrote about earlier was because of the BlissBox device. It sends out a signal every 16 seconds which, in the release version of Windows 10, reset the idle timer every 16ms. That is what the previous post was about. With Windows 10 Version 1511, it no longer resets the idle time, since Windows does not care about game controllers.

 

To make a long story slighly shorter, I got it the wrong way around. I thought the game controllers WERE supposed to reset the idle time but stopped doing it with update 1511, but its actually the other way. Game controllers should not reset it and it was fixed to no longer do that in the big Windows 10 version 1511 update.

 

So, what I am asking for right now is basically, is there an easy way to detect if a game controller ha been pressed/used, so I can combine that with _Timer_GetIdleTime() to really see if the user is using the computer..

 

Sorry if this got confusing.

 

 

 

Edited by Turranius

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • dreivilo47
      By dreivilo47
      When I want to test Example 1 of Function _IECreate (AutoIt Help File), I see that function _IECreate doesn't work in Windows 10.
      Syntax Check (Ctrl+F5) gives no errors.
       
      Example 1:
      ; Create a browser window and navigate to a website #include <IE.au3> Local $oIE = _IECreate("www.autoitscript.com")  
      The error I receive with F5 (Tools, Go) in SciTE:

    • Chaym
      By Chaym
      Does AutoIT supported  in Windows 10 OS (x64)?
      After installing AutoIT in x64 OS and recompiling code,
      I get a lot of error messages...
       
    • kristo
      By kristo
      The DriveGetDrive command returned all drives (option "ALL") for years now and my program could always rely on that function. Suddenly a drive letter that was created with the subst command does not appear in the list of drives anymore. And it clearly did, because I used to react to a certain subst command by reacting to new or revoked (subst /D) drive letters.
      Why is that? I think this a bug because there's no way left to list ALL drive letters anymore.
      And why should I use an API command for that when this was already built in for years?

       
    • kokoilie
      By kokoilie
      I'm making a program that has a combo control in a gui and back in win7 when the window was focused the scroll wheel could be used to scroll through it's contents, now i'm using win10 and i have to put the mouse on that control to scroll up and down.
      Since now the scroll wheel works depending on where the mouse is, is there a way to make it no matter where on the gui the pointer is?
      Also if the only way to do it is some complex hotkey functions will it work with pressing space to toggle a checkbox?
      If you need to see what i have so far let me know and i'll copy it here.
    • ModemJunki
      By ModemJunki
      Hello,
      In Windows 10 PowerShell, one can do this to change the metric for a NIC in Windows 10:
      Get-NetAdapter | Where-Object -FilterScript {$_.InterfaceAlias -Eq "Ethernet 2"} | Set-NetIPInterface -InterfaceMetric 2 I know I can script the above PowerShell line (and it works!), but I wanted to try something I hadn't done before after looking into jguinch's most excellent Network configuration UDF. I wanted to make use of the SetIPConnectionMetric method in the WMI classes. There is an example VBscript here but this is not for Windows 10. Using AutoIT would also give better control over capturing error return codes than with PowerShell.
      But I cannot get my script to work! The return from SetIPConnectionMetric() is 0, which would indicate success. Yet the change does not happen. I also tried WMI methods using .put_ but this fails.
      Anyone more experienced than I have ideas to make this work?
      #RequireAdmin _SetNicInterfaceMetric2("Ethernet 2", "2") Func _SetNicInterfaceMetric2($NIC_NAME, $METRIC) Local $s_setIndx = 0 $objWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & "." & "\root\cimv2") $colNICItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionID = '" & $NIC_NAME & "'", "WQL") If IsObj($colNICItems) Then For $objItem In $colNICItems $s_nicIndex = $objItem.Index Next ConsoleWrite("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE Index = '" & $s_nicIndex & "'" & @CRLF) $colNAC = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE Index = '" & $s_nicIndex & "'", "WQL") If IsObj($colNAC) Then For $objNetCard In $colNAC If $METRIC <> $objNetCard.IPConnectionMetric Then ConsoleWrite("Metric was set to " & $objNetCard.IPConnectionMetric & ". Setting to " & $METRIC & "." & @CRLF) $s_isSet = $objNetCard.SetIPConnectionMetric($METRIC) ConsoleWrite("SetIPConnectionMetric Result = " & $s_isSet & @CRLF) Else ConsoleWrite("Metric is already set to " & $METRIC & @CRLF) EndIf Next EndIf EndIf EndFunc ;==>_SetNicInterfaceMetric2