Jump to content
Macro Express Forums

kevin

Admin
  • Posts

    1,950
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by kevin

  1. A macro written for Macro Express 3 that uses the Run Macro In Variable will not work if imported into Macro Express Pro without changes. The reason is that the syntax of the macro commands is significantly different between Macro Express 3 and Macro Express Pro. The Requirements paragraph of the Run Macro in Variable to Convert a Date web page has been updated to say this. We apologize for the confusion.

     

    Paul is correct that using variables in the Run Macro In Variable command in prior versions was very difficult (nearly impossible). Changes in Macro Express Pro v 4.3.0.1 added features that fix those difficulties. The changes to the Run Macro In Variable command are described in the July 7, 2011 edition of the Macro Express News.

  2. As we have worked on this issue over the past year or so, we have discovered that there may be several separate problems that cause this symptom. We recommend the following.

     

    1. Upgrade to Macro Express Pro v 4.3.0.1 (or later). We have made changes that improve stability, not only for Windows 7 but all versions of Windows.

     

    2. Turn off the 'Clipboard Hook' by unchecking the 'Use the clipboard hook' option found in Options, Preferences, Activations. This change does not prevent using clipboard copy and paste commands in your macros.

     

    3. Turn off the 'Keyboard Remapping' hook by clicking the 'Disable keyboard remapping' option found in Options, Preferences, General and the Misc tab.

     

    4. Make sure that you have applied all the latest Windows 7 patches from Microsoft. Some of these patches improve the stability of Windows 7 when running Macro Express Pro.

  3. Macro Express Pro v 4.3.0.1

     

    Macro Express Pro v 4.3.0.1 is now available. This version includes many important changes including some that address the problem where Windows 7 slows down dramatically while running Macro Express Pro. Additional changes include:

     

    • Made several changes to improve CPU utilization and to prevent lockups when running on Windows 7.
    • Added the ability to edit a macro specified in a 'Macro Run' command from the right-click menu of the script editor.
    • Added the 'Do not process embedded variables' option to many of the 'Variable Set String' and 'Variable Modify String' commands.
    • Revised 'Run Macro In Variable' command.
    • Fixed a bug rounding negative numbers.
    • Fixed a bug with the Clear Variables clear all variables command.
    • Fixed an issue with TCP/IP activated macros that was caused by Microsoft Security patch.
    • Fixed a bug where the menu builder would get confused about the menu's structure.
    • Fixed a bug where the debug variables dialog did not clear out the old values when starting a second test run of a macro.
    • Made a change to resolve issues that occurred when the program shuts down.

    For a complete list of changes, see the Macro Express Pro v 4.3.0.1 Release Notes. Download Macro Express Pro from the Macro Express download page.

  4. Alan is correct. There is not a way to convert a Macro Express 4 macro to Macro Express 3. The recommendation is to keep a backup copy of your Macro Express 3 macro file before converting. Macro Express Pro v 4.3.0.1 or later will perform this function automatically.

     

    the structure of commands in the two versions appears to be slightly different.

    The structure of the commands is significantly different.

  5. A few weeks ago, the forum was being inundated with spam posts. While we worked to get that under control, some posts were accidentally deleted. At the time, if we had restored the forum from a backup, all new posts would have been deleted. The number of new posts that would have been lost was greater than the number of old posts. We chose to lose fewer old posts to save more new posts.

     

    We apologize for the problem.

  6. These user-to-user discussion forums are provided for users and developers to ask questions of others, share advice, tips and techniques, and to openly and freely exchange information, ideas, and solutions. While Insight Software Solutions employees may view issues posted here, all requests for support from Insight Software Solutions should use the following resources:

    • Report a bug on our Report a Bug page. You will not receive a personal response unless we need additional information.
    • Enter suggestions for new features using our Request a Feature page. You will not receive a personal response unless we need additional information.
    • For support visit our Request Support page.
    • See our Support page for other resources.
  7. Joe's code is not at all relevant.

    Floyd and Joe's code is relevant. See my earlier post. The Multiple Input Field sample macro runs correctly in either Macro Express 3 or Macro Express Pro as long as you stick with the %Txx% variables used in the sample.

     

    Macro Express Pro converts the Macro Express 3 macro commands to Macro Express Pro syntax.

     

    When you load the Multiple Input Field sample code into Macro Express Pro it is converted. Once converted the macro file will no longer work in Macro Express 3. Make a copy if you want to try it in both Macro Express 3 and Macro Express Pro.

  8. The Multiple Field Input Form sample creates an HTA file and runs it. When it runs, the HTA file creates a playable macro (with file extension of .mxe) containing Variable Set String commands. After the macro runs the external HTA script it uses the Load Macro Text File command to run the playable macro to write the results in variables.

     

    When viewing a macro in Macro Express Pro you can view either script commands or the text based representation of the commands. To see what it looks like, with a macro open in the Script Editor, click View, Direct Editor.

     

    Any external program can create a macro this way. In the Multiple Field Input Form sample the Javascript embedded within the HTA file creates the macro commands.

     

    Note that the Multiple Field Input Form macro was originally written for Macro Express 3. The Variable Set String commands have a different syntax in Macro Express Pro but Macro Express Pro can read and convert the Macro Express 3 syntax.

  9. Use delays. You need to give the program a chance to finish some of the tasks.

    Window Activate: Document - WordPad
    Wait for Window Title: Document - WordPad
    Text Type (Simulate Keystrokes): <CONTROL>a
    Delay 0.1 seconds
    Text Type (Simulate Keystrokes): <DELETE>
    Delay 0.1 seconds
    Mouse Left Click
    Clipboard Paste

    You either need to pay attention to well placed delays (example above) or slow down all keystrokes (example below). Programs (Wordpad) can accept straight typing ('abc123') very quickly. But some activities take longer such as Ctrl-a to highlight everything. To a human these things seem like they occur instantly but it may be hundreds or even thousands of times slower to process Ctrl-a compared to typing a keystroke.

     

    Window Activate: Document - WordPad
    Wait for Window Title: Document - WordPad
    Keystroke Speed: 100 milliseconds
    Text Type (Simulate Keystrokes): <CONTROL>a<DELETE>
    Mouse Left Click
    Clipboard Paste

    You will need to adjust the Keystroke Speed according to your computer and applications.

     

    Another option is to slow down all keystrokes by changing the 'Delay after keystrokes in the Text Type command' preference found in Options, Preferences, Playback. By default this is set to 300 microseconds. (Note that 300 microseconds is equivalent to 0.3 milliseconds, the unit of speed in the Keystroke Speed command).

     

    To determine the optimum values for the Delays, Keystroke Speed or Delay after keystrokes requires some experimentation. Set the value(s) high, test the macro(s) and then lower the values.

  10. I am trying to see if there is a known issue with Macro Express 3.5.5.2 on a Windows 7 SP1 machine.

    Yes, there are many known issues. Macro Express v 3.5.5.2 is not certified to work on Windows 7 (SP1 or otherwise) or even Windows Vista.

     

    If you need to continue to use Macro Express 3 during the transition to Macro Express Pro you should use the latest version, Macro Express v 3.8.0.1.

     

    we have plans to move to Macro Express 4.1.6.1 in the future.

    Please consider moving to the latest version of Macro Express Pro. There have been 71 changes to Macro Express Pro since v 4.1.6.1 was released. And we are working on a new version to be released soon that will include many more changes. Many of these changes affect stability.

  11. Wouldn't writing a file for every single record slow things down? If each record I copy gets written into a file I would think that would take a while.

    I am not suggesting that you do this for your production macro.

     

    Do not be afraid to write macros to explore and test your environment. If you write a macro that gets the information from the phone directory and writes it to a file you will be able to determine whether the confusion is because UltraEdit is converting LF's to CRLF's. Once you have that knowledge you should be able to discover why your macro is not working as expected.

  12. You may have a solution but a puzzle remains. (And your solution will not be optimum speed). It sounds like UltraEdit may be converting LFs to CRLFs or CRs to CRLFs. To make sure you could use a quick macro to write the data from the clipboard directly to a file. But, to examine its content you would want to use a Hex Editor and not UltraEdit (since UltraEdit may be altering the data).

     

    Try this macro:

    Variable Set String %Contents% from the clipboard contents
    Variable Modify String: Save %Content% to "d:\test.txt"

    Adjust the file path as needed.

     

    Copy the data from the phone directory program to the clipboard. Run the macro. Use a hex editor (Google is your friend) to examine the content. Look for the CR (0D) and/or LF (0A) characters.

     

    Isn't puzzle solving fun? You learn so much.

  13. I tested it with a sample set of data and it worked. Try breaking up you macro into small tasks (you can copy your macro and edit it) and test each one.

     

    I wrote a macro to load from the clipboard, split the text and display the result. To test, I copied something to the clipboard and ran the macro.

  14. 2nd line: Split the "Content" at the "Return" or "End of Line" into separate Variables called "Lines" starting with line 1.

    Each line goes into an element of the array variable named 'Lines'. Lines is a single variable. An array variable.

     

    A more accurate way to say it is:

     

    2nd line: Split the "Content" at the "Return" or "End of Line" into separate elements of the variable called "Lines" starting with line 1.
  15. It just dawned on me that you must have been thinking I had only one line of text.

    Nope.

     

    It would be nice if we had a feature that would allow us to get items from clipboard by "Line Number". Here's hoping.

    No. There is no need to parse the clipboard. You can easily copy everything from the clipboard into a variable and parse the variable. Doing it this way is faster and it is already in place.

  16. Different computers indicate the end of a line differently. To understand this a bit of history is in order.

     

    Imagine the first printers. The first printers were similar to a typewriter, not like the ink jets and lasers of today. On a typewriter there is a key to move the paper up one line. There is also a key to move to the left of the paper. Eventually there was a lever to both move to the left side of the paper and move the paper up one line.

     

    When the first printers (teletypes, actually) were created they were designed to support 'Carriage Return' (move to the left side) and 'Line Feed' (move up one line). This carried over to computers. CR means Carriage Return. LF means Line Feed.

     

    On Windows based computers the end of a line is indicated by CRLF ... both a CR and a LF. On Unix and Linux computers the end of a line may be indicated by a LF by itself. And on other computers the CR may be interpreted as an end of line.

     

    In the macro example I gave you I wrote that you should split on %CR%%LF% ... CRLF. If you split on CR you may have a line that contains

    'This is the first line'

    '<LF>This is the second line'

    '<LF>This is the third line'

     

    If you split on LF you would have something like this:

    'This is the first line<CR>'

    'This is the second line<CR>'

    'This is the third line<CR>'

     

    If you split on CRLF you get the proper result:

    'This is the first line'

    'This is the second line'

    'This is the third line'

     

    You cannot see the CR or LF characters, but they are there. And improperly handling of the CRLF will cause difficulties.

  17. Here is another technique:

     
    Variable Set String %Content% from the clipboard contents
    Variable Modify String: Save %Content% to "d:\Contents.txt"
    Text File Begin Process: d:\Contents.txt
    
    // Here:
     The first time through the loop %OneLine% contains the first line.
     The second time through the loop %OneLine% contains the second line.
     etc.
    
    
    Text File End Process
    

×
×
  • Create New...