Jump to content
Macro Express Forums

kevin

Admin
  • Posts

    1,950
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by kevin

  1. The technique works for both Macro Express and Macro Express Pro. It has been tested on Windows XP and Windows 7. (Since it works on Windows 7 it is likely to run on Windows Vista.) The sample macro Context Menu Macros demonstrates its use. Try the sample macro, look at the comments in the macro and your questions should be answered.

     

    For it to work, information must be passed from Windows Explorer to Macro Express Pro. This is done via variables. Some of the parameters you are seeing are used to pass the path name of the file you click to a Macro Express Pro variable. The 'How it works' paragraph on the Context Menu Macros page describe how it works.

  2. One other thing. The backup routines were improved in Macro Express Pro v 4.1.1.1. Now, backups are only made if the macro file has actually changed since the last backup. The date/time stamp of the backup reflects the last time the macro file was changed. And, the restore macro file option was added to the File menu.

  3. I don't like the way the backup works either so I wrote my own backup macro. It logs changes note, dates, and does other cool things. You might consider doing the same yourself.

    This is certainly a good option. Use the power of Macro Express Pro to customize how backups work.

  4. And maybe this should be on the wish list. Allow us to config the backup nameing convention "OriginalMacrosFileName" & _bakxxx.~mex - I don't like it. Just my 2 cents I would use "OriginalMacrosFileName" & the date and possibaly time. And forget that ~ added to the extension thing.
    You can tweak the backup file pattern (well, other than the date and time) by changing the registry value 'Backup File Pattern'. By default, this is set to 'bak###.~mex'.

     

    The pattern is appended to the end of the macro file name. The #s are used as a counter to keep track of the number of backups that are kept. The number of #s determines how many digits to use. If you include one #, then only 0 through 9 will be used for backup files. If you include two #s, then the names will be from 00 to 99.

     

    You can replace 'bak' with a string of your choosing or even leave it out.

     

    You can change the file extension. We do not recommend that you use the same .mex extension as the macro files.

     

    This registry value is found here:

    HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express 4\Backup

    Changing 'Backup File Pattern' here will affect only the currently logged on user. In other words, each login for a given computer could have a unique backup file pattern.

     

    To set the 'Backup File Pattern' for all users on a given computer create the following registry key:

    HKEY_LOCAL_MACHINE\Software\Insight Software Solutions\Macro Express 4\Backup\Backup File Pattern

    The usual warnings apply about being careful when making changes to the registry.

  5. (1) Most windows based apps when using three dots at the end of a menu selection this usually means the apps will be asking for the user for additional info. But when I make this selection I get not futher interaction from MEP (see attachment).
    Yes, you're right. The dots have been removed. Thank you for pointing it out.

     

    (2) I configured MEP to backup ( A ) When the editor closes AND ( B ) at 12:00 PM daily AND ( C ) too keep 14 backups. ... I would think I should see new dates on the backups time stamped around 12:00 PM but NO.
    In Windows, when a file is copied from one location and pasted to another, the date and time stamp remains intact. It remains at the time the file was last altered, not the time the file is copied. This is true even if the file name changes (e.g. ProcessCallStack.mex ---> ProcessCallStack - Copy.mex in Windows 7). Further, all backup programs retain the original date and time stamps of the files that are backed up.

     

    Macro Express Pro is consistent with this standard way of doing things. The date and time stamp of the backup contains the date and time the file was last changed, not the date when the file was copied to create the backup.

     

    Having been in the IT world more years than I wish to admit …
    ;) You may be surprised. Do you remember the days before Windows, before DOS, before CPM? Before floppies (3.5, 5.25 or even 8 inch)? When storing programs on cassette tapes was an improvement over paper tape and punched cards? Batch processing? And when 32K of RAM was a lot of memory? Ah, the tales we could tell. :)
  6. This wouldn't be needed if the ME Pro option to extract Milliseconds for the Variable Modify Date / Time command actually worked!
    Extracting milliseconds from a Date/Time variable works fine.

     

    But of course it can't, because the data doesn't include milliseconds.
    The Date/Time variables do include milliseconds.

     

    Here is a sample macro demonstrating their use.

    SampleElapsedSecondsAndMilliseconds.mex

  7. 1) Excel 2007 windows activate. I have a Excel file open but no matter what I write or do it doesn't work if there are more than 1 window of Excel open. For example I have my file and another excel file open in different windows. No matter if I set it to exact match and set the exact name it still won't open the correct Excel. Is there a solution for this or the only advise is to keep one Excel window open constantly?

    I have noticed in my manual (non-automated) use of Excel that it tends to open new workbooks as windows in the same instance of Excel. I get around this by launching a second instance of Excel and clicking File, Open to open the new file. This can be automated via a macro.

     

    2) Internet Explorer 8. I have a webpage where I need to navigate to a button to activate it. Sadly the problem is that if I navigate there with the tab key then I have no means of activating it. Clicking enter makes the webpage click on another button at the page that means "next page" rather than the link I need to open. Mouse locator seems to like to act up sometimes making it slightly miss the coordinates. No idea exactly what is causing it. In the end I though that perhaps if I opened the buttons URL then it works but sadly I don't seem to find a way to activate a URL through MEPro without causing it to open a new window. I clicked the settings in the internet options but nothing. Any advise how this could be done would be greatly appreciated.

    Please do not mix topics in a single post. It is best to start a new topic. Answers to different topics in a single post get confusing.

     

    Briefly, have you tried doing a 'find' on the web page and then moving the mouse as needed to be over the button? You could then use the Mouse Left Click command to click on the button.

  8. Make sure you are using lower case letters.

     

    ...Firefox Ctrl+L gives the location bar.
    Not exactly true. Ctrl+l gives the location bar, Ctrl+L does not (on my computer).

     

    When you use an upper case letter like Ctrl+L or <CtrlD>L<CtrlU>these keystrokes are sent: <CtrlD><ShiftD>l<ShiftU><CtrlU> (where l is lower case L). Often, as in the case of Firefox this does not work.

  9. ...password protection can be maddening when editing because it will ask you every time you click another category or macro.

    One way around this is to add the password once your editing is complete.

     

    3- You can set NTFS permissions on the file so that by default users can read but not write. Then give your editors write access.

    This is not recommended. Macro Express Pro needs full Read/Write/Create/Modify privileges/rights to the macro file.

  10. You can set a password for either Running or Editing a macro. To "prevent them from opening macro files and altering code" just set a password to prevent editing.

     

    To set a password on the entire macro file, with the Macro Express Pro - Explorer window open, highlight the name of the macro file, right click and choose 'Set/Clear Password(s)'.

     

    To set a password on an individual macro, with the macro open in the Macro Express Pro - Script Editor, click on the Security tab, choose 'Use separate passwords for editing and running this macro' and then click on 'Edit Password'.

  11. Now there is another issue with the clipboard in MEP that I thought had been fixed but evidently not. When I get a moment I will try to review my emails and such. The problem is that users of Excel get errors about Excel not being able to empty the clipboard. If one disables the clipboard hook the problem goes away. I was just at a user's desk a few minutes ago and witnessed this problem. My point is I think there are some gremlins in the clipboard hook.

    Note to other forum readers: Per private email with Cory it was discovered that this user was not using the latest version. The clipboard issue will likely be resolved by upgrading.

  12. Hi Peter,

     

    I have missed working with you and have wondered what happened. Now I know. Mac? :( No, there are no plans to write a version of Macro Express for the Mac. Yet.

     

    You used to do a lot of overnight processing. Do you still do those tasks with Windows? Have you tried Parallels or Boot Camp on your Mac for those tasks? I'm just wondering how it works.

     

    Best of luck to you in the Mac world Dr. Piety. Stop by any time.

  13. I have a macro which either enables or disables a system tray menu. Up until a couple of weeks ago it worked fine. Now when it is run, a system tray menu does not appear, but it shows as enabled. Has anyone had a similiar problem?

    This is a known issue in version 4.1.5.1 and has been fixed. Look for a new version soon. We apologize for the inconvenience.

  14. I don't follow. DId you change the number of array elements at run time or design time? If at design time, what advantage did Get Array Length offer other than avoid having to look at the Variables tab to see the array length?

    Two examples.

     

    I have repeat loops that loop through a variable array. If I set the repeat command to loop 25 times, I have to go back and edit that command when the array is increased to 100. If you are only using one loop then this might not be very difficult as long as you remember to make the change. But some macros are long and complex and it is time consuming to track down all commands that have hard coded numbers.

     

    In another type of macro an array is used to process information but the number of elements in the input source (a .csv file, a list of files in a folder, etc.) might vary. The macro works fine for days, weeks or even months but one day stops working with an error message. Now time must be spent figuring out why the macro no longer works. (I may not remember how the macro is written and I have to study it to figure it out again or it may have been written by someone else.) Initially 100 elements in the array were enough but now it needs 101.

     

    A few lines of macro commands can check to make sure that the index the macro is about to use does not exceed the number of elements in the array variable. If there is a problem, a warning message is displayed and the macro halts.

     

    By using Get Array Length the length of the array can be changed and the macro can be fixed without editing the script commands in the macro. You change the length in one spot and don't have to change it throughout the macro.

     

    This is the same concept of using variables to hold delay times, file names and/or paths and setting these variables at the top of a macro.

  15. One user said she was manually filling in another web form, and her monitor/kybd/mouse were switched to the other computer even though she did not invoke the switch.

    I used such a switch for a while (although it was called KVM for Keyboard, Video, Mouse). I noticed a couple of things.

     

    Macro Express could not control the switching actions; it could not send any commands to the KVM switch. This is understandable since Macro Express interfaces directly with Windows and the KVM sits between the keyboard and the computer.

     

    The length of the cables could be problematic, especially if they were unshielded and it was difficult to position the computers close enough to be able to use short cables.

     

    Other than these issues the KVM switch worked great and there were no problems with Macro Express or any other programs running on my computers.

     

    If I had to guess, since Macro Express cannot send keystrokes to a KVM switch and the KVM switched computers without the user invoking it, you are experiencing interference with the cables. Make sure you are using short and shielded cables. Make sure they do not run next to power cables, power supplies, plugs or other things that can generate interference. And, you might just have a bad switch.

  16. What is the penalty, in memory or otherwise, of creating a string array much larger than you ever would need? Any logic to process elements sequentially could be written simply to stop when an empty element is reached. Does the array take up significant space if values have not yet been assigned to the elements?

    Larger variable arrays do take up more space. My educated guess is that each element in the array takes around 16 bytes. I haven't really thought about how much space they take, just that it takes some space.

×
×
  • Create New...