Jump to content
Macro Express Forums

mfseeker

Members
  • Posts

    31
  • Joined

  • Last visited

Posts posted by mfseeker

  1. I know this is a big topic, but, thanks to Terry, I have been investigating PowerPro. What incredible flexibility! It is overwhelming at first. Before I go too much further, I would like to know whether I am going to get into peculiar situations because I am trying to use both MEP and PowerPro.

     

    What determines the order of activation precedence between PowerPro and MEP?

    1. Is it simply a matter of which program stars first?
    2. Do both absorb the activating event (such as a hot-key or window activation), or do they pass the activation through to the other program?
    3. Do the different sorts of activation event exhibit the same precedence behaviour?
    4. "Restore Keyboard and Mouse Hooks" will force MEP to have precedence for keyboard and mouse events. Does that command work to give priority to MEP over PowerPro? Is it always necessary, if that is what you want?
    5. Is there any way of reversing the precedence of the two programs?
    6. What about non-keyboard/mouse activations? Do they establish precedence differently?

    Of course, I could do a whole bunch of tests to answer these questions, but if someone already knows the answers, I would just as soon spend my time trying to gain a minimal mastery of PowerPro.

  2. I assume you mean with ME Pro? (I ask because there has been a lot of discussion about this in the ME 3 forum, in the thread http://pgmacros.invisionzone.com/index.php...c=3575&st=0 )

     

    1) That does seem very slow. A quick test here on my quad core PC gave a barely measurable time. So I changed to 1,000 loops and that took 8 seconds. The alternative two-command method took 11 seconds. But obviously it will depend amongst other things on individual PC specs.

     

    2) Paul originally made that assertion in the ME 3 thread, but has repeated it here. So I suppose it's fair to assume it is meant to apply to ME Pro? If so then my test above contradicts it, like yours does. In fact in my case the simple Clipboard Empty was about 30% faster (11s v 8s). Given its simplicity, I'll be using this method.

     

    3) But any such tests need to specify other key settings. In particular, in ME Pro, that under Options > Preferences > Playback > milliseconds between failed clipboard commands. Mine was set to the default of 250 ms until I recently discovered what a major impact it has on these sort of tests. The times above of 8 and 11 seconds were with my new setting of 10 ms. Here are a fuller set of results, showing that it's roughly directly proportional:

     

    ME Pro, Clipboard Empty Method, 1,000 loops:

    250 ms (default) ==> 244 s

    100 ms ==> 108 s

    50 ms ==> 58 s

    10 ms ==> 8 s

    2 ms ==> 4.2 s

    1 ms ==> 2.2 s

    0 ms ==> less than 1 s

     

    BTW, in ME 3 it's interesting that the setting doesn't include the word 'failed':

    Options > Preferences > Delays > Delay (in milliseconds) after clipboard commands (Default = 250 ms; my current setting = 10 ms.)

     

    --

    Terry, East Grinstead, UK

     

    Yes, I am using ME Pro.

     

    Here are some quick results:

     

    ME Pro, Clipboard Empty Method, 100 loops:

    250 ms (default) ==> 21 s

    10 ms ==> 1.5 s

    0 ms ==> 15 ms

     

    I would guess this is a very significant issue for many of us. At the least, developers should be made aware of it. More study seems to be called for. When do we really need delays? The price paid for using a 250 ms default delay, so as not to have to introduce delays on a case by case basis, seems rather high.

     

    I have recently completed my "Toggle Text Case" macro (emulating Microsoft Word's Shift/F3 command). Using the default 250 ms, there is a noticeable delay in the execution of the macro. With the 0 ms setting, the macro is perceptually instantaneous. However, it also runs erratically, sometimes succeeding, sometimes failing.

  3. If your interested I did do some dyno runs with MEP on many different things like speed of repeat with folder, file writes and reads, and other such commands to see how long they took. It was very telling and helpful when considering how to design large macros. I can dig them up if you're interested.

     

    That would be great, Cory. So far I haven't graduated to designing large macros, but even in smaller macros there are occasions where we are working in loops with many reps such that timing info becomes important.

  4. Scasper,

     

    As far as existing macros are concerned, you will have to do it manually. However, there is a simple solution for the future. Whenever you think you might need a variable in other macros, use Save to Environment Variable under Variable Modify String. Such values can then be read into any future macro by Set from Environment Variable under Variable Set String.

     

    Did I say this was simple? Well, not quite. You do have to remember to save these variables whenever their values are changed by a macro that you want to allow to change them permanently.

     

    These will all be string variables, so if you need other types, you will have to convert them when you read and write them.

     

    Of course, you could also achieve the same thing by using a text file, provided you remember the file's name and location. :unsure:

     

    Stan (mfseeker)

  5. Works fine for me. Just some random thoughts:

    Are you on 4.0.1.1? Do you have "Switch Focus" enabled? Are you using any other clipboard utilities like ClipMate? Is your system slow at all? Possible ad-ware infection? What if you insert a delay? Does it work with F9? i not in F9 what if you insert a delay before the copyclip?

     

    Before going any further I would boot to safe mode and try it again in there. I'm guessing it most likely that something else in your system is causing some interference or delays.

     

    Yes, I am on 4.0.1.1.

    Yes, "Switch Focus" is enabled.

    I am not using any other clipboard utitlities.

    My system is a 2.8 Ghz P4 with 3GB of RAM. It is very responsive.

    Adware infection is doubtful. I am using the new Norton. It seems to do a good job on adware.

    I have tried half second delays before, after and throughout. No help.

    F9 fails too.

    But now, suddenly, F9 does work, but F7 still fails.

    Inserting one second delays doesn't help.

     

    I will now restart in safe mode, as you suggest.

  6. This is odd. I have a macro that copies a phrase from a text to the clipboard. It does the job when I run the macro, but when I try to step through the macro with F7 the clipboard remains empty. Changing the delay pref or inserting delays doesn't help.

     

    Try this with any text processing program (Notepad will do) containing some selected text. Try first with F7; then run it with Test Run. You might want to empty the clipboard first between runs.

     

    <CLIPBOARD COPY/>
    <VARIABLE SET STRING Option="\x02" Destination="%TestText%"/>
    <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\lang4105\\f0\\fs16 Here is the text from the clipboard:\r\n\\par \r\n\\par %TestText%\\lang1033\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
    
    

  7. Thanks for explaining this further and for looking into the code again. Nevertheless, it is really annoying to have to keep waiting for it.

     

    I just tested again with no windows open except the macro editor window itself. The delay seems to be just as long as when several windows are open. Perhaps this will be of some use to you in fixing the problem.

     

    Stan

  8. Well guys, I have egg on my face.

     

    I discovered what was causing the delay in the execution of my capitalization macro in Open Office Writer. The activation I had chosen was Shift/F5. For some reason in Writer, and only in Writer, I was not releasing the Shift key for five seconds after I pressed the combination. So long as the Shift key is depressed the macro's execution is delayed. I have verified that I can get the same delay in any editor and that I can eliminate it from Writer simply by promptly releasing both keys.

     

    I am sorry to have caused needless fuss. I can only hope my folly is of benefit to someone else. I did learn a lot along the way. Thanks especially to Cory and Chris for furthering my Macro Express Pro education.

  9. I can report the same problems Terry is having with the F9 delay. The delay also occurs with F7 and F8.

     

    Chris, your answer that the problem is "due to the fact that MEPro is querying all of those windows for their titles" can't be right because, as Terry has reported, the first time I run F9 there is no delay.

     

    I also checked my processes and found the failed attempts to "Enable Autodial" at the rate of about two per second. Does this have anything to do with the fact that I have not yet upgraded my license to Macro Express Pro?

  10. I am not running it in the editor. In fact, the editor is closed.

     

    In Open Office Writer the macro takes about five seconds to change the case of the selection, regardless of the length of the selection. In other programs (this reply editor, for instance), it is almost instantaneous.

     

    The "failed clipboard commands" setting was the default 250 ms. I reset it to 100 ms. That made no perceptible difference in the delay.

     

    Cory, I am copying the selected text to a string variable, processing it, and then pasting it back into the original document. When the text is being converted to Title Case I am using your macro. When the conversion is to lowercase or Uppercase, I am not. All three cases show the same five second delay.

  11. Thanks for the leg up, Cory.

     

    Well, my macro is finished. It recognizes the case of either a selected word/phrase or the word in which the cursor is located, and it replaces lowercase with Title Case, Title Case with ALL CAPS, & ALL CAPS with lowercase.

     

    I have avoided arrays, and in the conversion to Title Case I have used a slightly modified version of your macro.

     

    Unfortunately, my dream of creating a macro that would work in any text editing application has faltered with OpenOffice Writer (my primary application). My macro works there, but it takes too long. For every other application I have tried (including Microsoft Word, where it is superfluous), the replacement is virtually instantaneous. For Writer, it takes several seconds.

     

    If anyone wants the macro, I could make it available (of course, with your permission to use your macro). I notice that you posted your macro on your site. Lacking a site, as I do, what it the best place to make our macros available to others?

     

    Stan

  12. Aha! The problem seems to have been with my debug variables display. The value of StringText is displayed properly by the Variable Values Debugger, but it does not display the Letters array values as I step though the repeat. Your addition of the Text Box display revealed that they were being correctly set. Maybe you are not the only one who has a broken debug pane.

     

    Thanks for alerting me to the proper use of the CODEBOX. I haven't been on this forum since 2004 when I did my last serious work with Macro Express.

     

    Yes, I have a bunch of words to which I do want to apply a capitalization rule. Uppercase and lowercase are easy. Its Title Case that is responsible for my contortions. I'd welcome a better way to do this--or anything else, for that matter.

     

    Thanks again.

     

    Stan

  13. I'm not sure whether you are asking me for the code of the test snippet or of the actual macro I am developing.

     

    The test snippet's code is:

     

    <VARIABLE SET STRING Option="\x00" Destination="%StringText%" Value="some words"/>

    <REPEAT START Start="1" Step="1" Count="10" Save="TRUE" Variable="Index"/>

    <VARIABLE MODIFY STRING Option="\x09" Destination="%Letters[%Index%]%" Variable="%StringText%" Start="%Index%" Count="1"/>

    <END REPEAT/>

     

    The actual macro will emulate Microsoft Word's capitalization command (normally triggered in Word by Shift/F3) for use in non-Word applications. Most immediately I want to use it in Open Office (though I don't want it restricted to that ap), because I am trying to wean myself from Microsoft.

     

    If you want the script or code as it stands now, I can send it to you.

     

    Thanks for your help.

     

    Stan

×
×
  • Create New...