Jump to content
Macro Express Forums

kevin

Admin
  • Posts

    1,950
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by kevin

  1. If you can determine when you need to stop, you can use a Break command to stop the repeat. Something like this: Repeat Start (Repeat 10 times) // Do your stuff here If Variable %N1% = 0 Break End If Repeat End You should also be able to use the Repeat Until command doing something like this: Variable Set String %T1% "" Repeat Until %T1% = "DONE" // Do your stuff here If Variable %N1% = 0 Variable Set String %T1% "DONE" End If Repeat End Both of these examples depend on you adding code to set N1 to 0 when you want the repeat loop to end. You could use other integer or string variables as well. Just detect the case where there are no more newsfeeds and set a variable. Then check the value of that variable similar to what is shown above.
  2. Could it be a timing issue? Just to make sure you might want to try this: Text Type: <CTRLD><SHIFTD>`<CTRLU><SHIFTU> Delay 1 Second Text Type: some simple text Delay 1 Second Text Type: <ENTER> Delay 1 Second What is the application you are using that requires Ctrl-Shift-` ?
  3. Have you tried this: Text Type: <CTRLD><SHIFTD>`<CTRLU><SHIFTU> Text Type: some simple text Text Type: <ENTER> It is possible that the Enter key function is not working because the Control or Shift keys are still down. However, that does not explain why the simple text comes out okay. What keyboard layout do you have defined for Windows? Some Windows keyboards perform a 'deadkey' action where you type a character (such as `) and nothing happens until the next key is pressed. If the next key is one that can be combined with the ` into an accented character, then it is. For example, if you type ` followed by e you would see è. If you have this 'deadkey' feature turned on in Windows it may be affecting your macro.
  4. The attached sample macro will generate a selected number of random numbers and ensure that each of them is unique. This is not exactly what you are asking for but you should be able to modify the macro to fit your needs or, at a minimum, it should give you some ideas about how to accomplish what you want. You may be able to simply modify it to generate 10 unique random numbers and have it do what you want. GenerateUniqueRandomNumbers.mxe
  5. I cannot think of a way to do this with Macro Express 3. However, this will be possible using features we are planning to add to a future version of Macro Express.
  6. Something like this might get you started. This requires IE. Repeat Start (Repeat 100 times) Web Site: http://www.macros.com [Internet Explorer - Wait to load] Web Site: http://www.wintools.com [Internet Explorer - Wait to load] Web Site: http://www.macros.com/support.htm [Internet Explorer - Wait to load] Repeat End
  7. The screenshot you provided indicates that you are running the macro file samples.mex. This file is installed in the same folder where the Macro Express program files are installed. You may want to consider creating a new macro file and moving all of the macros you have created into it. If you continue to use samples.mex then your macros will be overwritten the next time you install (or reinstall) Macro Express. Macro Express allows you to have as many macro files as you wish. Each macro file can contain a virtually unlimited number of macros. However, Macro Express 3 will only allow one macro file to be opened at one time.
  8. You might want to try something like: If Not Window Title "c:\Program Files\Macro Express3" running Open Folder in Explorer: c:\Program Files\Macro Express3 Else If Not Program Name "c:\Program Files\Macro Express3" on top Activate Window: "c:\Program Files\Macro Express3" End If End If If I remember correctly, what is displayed in the titlebar of Windows Explorer varies somewhat between the different versions of Windows. And there is an option within Explorer that may affect this. I have the option 'Display the Full Path in the Titlebar' enabled.
  9. For those who may be reading this, Jeffery and I worked on this directly. This is a report on the results: No. There are no size limits. Macro Express is crashing because of a problem with the format of the input data. The ASCII File Begin Process command does not allow embedded Carriage Returns (new lines) within a field. Each record needs to take up one and only one line.
  10. I downloaded your macro and did not see this problem. You could surround your macro with another repeat: Repeat Start (Repeat 999 times) Repeat Start (Repeat 999 times) If Not Window Title "notepad" running // DO 'SKIP' STUFF HERE Else // DO YOUR MACRO STUFF HERE End If If Variable %T1% contains "something" Macro Stop End If Repeat End Repeat End
  11. Break will stop the Repeat loop. Macro Stop will stop the macro. If there are no other commands in your macro then stopping the Repeat loop will stop your macro. If you want to skip an iteration of the Repeat loop and go on to the next step then you can use If statements. Something like this: Repeat Start (Repeat 999 times) If Not Window Title "notepad" running // DO 'SKIP' STUFF HERE Else // DO YOUR MACRO STUFF HERE End If Repeat End You can add logic to stop the macro by doing something like this: Repeat Start (Repeat 999 times) If Not Window Title "notepad" running // DO 'SKIP' STUFF HERE Else // DO YOUR MACRO STUFF HERE End If If Variable %T1% contains "something" Macro Stop End If Repeat End
  12. You can have a scheduled macro will play over and over by making sure the Indefinitely box is checked. Macro Express 3 will only run one macro at a time. If another macro is running when a Scheduled macro is supposed to activate, then it will be queued up for later. You can run a Scheduled macro via a shortkey by having multiple macro activations. You can start the timer for a Scheduled macro by creating it and then leaving it disabled in your macro file. Then create another macro that uses the Macro Enable to enable your Scheduled macro. At some point you will want to use the Macro Disable command to disable the Scheduled macro or it will run automatically the next time you start Macro Express.
  13. You could try to create a scheduled macro that activates every 10 minutes. To increase the accuracy you may want to change the Timer Interval from every 10 seconds to every 1 seconds. Click Options, Preferences, Scheduler and set the value under Timer Interval. Doing this, however, uses more CPU cycles. This technique will be more accurate than a simple delay. However, it is not 100% accurate.
  14. Macro Express has an extensive list of Variable commands. You can use the Variable Set String and Variable Modify String commands to do this. However, I would take a different approach. Before you 'read' the values into the variables, make sure you clear the variables T3 and T4 Variable Set String %T4% "" Variable Set String %T3% "" Then you can do something like this: If Variable %T4% = "" Text Type: <TAB>%T3% Else Text Type: %T3%<TAB>%T4% End If
  15. I can certainly understand having difficulty reading the help documentation. Often you need to know what term to search for before you can find a description in the help. Knowing the correct term to search for can sometimes be difficult. However, within Macro Express, you can always highlight a macro command, either in the 'Commands' pane or within the Macro Script pane, and press F1. This brings up the help topic for the highlighted command. (This even works for the Break command.) We at Insight Software Solutions appreciate hearing about ways we can improve Macro Express, including the help documentation. I notice that you refer to 'repeat stop' in your sample macro. Macro Express 3.x does not have a 'Repeat Stop' command. 'Repeat stop' could refer to the Repeat End, Repeat Exit or Break commands. When asking questions it is helpful to be precise, especially when referring to macro commands. There are 7 macro commands that start a repeat loop. For each command that starts a repeat loop there can be only be one Repeat End command. Thus, this does not work: In fact, if you try this then Macro Express will display a syntax error. This macro snippet seems to be what you want: You could also use the Repeat Exit command: I have requested that the Repeat command help topic be reviewed to see what changes can be made to make it clearer.
  16. The categories do not show up in the grid or within the macro's properties. Showing the Category in the grid has been requested several times and is under consideration for a future release of Macro Express. I have entered your request into our Feature Request tracking system.
  17. The usual cause of these kinds of problems is timing. That is, each computer needs different delay times to run reliably. You can adjust the delay between keystrokes for each computer independent of your macros by selecting the Use Text Type delay and adjusting the microseconds value. This setting is found in Options, Preferences, Delays. Set this value higher on slower machines and lower on faster machines. You may find it necessary to add delays in critical parts of the macro. Often you can use the same delay value for all computers. Another thing that could cause differences is if you are using Window Controls. Each Window Control is defined by the application that you are automating. Different versions of Windows may cause the Window Controls to be different. Likewise, different versions of your application will cause each Window Control to differ. Word 2002, Word 2003, and Word 2003 with a different service pack may all have different definintions for a specific Window Control. To adjust for this, you might need to convert your Get Control commands to Capture Control commands. Another technique I have used is to create the macro on one machine and do a Get Control. Then copy the macro to another machine and do another Get Control. Keep both Get Control macro commands in the macro and separate them with an If statement. The Variable Set from Misc command will get the name of the computer that is running the macro so you can create computer specific if statements. You might also want to explore the Wait commands. For example, after a Text Type command you could use a Wait Text Playback.
  18. Your description sounds very close. However, you will not be able to use Ctrl-v to post the data because the clipboard no longer contains what you need. Just 'Text Type' the variables containing the data. Here it is in macro commands:
  19. Try copying each part into the clipboard and then putting that value into a variable. Put the next value into another variable. Repeat as needed. Then, switch to the other application and type the content of each variable.
  20. When a macro is running, Macro Express sends keystrokes and mouse events to Windows and Windows sends them to the application that has focus. When you minimize a remote session or if you disconnect it, Windows stops sending the keystrokes and mouse events to the application. The macro continues to run but Windows discards the keystrokes and mouse events. No. It doesn't matter how the macro is created. There is a work-around. If you can use Window Controls to send text and mouse clicks, the macro will continue to run when the Remote Desktop Connection is minimized or even disconnected. I created a macro that demonstrates how this works. It requires a Remote Desktop Connection and uses Notepad. You can download the macro here: SampleRDC.mex
  21. Have you looked at SpeakIt for Macro Express? The information is found here: http://www.macros.com/speakit.htm
  22. When sending text to a Window Control the special keys like <PAGE UP>, <PAGE DOWN>, <SHIFTD> and <SHIFTU> cannot be sent. However, there is a way to scroll down and scroll up in IE. Typing a space will scroll down. Typing a shift-space will scroll up. I assume this will only work if the cursor is not in a field on the web page. These examples work: To scroll down: Text Type: // this contains a space and ‘Send Text to Control’ is enabled To scroll up: Text Type: <SHIFTD> // the ‘Type Text Normally’ (not ‘Send Text to Control’) is selected Text Type: // this contains a space and ‘Send Text to Control’ is selected Text Type: <SHIFTU> // the ‘Type Text Normally’ (not ‘Send Text to Control’) is selected The reason Joe's example did not work for you is because you did not send <PAGE DOWN> as specified. You sent <HOME> and <END>. It turns out that the space in <PAGE DOWN> is what caused IE to scroll. There may be a key sequences that perform the same functions as <HOME> and <END> in IE but I did not find them by typing other keystrokes into IE.
  23. To send the text to a Control choose the 'Send Text to Control' option in the Text Type command dialog.
  24. Yo might want to try something like this. It checks to see if the process is still running and, if it is, continues to wait. Note, however, that if more than one xcopy.exe is running, this will wait until both of them are finished. Repeat with Processes: Place process in %T1% If Variable %T1% contains "xcopy.exe" Delay 10 Seconds Else Break End If Repeat End Disclaimers: This is untested. If Windows does not add xcopy.exe to the list of running processes then this macro will not work. But, even if it doesn't work, it might give you some ideas about how to do what you need.
×
×
  • Create New...