Jump to content
Macro Express Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by kevin

  1. Have you tried the Clipboard Helper macro found on the Shared Macros page?
  2. 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.
  3. Umm, the ability to edit the HTA script with syntax highlighting?
  4. 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.
  5. 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.
  6. 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.
  7. Use this to remove 'Phone: ' Variable Modify String: Replace "Phone: " in %line[1]% with ""
  8. Yes, there are many known issues. Macro Express v 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 Please consider moving to the latest version of Macro Express Pro. There have been 71 changes to Macro Express Pro since v 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.
  9. You have to copy the entire line into a variable. Then copy only the phone number to %Phone%.
  10. 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.
  11. 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.
  12. Please send support issues directly to Insight Software Solutions.
  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. OD is the hexadecimal value of the number 13 and represents CR. You guessed it, 0A is the hexadecimal value for 10 and represents LF. Your lines are terminated with CRLF.
  15. You need to closely examine your data source to see if it uses CR, LF or CRLF to indicate the end of a line. The way I do this is to save it to a file and examine it with a Hex editor. There are free ones out there.
  16. 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:
  17. Nope. 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.
  18. 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.
  19. 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
  20. Simple: Variable Set to ASCII Char 13 to %CR% Variable Set to ASCII Char 10 to %LF% Variable Set String %Content% from the clipboard contents Split String "%Content%" on "%CR%%LF%" into %Lines%, starting at 1 // Here: %Lines[1]% contains line 1 %Lines[2]% contains line 2 etc.
  21. Once you have the information in the clipboard you can get it into a variable in a macro. Once in a variable, you can manipulate it using the various macro commands. Then you can type either it into Excel or save it in a file to be imported into Excel later. This would save a significant amount of time. Pasting the information into Ultra Edit and then copying it again takes more time.
  22. Where does the information exist before you paste it into UltraEdit?
  23. You are posting in the Macro Express Pro forum. Macro Express Pro can run more than one macro at a time. Are you using Macro Express 3?
  24. I would expect both macros to run unless you do something special to prevent it.
  25. The Scope setting of a macro affects the activation of that macro, not what happens once it is running. If a program comes up and a window specific macro starts, that macro will run to the end. You may have to deal with timing issues when the second window comes up. For example, use the Wait for Window command to make sure the other window is all the way loaded. Also, sometimes Windows loads another program window but does not give it focus. When this occurs you need to add special commands to your macro. I use the Window Activate command in those situations.
  • Create New...