Jump to content
Macro Express Forums

Samrae

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Samrae

  1. Terry, Variable Modify String: Right Trim won't remove the CRLF. Try Variable Modify String: Strip CR/LF instead.
  2. The playback speed is supposed to be active for a macro thread. A macro is activated, does a bunch of stuff and ends. If the "bunch of stuff" includes a Macro Run command, it is still part of that macro thread. I use macros that profile the workstation to determine its screen resolution and how fast or slow it is. It then adjusts things like X, Y coordinates and playback speed accordingly. This profiling is done in a separate macro called by the Macro Run command. This technique will only work if the playback speed is set for an entire macro thread. I say it is not a bug. It is an important feature.
  3. If you know the location of the file you can do this: Variable Set From Misc: "Path to My Documents" into %MyDocuments% // Get the path to the Documents folder Variable Set String set %FileContents% to the contents of %MyDocuments%\MyFile.txt // Load the file into a variable Variable Modify String: Save %FileContents% to the clipboard // Copy the variable to the clipboard
  4. Will Copy and Paste command work? Note that you can highlight something, copy it to the clipboard and then save the content of the clipboard in a variable. If you repeat these steps you can save several bits of informatino in variables. Then you can type the information from the variables in the appropriate fields in your destination app. Look at these commands: Clipboard Copy Variable Set String %String1% from the clipboard contents Clipboard Paste
  5. Use "Last name:" in a "Variable Set Integer %Idx% to the position of" to mark the end of the first name. If nothing appears after the last name but spaces you can get all the characters and then use the "Variable Modify String %sTemp%: Trim" command to remove any leading and trailing spaces. Start with the sample provided and try it. See what happens and see where you need to adjust the macro. If you get stuck post your macro for others to help.
  6. If you have the entire page in a variable you can use the "Variable Set Integer to the position of" command to search for something in front of the name and something after the name. Something like this might get you started: Variable Set Integer %Idx% to the position of "First Name:" in %sTemp% // Find "First Name:" in the input string Variable Modify Integer: %Idx% = %Idx% + 10 // Adjust the idx to skip over "First Name:" Variable Modify String: Copy a substring in %sTemp%, starting at %Idx% and 99999 characters long to %FirstName% // Copy from the first name to the end of the string This is not complete. You will have to determine what characters follow the First Name and then do another Variable Modify String: Copy a substring command.
  7. My experience has been that no forms in a browser contain any Window Controls. The only Window Controls you might find are things like the url address or the entire browser window. I just did a quick test and Firefox does not have any Window Controls while Internet Explorer has a few.
  8. The November 12, 2012 issue of the Macro Express News email newsletter talks about this. It says: You can read the entire newsletter issue here.
  9. Try this: Text Box Display: Progress ... // <--- Timed floating box or end of macro Repeat Start (Repeat 200 times) Update Textbox: Progress ... // <--- Option in the Text Box Display command Copy File/Files: "%tFilename%" to "%tPath%%tName%_%nCount%%tExt%" Wait for File to Exist: %tFilename%_%nCount% Delay: 0.1 seconds End Repeat
  10. The number appended to the end of the log file name is the index of the macro that was activated, even for macros called via the Macro Run command. If Macro_A has an index of 45 and Macro_B has an index of 38, when Macro_B is activated by itself the log file is named Macro_B38 but if Macro_A runs Macro_B via a Macro Run command the log file for Macro_B is named Macro_B45.
  11. I have heard or read that the issue is with IE 11. Another fix is to turn off Protected Mode in IE 11.
  12. Open the macro file samples.mex. This macro file is installed when you install Macro Express Pro. It should be located in your "My Documents\Insight Software" folder. Look at the sample macros "Menu and Question" and "Multiple Choice Menu with Default". The first shows how to require a compulsory value. The second demonstrates the various options using Multiple Choice Menus.
  13. Are these files in one or only a few folders? If so, I would use the Repeat with Folder command. Something like this may get you started: // Get Path to My Documents Set Variable %T1% to "Path to My Documents" Change Directory/Folder: "%T1%" // Rename each file in the folder, one at a time Repeat with Folder Variable Set From File Path Rename File or Files: "%T2%" Repeat End Copy this code and paste it into your macro: <REM2:Get Path to My Documents><VSETMISC:T1:Path to My Documents><DOFILE:01:NN:%T1%>><REM2:><REM2:Rename each file in the folder, one at a time><REP3:07:000001:000001:0002:0:01:%T1%><VFFILE:1:T:10:T:11:T:12:T:13:%T2%><DOFILE:06:NN:%T2%>%T12%%T13%><ENDREP>
  14. Have you asked for help from Insight Software's support?
  15. Have you tried Macro Express Pro v 4.5.0.1? According to the Revision History: 40. When exporting to a playable macro characters in the Macro Nickname that are not allowed as part of a filename are removed from the default filename.
  16. It shows v 4.5.0.1 for me. Did you click refresh in your browser?
  17. Click the Macro Recycle Bin button and delete any macros listed there.Check to see if the Ctrl+N macro runs. If not, then you should download the latest version of Macro Express 3 from www.macros.com/download.htm and install it. Some earlier versions of Macro Express 3 would still run macros when they existed in the Macro Recycle Bin. If the Ctrl-N macro still runs after emptying the Macro Recycle Bin then you could identify which macro is still running by systematically disabling groups of macros. Start by creating a new macro file by clicking File, New Macro File. This will disable all of your existing macros. Don't worry, you will be able to get them back. Make sure that Ctrl-N is no longer running a macro. Click File, Reopen to reopen your original macro file. Sometimes macros have multiple activations but only one activation is indicated in the Macro Explorer window. If this is the case you could try disabling the top half of your macros. See if the Ctrl-N macro no longer runs. If it still runs, enable those macros and disable the bottom half of your macros. Once you have identified a set of macros that contain the Ctrl-N macro you can narrow down your search. Disable a smaller and smaller number of macros until you identify the macro.
  18. Disabling a macro prevents it running via activations such as a hotkey, shortkey, window activation, etc. It does not prevent running via a Macro Run command.
  19. A Window Handle should be a numberic value. Are you saying that Macro Express Pro is not displaying the handle (a number) but instead is displaying the title of the window containing the handle?
  20. You can use the Get Pixel Color command. Using some script commands you can write a macro to find a pixel color.
  21. I thought Macro Express Decimal Variables were Floating variables: From the Macro Express Pro help: Compare with the Wikipedia description of Floating Point variables. Macro Express does not, however, support scientific notation like 0.001017654 × 10^5.
  22. Yes, 'Window Activate' takes much longer than 'If Not Program "XYZ.EXE" is focused'. I cannot remember where I read it but it was some time ago. I added it to some of my macros and saw a noticeable improvement in speed.
  23. AtinK: You could use the Windows Task Scheduler to run a macro. When you define a task in the scheduler you can specify that it needs to log in to perform the task. For the process you can either specifiy the Macro Express Player (macexp.exe) or the smaller launcher (meproc.exe) and use a parameter that looks something like "/AYourMacro". Cory: After reading your critique of AtinK's macro I decided to look at it. For anyone else interested, here it is in human readable form: If Program "XYZ" is running Terminate Process: XYZ End If Delay: 5 seconds Launch Program and Activate Window: Program "XYZ.exe", Parameters "", Window "XYZ" If Not Program "XYZ.EXE" is focused Window Activate: XYZ End If Window Activate: XYZ Delay: 3 seconds Text Type (Simulate Keystrokes): username Delay: 2 seconds Text Type (Simulate Keystrokes): <TAB> Delay: 2 seconds Text Type (Simulate Keystrokes): password Delay: 2 seconds Cory, I rarely disagree with your analysis but in this case ... AtinK, The only change I would make is to remove the second "Window Activate" command. That one IS unnecessary. The remainder of the macro I would leave as is until I was certain that it worked. This macro looks just like how I would write it before optimization. Once the macro is working you can either reduce the amount of delay or combine "Text Type" commands. For the record, this: If Not Program "XYZ.EXE" is focused Window Activate: XYZ End If is a published trick to speed up your macro. The "Window Activate" command takes a relatively long time to perform. By checking you can you can avoid the Window Activate command if the window is already focused.
  24. When Macro Express Pro loads up it checks to see if another instance of Macro Express Pro is already running. If it is then the new instance terminates. You cannot run two instances of Macro Express Pro in the same session. Paul, is it possible for a process running in one session to see the process from another session? I thought they were independent of each other. Edit, I see from Cory's response that .NET can see processes from other sessions.
  25. The Terminal Services Session ID command will tell you if you are using the Console or some other session. Could you use that information? Perhaps write it to a file. When a macro starts have it compare the current Session ID with the Session ID in the file. If they match you know that Macro Express forgot to clear the flag the last time it ran. If they do not match you know another session set the flag. Or, you may just decide to run the macros from the console session. I think the console session is always 1. What conflicts? Do you need a unique filename? If you include the Session ID as part of the filename you could ensure that you have a unique file for each session.
×
×
  • Create New...