Jump to content

ControlSetText and monitor refresh rate windows 10


Carm01
 Share

Recommended Posts

All,

 

I have windows 10 64 bit pro with the latest versions of scite and 3.3.14.2 installed. Not that it matters for this instance.

My monitor resolution is 1920 x 1080 progressive with a refresh rate of 64 HZ ( more in a min on that )

I have a Nvida gtx 960 card and an HP monitor

Since moving to Windows 10 and this configuration ( latest drivers of course ) I am unable to see the " ControlSetText " being displayed under the standard 60HZ refresh rate in WIndows 10. On Windows 7 machines this is flawless and always had been. The ControlSetText is updated at an extremely fast rate. IF I change the resolution one notch lower in windows 10 the display displays the text like in Windows 7 60HZ refresh. IF I user the max resolution 1920 x 1080 @ 60 HZ nothing is displayed in Windows 10. IF I create a custom resolution profile and just change the refresh rate to 64HZ it displays normally in Windows 10.

If I enable " GUIGetMsg() " it displays fine but processes very slow fyi

I will place the relevant code below. I am wondering:

1) what is the max refresh/update rate for ControlSetText ( fasted it can be updated )

2) Could this be adjusted either in code without hampering processing speed

3) Does this need to be addressed in AutoIT program itself as a bug ?

 

 

 

#include <Array.au3>
#include <File.au3>
Local $aRetArray, $aArray
local $sFilePath = @ScriptDir & "\info.txt"
_FileReadToArray($sFilePath, $aRetArray)
Local $aArray[UBound($aRetArray)]
SplashTextOn("Percent Complete", "", 130, 40, -1, -1, 16, "")
Local $a = 0
Local $hTimer = TimerInit()
$bb = UBound($aRetArray) - 1
For $i = 1 To UBound($aRetArray) - 1 ;
    ;GUIGetMsg();prevent high cpu usage
    $line = $aRetArray[$i]
    If StringRight($line, 2) = " X" Then
        If $i = 1 Then
            $line1 = StringLen($line) - StringLen($aRetArray[$i])
            $line2 = StringRight($line, $line1)
            $line3 = $aRetArray[$i]
            $line4 = $aRetArray[$i + 1]
        Else
            $line1 = StringLen($line) - StringLen($aRetArray[$i - 1])
            $line2 = StringRight($line, $line1)
            $line3 = $aRetArray[$i - 1];
            $line4 = $aRetArray[$i + 1]; 
        EndIf
        $aArray[$a] = $i & "| " & $line3 & "| " & $line2 & "| " & $line4
        $a = $a + 1
    EndIf
    ControlSetText("Percent Complete", "", "Static1", Round((($i / $bb) * 100), 2))
Next

Thanks in advance

Edited by Carm01
there is a script you can run
Link to comment
Share on other sites

Please post a script we can run so that we can see the same issues you say you're seeing.

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

Link to comment
Share on other sites

Please post a script we can run so that we can see the same issues you say you're seeing.

Posted

I wanted report at work on a windows 10 machine, a laptop at that, I had zero issues, but it was not at that high of a resolution but 60HZ.

Also turning off clear type text on the problematic machine allowed the progress to show barely though.

I also added a quick video of what I am experiencing. First with 60HZ 1920 X 1080 and second with 64HZ 1920 x 1080

 

 

ControlSetText.mp4

Link to comment
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
 Share

×
×
  • Create New...