Detect if the focus item is a button or check box
My dears I have a problem
When I try to use
it doesn't recognize the check boxes.
The result is that the selector is a button
Although the specified is a check box
but I want a way to identify the check boxes.
Because I want to make a tool that helps screen readers users
I hope you have the solution.
Thank you in advance.
I was pondering over a question with regards to the speeds of reading something and did not see this kind of question in a forum search.
The question: What is (technically) faster? Multiple reads from the same 3d array cell, or only once make a 'temp' variable from that cell and read the value from this? I don't know if either has any real impact at all anyway, but just wanted to ask anyway. :-)
There may be a difference if the value holds an integer or a string (or something else) but in my case, is a simple integer.
To hopefully clarify with a small bit of code:
$process = $start - 15 If $xy[$process] <> "x" Then If _ArraySearch($open, $process, 1, $open, 0, 0, 1, 1) <> -1 Then UpdateOpen($xy[$process], $closed) ElseIf $start > 0 And _ArraySearch($closed, $process, 1, $closed, 0, 0, 1, 0) = -1 Then Add_open($start, $closed, $counter, $process) EndIf EndIf You can read from this, that the array $closed is being read 3 times. And this goes on further in the code I did not show.
My question boils down to this, should I make a 'temp' variable to hold that $closed value until the function is done?
It may not have a real impact on my small script, but I really am interested in the answer at least.
I'm trying to check for the existance of a file, on logon the file is there, then gets deleted and after a while recreated. I'm using this code:
Sleep(100) If not FileExists($sFile) Then Sleep(150) If FileExists($sFile) Then GUICtrlSendToDummy($iDummy) What happens is this:
User logs on, the file is present, or at least it usually is After about 10 seconds the file gets deleted Then after about 50 seconds the file gets created again, this is when I need the check, because now the process is finished. The above code is part of a pretty long do....until false loop running an animation.
The problem is that sometimes this code fails. Without the sleep statements it didn't work at all so I think this is a timing issue. Pretty primitive code I admit, there must be a better way...
Searching inside the forum, I don't succeed to get any explanation about a strange (for me !) phenomena:
Using AutoIt, I have coded a "cortex of neurons Simulator" for which I handle several neurons activity (Action Potential and Postsynaptic Potential) which take a long time, about 20 ms per neuron to be processed. This is why I need a global loop running about 1s for a global cortex of 50 neurons.
But when I move the mouse (in any direction, like rotating above the GUI) the speed of the loop increase significantly : around x8 times more ... !
This happens only if the GUI has the focus. I did a check with the "Windows Task Manager" where I can see the CPU usage changing every time the mouse is moving (growing from 3% to 15%).
I believe to remember some lecture about the influence of the user events regarding the "Application" capability to anticipate user actions by changing it's rate of pooling events, but I'm not sure it was in an AutoIt forum, or maybe it was in an other "developer forum" (like "Code Project", "Stackoverflow" , or ...?
Could somebody help me to understand this behaviour ?
If possible, is there a programmatic method to manage the speed of a simple "For, Next" loop ? I try to change the Application priority (setting to level 4 with "ProcessSetPriority"), but this seems not very efficient ....
FYI: I'm using :
Autoit 18.104.22.168 Windows 7 Home Premium Service Pack 1 Computer ASUS N56V Screen resolution: 1920x1080 (recommended) Theme :Windows Classic
I have written a programm offering me a lot of hotkeys to work with windows. All in all there are 40 hotkeys defined now.
Now I made a portable version of it. But in this there are a lot of hotkeys useless. So I had to change some things. But that's not my point.
Because of all these many hotkeys I sometimes know I made a hotkey but what were the keys I have to press.
So I want to make a little help GUI or html or whatever. Now I'm interested to automate my own list of hotkeys.
How can I collect all my hotkeys and necessary keys for this in a list?