Jump to content

Shastaman

Members
  • Posts

    18
  • Joined

  • Last visited

Shastaman's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. The suggested solution does not resolve the problem. The problem is I start SciTe, open an AU3 file, highlight an AutoIT command, and press F1, but nothing happens. I want AutoIt help to start and go to the command highlighted. I'm trying to find how where and how to configure “press F1 and AutoIt help starts”.
  2. Thanks for your response. I believe WinWaitDelay only controls what happens after the window is found, i.e. adds a pause before moving to the next command. Still looking for confirmation of the 250ms polling freq...
  3. What is the polling frequency of the WinWait command? I'm trying to determine the tolerance in measurements I'm trying to do using AutoIT. I'd like to know how often it polls so I can tell how much time might have elapsed between the window appearing and the script checking for it again. I realize that the system can't poll constantly as it would begin to impact the activity I'm trying to measure.
  4. After uninstalling and reinstalling AutoIt, help doesn't start from pressing F1. It doesn't do anything when I press F1. The help file is there and I can go and open it directly, however, it doesn't open using F1, besides not going straight to the command I have selected in the editor. I've looked through the configuration files and don't find where that's configured. I tried uninstalling and reinstalling again, without success. Thanks
  5. I understand WInWaitDelay clearly. It merely adds a constant time after a successful window find command. I definitely don't want to use that. I don't see that your script exposes the polling frequency. I think it is impossible to use the script to measure the polling frequency because the time measured will include the use of the mechanism which includes the polling frequency. Step a measures starting the application and finding the window. Step b closes the window and measures the total time up to that point. Step c waits for that window to close and measures the total time up to that point. I thought someone would know the implementation and could provide that information. I'm a little surprised it's not a well known quantity since this tool is used for automating operations which could be measured. Perhaps I can determine it by generating events at specific times myself and comparing to the detection time from auto IT.
  6. WinWaitDelay doesn't enter into this as it just adds an additional delay after completion. I must set that delay to zero to get accurate measurements otherwise every meausrement will have a constant added to it.
  7. Thanks for your extraordinary patience. Let me change how I'm asking my question. Here's what I'm doing: //Start timer $begin = TimerInit() //while the script is running, I manually start Notepad WinWait("Notepad","",30) //Stop timer elapsedTime = TimerDiff($begin) How does the WinWait command work to detect the appearance of the Notepad window? The method will determine my measurement accuracy and answer my question. WinWait has some mechanism to watch for the window to appear. I'm guessing a polling mechanism. If so, then it must check at some regular interval. It has to be less than continuous otherwise the system would spend the whole time checking for the window, and the actual window creation wouldn't have a chance to run. It has to be some balance between checking for the window, and generating the window because, again, taking all the processing time with checking for the window will prevent the actual window creation process from getting time to perform. Further, the interval will determine the accuracy of the measurements because some portion of the interval will inevitably be added to the elapsed time. 00.000001 start timer 00.000004 winwait starts - first window check - window not found yet 00.000005 wait interval 00.000006 ~~~ 02.000000 ; the window appears ~~~ 02.000294 ; winwait checks again, actually detects that the window is there 02.000295 ; end timer In our example, the measured time will be between 00.000001 and 02.000295. However, the actual time to complete the operation was 00.000001 -> 02.000000. The time added by waiting for the interval to perform the next check is 02.000000 -> 02.000294. If I'm measuring two second long operations, but I only check for the window every 1 second, then I could add another whole second to my measurement, increasing the operation time by 150%. I want to know first, what is the checking for window method (poll or something else), and then , if polling, what that interval is.
  8. I understand I can't change it, but I would like to know what it's already set to.
  9. Yep, I could do it many other ways. So, answer?
  10. Yes I understand I could but I want to know what WinWait does since I have pre-existing code utilizing that. Additionally, if I roll my own, I'm responsible for determining the polling frequency which doesn't interfere with measurement activity. At this point, it seems certain that I can't configure it, but I'd like to know so I can judge the prospective precision. It seems to boil down to the method used for WinWait timeout type funcs. I don't need specifics of the mechanism but the general method.
  11. Or does it not poll at all but do an asynchronous callback or something?
  12. I'm using AutoIt to run application tasks and trying to measure the time to complete. The frequency at which it checks for the window to exist/not exist will determine the precision you are able to attain in measuring the operation. For example, if it polled once every second, then the window could appear from right after the last poll up to 1 second before polling again. So my timer would add on up to 1 second in additional time beyond the actual completion time. Depending on the length of the operation, determines whether this is enough precision. A long operation of many seconds might not matter for comparison but a short operation would be overwhelmed by the tolerance of the precision.
  13. Stumped the panel...
  14. I see how to set a delay after a successful window operation (WinWaitDelay), but how do you set the frequency at which it polls for the window up to the timeout value?
  15. Implementing pivot table in Excel. I can create the pivot table in AutoIt without problem. The problem is that I want to defer recalculating the pivot table until I have added all data fields (otherwise each update takes a long time). I'll do a single update at end. This isn't working through AutoIt. The COM code below, waiting to update at the end, works fine in VBA as a macro in Excel but the ManualUpdate property has no effect in AutoIt. The general steps are: create a pivot cache create a pivot table using the pivot cache set manual update property to false to defer updating the file until I specify add pivot fields do update Step 3 is having no effect so it is recalculating after each added pivot field. $range = $Alabama_sheet.Range("A1:I28278") $pivotCache = $Excel.ActiveWorkbook.PivotCaches.Create(1, $range) $destrange = $pivotSheet.Range("A1") $pivotTable = $pivotSheet.PivotTables.Add($pivotCache, $destrange) ; problem here, doesn't get set $pivotTable.ManualUpdate = True ConsoleWrite("manualupdate: " & $pivotTable.ManualUpdate & @CRLF) ; this shows -1 . ; set pivotfields here . ; we want to do an update here after setting all the pivot fields ; $pivotTable.Update() Thanks
×
×
  • Create New...