Jump to content
Macro Express Forums

paul

Members
  • Posts

    1,049
  • Joined

  • Last visited

Posts posted by paul

  1. But unlike you I'm not a programmer. And Macro Express is not a programming language. And I'm guessing most of its users are not programmers. So words like 'global' need more careful definition and explanation IMO.

    That's all fair comment - actually, to put it more strongly, you're quite right, and I've made the same error as below.

     

    This reminds me of when I was trying to explain what the word "default" means, as in a default option. It never occurred to me that we computer nerds have taken this word "default" and completely changed its natural meaning.

  2. An associated issue is that I recently learned from a post by Kevin that 'global' doesn't mean what I thought. There are in fact no truly global variables supported by ME Pro in the usual meaning of the word.

    Au contraire, I find global variables to be pretty well what I expected. I cannot think of any language that allows you to declare a global variable which then becomes available to any program or process written in that language. A global variable is simply one that is available at and below the level it's declared at in the program which is currently running. A local variable is available only in the module that declares it.

     

    All ME3 variables are global: If M1 assigns "ThisWord" to %T1%, then calls M2, M2 can address %T1% (read it, change it).

    This is equally true in ME4, unless %t1% (or %t[1]%) has been declared to be local to M1, or M2 is called without having M1 wait for M2 to finish.

     

    The commands to Save and Restore variables are used in a different context. If M1 assigns "ThisWord" to %tVar% and then calls M2 (waiting for M2 to finish), as stated above M2 can address %tVar%. But if M2 is activated independently, then M2 cannot see %tVar% unless M1 saves text variables, and M2 restores text variables. When you invoke a macro using the /V parameter, as in Meproc /AM2 /VtVar:ThisWord, this is similar to having M1 assign a value to %tVar% and save Text variables, and then you running M2 independently.

  3. Why is that relevant? I don't want to see any 'Hidden' windows, if that's what you mean by 'not visible'. All open Windows Explorer folders are 'Visible' windows and those are the only ones I want to restore.

    Your original post states this:

    To test it I just open a set of 8-10 My Computer folders (with full paths shown in titles), arrange them to suit me, minimise some of them, hide others (e.g. with my browser), and then run the macro. I want and expect all folders to appear just as they did originally, with none hidden.

    I read this to mean you open a number of explorer windows (8-10), then minimize some and hide others. Then you run your macro, and want all the original windows to reappear with none hidden. Which I read to mean that you want to unhide those windows you had previously hidden or minimized.

    That's why it's relevant.

  4. Your pair of macros certainly causes ever-increasing memory usage. But, for me, it does not slow my machine down at all.

     

    Here are my figures:

     

    Start MacExp

    Mem Usage: 17,376K Page faults: 7,180

     

    Run your macro for 60 seconds

    Mem Usage: 94,320K +543% Page faults: 27,210 +242%

     

    5 minutes after stopping the macro, the memory usage remains the same!

     

    This needs some attention from Insight!

  5. Your pair of macros certainly causes ever-increasing memory usage. But, for me, it does not slow my machine down at all.

     

    Here are my figures:

     

    Start MacExp

    Mem Usage: 17,376K Page faults: 7,180

     

    Run your macro for 60 seconds

    Mem Usage: 94,320K +543% Page faults: 27,210 +242%

     

    5 minutes after stopping the macro, the memory usage remains the same!

     

    This needs some attention from Insight!

  6. I also have a problem with loosing focus starting back in the beta days of MEP. I will be typing merrily away and suddenly no windows will have focus. Alt+Tab release Alt+Tab will refocus my original app. Every time I've had this happen I have had a Remote Desktop session open to a Terminal Server that is running MEP. I think something with the rdclip.exe and MEP on the other end is somehow messing with MEP monitoring the clipboard on this end but it's totally speculation.

    This has just started happening to me too. I'm also running Remote Desktop, but it's the local machine I'm talking about. I'll be typing an email, when the cursor will suddently disappear and my words literally vanish into thin air. If I'm patient, focus will return within perhaps 10 seconds, but my words of wisdom are gone!

  7. Has anyone else seen this? This morning, my computer came to almost a complete halt. Right-clicking on the taskbar and selecting Task Manager took perhaps 20 seconds, 10 seconds per click. Yet CPU usage was only 6% or so. After terminating a few processes (at 10 seconds to click on the process, another 10 seconds to get the confirmation after pressing Delete, and another 15-20 seconds actually to terminate the process) the computer remained as sluggish as ever.

     

    Then I terminated Macexp.exe and that solved the problem (no macro was running). Reloading the terminated processes and MEP has not, so far, caused any reappearance of the problem.

     

    I also experienced this same problem yesterday, but didn't realize that MEP was the probable cause.

  8. Does anyone else think it would be a good idea to have each tab on a command (e.g. On Error or Comments) acquire an underlined letter so that we can quickly access each tab by using Alt with the designated letter? As it's currently set up, we must either tab several times and then press the right arrow once or twice, or use the mouse. I don't find either option very attractive!

  9. It's not a question of multiple spaces. It's spaces where a space should not be, in the middle of a word.

    Ah, it becomes clearer!

    You could always try a different approach:

    - Change all non lower-case letters to, say, "@" (excluding spaces)

    You can do this with a Repeat loop, using a variable containing all the non lower-case characters and extracting each character

     

    - Replace all occurrences of "@ " with "@@"

     

    - Replace all occurrences of " @" with "@@"

     

    Now (I think <g>) any remaining spaces are the ones you were looking for

  10. Thanks. I think that would do it if I already knew where the three characters are in the string, but I will not know that. I want to find any two lowercase characters that are separated by a space (i.e., every word after a space should begin with a capital letter, but sometimes there are unwanted spaces in the middle of a word, hence before a lowercase character). To use the above, I guess I would have to loop through the variable finding all the spaces and then testing the surrounding characters for case. I will work on that.

    No, don't do that! Simply replace all multiple spaces with single spaces, as in Change " " to " " (all occurrences). hen my code will work.

    By the way, when writing a forum message, every time I try to type an apostrophe, my cursor focus gets moved out of the message and into a "Find" box. Is this to be expected?

    Ah, the dreaded Firefox problem, which occurs randomly throughout Firefox.

    There's 2 ways to solve this:

    - Clear your cache

    Tools / Options / Privacy / Clear Now / Cache

    This should solve the problem until it next occurs

     

    - Refer to the last paragraph in this URL and install the recommended extension

    SearchHotkeys

     

    There are other recommendations out there, but they have never worked for me.

  11. Using the comment command under Macro Control, I can apparently write as much text as I like (although the control does not display any scroll bar when there's too much text to fit in the unresizable window). But only the 1st 255 characters are displayed, the rest of the text being replaced by an ellipsis (...).

    I'm not sure whether I really like this. Since I'm writing these comments for myself, or for the guidance of my users/audience, etc.,

    surely it should be up to me to decide how much text I want to use - after all, I can write each new line of text as a new comment statement if I want.

     

    Is this restriction really necessary?

  12. I was not aware of a PGM function to return serial date value from text. Does such an animal exist?

    Here's a 3-line macro (ignoring the last line, and you need either line 1 OR line 2) that I think does what you want (I'm using today's date as my example):

    <DATE/TIME Format="dd mmm yyyy" Flags="\xB0" Date="5/04/2009 10:22:45" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%Date1%" IsDateVar="FALSE"/>
      <DATE/TIME Format="dd mmmm yyyy" Flags="\xB0" Date="5/04/2009 10:22:45" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%Date2%" IsDateVar="FALSE"/>
      <MACRO RUN Use_ID="FALSE" Name="{ DateTime - Date to Character DOW }" ID="-1" Wait="TRUE"/>
      <READ REGISTRY VALUE Key="HKEY_CURRENT_USER\\Software\\Professional Grade Macros\\Parameters\\ReturnString1" Destination="%Day%"/>
      <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang3081{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Date1:%day% %date1%\r\n\\par Date2:%day% %date2%\\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"/>

    which looks like this in English!

    Date/Time: Set %Date1% to the current date/time using "dd mmm yyyy" as the format
    Date/Time: Set %Date2% to the current date/time using "dd mmmm yyyy" as the format
    Macro Run: { DateTime - Date to Character DOW }
    Read Registry Value "HKEY_CURRENT_USER\Software\Professional Grade Macros\Parameters\ReturnString1" into %Day%
    Text Box Display:

×
×
  • Create New...