Tapatalk

Has anyone else seen this behavior in Macro Compiler

Has anyone else seen this behavior in Macro Compiler

9

    Jan 13, 2007#1

    Hi, I have noticed som form of "Macro-timing bug", where it is like keystrokes goes to fast without any sort of timer for waiting until ready.
    Futher description from my bug-report to IDM (I newer got any answer) below here:

    In UE 12.10b + earlier versions, I noticed a timing bug with UE's build-in
    macro function.
    I had two files "A" & "B", where both contains filestructure info
    (dir /s /b > a.txt)
    A is at 4 mb with 36.000 lines & B is at 22mb with 208.000 lines.

    The job from my macro is to select line 1 in A copy to clipboard, then
    switch to "B" and find the same text from the clipboard (search ^c), then
    delete that line. The macro switch back to "A" and going to the next line and so forth.

    In UE I only have file A & B open, the macro timing issue, is going like the
    macro sends keystrokes way to fast so UE can't handle the keystrokes.
    I have seen this behaviour from UE, when macros have to work with file switching + search where the operation takes a little bit of time (like 1 sec)
    In programming like VB you often have to create wait for an event where some application is ready for responding, it is like that isn't programmed
    properly into UE ???

    6,685587
    Grand MasterGrand Master
    6,685587

      Re: Has anyone else seen this behaviour in Macro Compiler

      Jan 13, 2007#2

      Lars_Sandberg wrote:In programming like VB you often have to create wait for an event where some application is ready for responding, it is like that isn't programmed properly into UE ???
      I unfortunately must confirm this. On my slow Pentium 166 MHz (Win95) and sometimes also on my Celeron 500 MHz (Win98) I sometimes was also confronted with such timing problems even on small files. The same macro worked perfect on my Pentium 4 with 2 GHz (WinXP). I then used some tricks to help UE to synchronize.

      A well known and already reported to IDM (with test files and a macro) problem is FindInFiles without parameter OutputWin (= results to edit window) where the next macro command is always executed before all results are pasted into the new edit window, the window has the focus and the cursor is at bottom of the results window - see How to link up all files under a folder?.

      On very large files with several MBs this timing problems are really problematic even on fast computers. The problem is that most users of UE or UES use only simply macros on small files with not so extremly old computers like I. So the number of users who are affected by the surely hard to find and fix timing problems is extremly low in comparison with the number of users who are satisfied with the macro support of UE. This gives the timing problems a very low priority in the list of bugs to fix, unfortunately.
      Best regards from an UC/UE/UES for Windows user from Austria

      9

        Jan 13, 2007#3

        Hi Mofi, the way I solved my task, was by using a quite advanced Macro application which works with all windows applications.

        I'm speeking about "Macro Express", the biggest timesaver I ever have seen :-) Here is the website:
        http://www.macros.com/
        With Macro Express, I could easily program keystroke timers + wait for events etc.
        Bottomline I solved my task for a customer :-)

        regards Lars

          Oct 22, 2007#4

          Mofi wrote:I unfortunately must confirm this.
          Hi is the macro timing bug solved in UE 13.20 ??
          regards Lars

          6,685587
          Grand MasterGrand Master
          6,685587

            Oct 26, 2007#5

            The problem with continuing the macro execution before FindInFiles has written all found lines to the results edit window and making this the active document was fixed with UE v13.00 and UES v6.20.

            I have not tested if the problem you described with large files and heavy window switching is also fixed. If you look on the macros I have posted I don't do such a job in that way. I simply copy the content of one file and insert it at top of the other file and then insert additionally a line with only 1 special character. Then I execute a loop which makes the searches/replaces from top of the file until the line with the special character is reached. That avoids window switching and therefore extremely improves the performance of the macro.

            At Find And Delete Line Macro you can see a simple macro using this technique. You will find more with the forum search with the keywords IfCharIs and Loop ^c or ^s, selecting Search for any terms or use query as entered, entering Mofi in the author field and selecting the Macros forum.
            Best regards from an UC/UE/UES for Windows user from Austria