Jump to content
Sign in to follow this  
Turranius

Problem with _Timer_GetIdleTime() and Windows 10 Version 1511

Recommended Posts

Turranius

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
AutoBert

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
Turranius

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
BrewManNH

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
Turranius

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  

  • Similar Content

    • PramodR
      By PramodR
      Hello,
      I have to execute below block of code in elevated previllage, as that particular wmic class will work only with admin previlage.
      i am getting out put when i launch autoit as administrator,  but i will not be able to launch autoit as admin in this particular case but my user have admin rights.
      is there any better way i can run those command as administrator.?
      tried below steps:
      i have tried #RequireAdmin but that creates a user prompt  Tried using Runas command but gives error as wrong username or password , stuck with that step.  
       
    • dwaynek
      By dwaynek
      traytip isn't working in windows 10. nothing happens when i use the Traytip command.
      here's a simple script i used:
      TrayTip("I'm a title", "I'm the message", 5) i tried changing the registry setting HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced ( which didn't have EnableBalloonTips) and creating a DWORD entry called EnableBalloonTips and setting it to 1 and logging off then back in. that did not resolve the problem.
      i'm running Windows 10 v1709 b16299.431
    • antonioj84
      By antonioj84
      Hi all to the forum guru and expert I am trying to  automate this. in the registry  I have the network profile name network 2 and network   I want to  change their  CATEGORY  to Private .  Can someone lead me in the right direction.
      Private is 1 and Public is 0
      #RequireAdmin Global $sHKLMRoot = @OSArch = "x64" ? "HKLM64" : "HKLM" RegWrite($sHKLMRoot &"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" ,'/v NetworkList /t REG_MULTI_SZ /d 00000000 /f') see  attached picture below
      Much appreaciate
       

    • PhoenixPRO
      By PhoenixPRO
      When I try to automate this install program I can not get any of the buttons to click with the "ControlClick" function or any mouse movement to move the mouse to the and click it.  My OS is Windows 10 64Bit.  I have tried both 32bit and 64bit installs of Autoit V3 to no avail.
      I could not even get the run command to start the program until I used the variation of the command below in the script.
      With the script below the install program starts but will not click the "Next" button no matter what I do.
      Any help will be greatly appreciated.
      Thanks in advance.
       
      #include <MsgBoxConstants.au3>
      Opt("MouseCoordMode", 0) ;1=absolute, 0=relative to active window, 2=client
      Local $Success
      Run(@ComSpec & " /c " & 'C:\PhoenixPro_Install\RDXUtil\RDX_Tools_setup.exe', "C:\PhoenixPro_Install\RDXUtil", @SW_HIDE )

      WinWait("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62")
      WinActivate("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62")
      ControlClick ("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62", 1639, "left", 1) ;Next Button
    • TheWizEd
      By TheWizEd
      How do I work with 2D arrays.  I've tried this but get errors.
      Local $aTest[4][4] = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]
      ;$aTest[0][] = [10,11,12]  ; Error at []
      Local $sTest = ""
      For $i = 0 To UBound($aTest)-1
        Local $aExtract = _ArrayExtract($aTest,$i,$i)
        $sTest = $sTest & MyTest($aExtract)
      Next
      Func MyTest($aTemp)
        _ArrayDisplay($aTemp)
        ; Error at    v $aTemp
        Return String($aTemp[0]) & " - " & String($aTemp[1]) & " - " & String($aTemp[2]) & @CRLF
      EndFunc
       
       
×