Jump to content
Macro Express Forums

stan

Members
  • Posts

    278
  • Joined

  • Last visited

Everything posted by stan

  1. Here is my guess as to what is happening. When you copy a cell to the clipboard, Excel adds hidden extra characters to the clipboard. After you save the clipboard to a variable, use the Variable Modify String command - Trim option. This removes the extra characters so that only the visible characters remain in the variable.
  2. Currently there is not a way to instruct a macro to return to a specific line and start again from that location. In your case, the only thing I can suggest is to insert an If statement within the ASCII process loop that somehow determines if the page has quit responding. If it has, then close IE, restart it, and then place all of the necessary commands from the ASCII process loop after the If statement. Close with an End If. So, if the page times out, the macro goes to the If statement and runs all of the commands before the End If. If it doesn't time out, then the If section of the macro is skipped.
  3. Hi Jon, Use the Repeat with Windows command. This looks at each window running on the computer and saves the window title to a variable such as T1. After the repeat, insert an If Variable command, If Variable T1 contains Windows Media Player. This section of the macro would look something like this: Repeat with Windows: Place title in %T1% If Variable %T1% contains "Windows Media Player" Repeat Exit End If Repeat End This will break out of the loop when it finds Windows Media Player and will save the title to T1, which can then be used later in the macro.
  4. It's possible that the windows are child windows and are not recognized by Macro Express. You can try inserting a Variable Set String command - Set Value to Topmost Window Title. Then insert a Text Box Display command to display the contents of the variable. See which window title is being displayed. If a parent window title is displayed, then I would suggest using the Window Controls. Then use the If Control command for your logic statement.
  5. I just tried exporting several macros and the floating menu. I saved the new .mex file to another location on the computer. Each macro had an icon assigned. I opened the new macro file and the menu was intact, including the icons. Are these the steps you followed, or did you do something else? Are you running the latest build of Macro Express? If not, what version are you running?
  6. Here's a copy of an article in the Knowledgebase that explains how to do this. 27. How can I determine the state of a checkbox or radio button? Macro Express does not have a macro command that allows you to determine the state of a checkbox or radio button, but there are ways to do this using existing macro commands. This technique will work to determine the state of a checkbox or a radio button. To simplify, this description will only refer to a checkbox. Several steps may be needed. First, get the position of the checkbox, second, use the Get Pixel Color command to determine whether the checkbox is checked and third, use an If Variable command to take specific action if the checkbox is checked or unchecked. There are several ways to determine the position of the checkbox: 1. If the checkbox is in a fixed position on a dialog window, you can use the Mouse Locator when writing your macro to get the position of the checkbox and use those coordinates directly in your macro. 2. If the checkbox is not in a fixed position but it is a Windows Control, you can use the Window Control commands to get the position. Use the Get Control command to set a control variable and then use the 'Variable Set Integer from Control Left' and 'Variable Set Integer from Control Top' to get the screen position coordinates. (There is a tutorial in the Macro Express help that describes how to use the Window Control commands.) 3. If the checkbox is not in a fixed position and it is not a Windows Control, you probably will need to move the mouse to the checkbox and then use the Get Mouse Position command. To move the mouse to the checkbox, you may need to send keystrokes. For example, you might be able to use an Alt shortcut or you may need to send a series of <TAB>s. Once you know the position of the checkbox, use the Get Pixel Color command to determine if the checkbox is checked. The Get Pixel Color command will set an integer variable (%N1%, for example) to the value of the pixel on the screen. Black has a pixel color value of 0. You may need to adjust the position coordinates to make sure you are looking at a part of the checkbox that turns black when checked. Then, using the 'If Variable' command, you can have your macro take a specific action such as clicking on the checkbox to uncheck it. Example Macro: Get Control %C1% Variable Set Integer %N2% from Control %C1% Left Variable Set Integer %N3% from Control %C1% Top Variable Modify Integer: %N2% = %N2% + 4 Variable Modify Integer: %N3% = %N3% + 6 Get Pixel: Screen Coords: %N2%,%N3% into %N1% If Variable %N1% = 0 // The box is checked Else // The box is unchecked End If
  7. Unfortunately I don't think there is a way to write directly to these files.
  8. One option is to create your text type macros using the Direct Editor. Instead of opening the Script Editor, open the Direct Editor, type your text into the Text area and save. We're looking at options for the Remarks.
  9. Here's what I would suggest. Set up a repeat loop to repeat up to 99999 times. When you want to stop the macro, press the macro abort hot key. The default selection is Scroll Lock + Pause. But you can change this by clicking on Options | Preferences | Playback and change the hot key. Repeat Start (Repeat 99999 times) Text Type: <F1> Repeat End
  10. Pat, I'm not sure exactly what you are trying to accomplish, but here is my thought. If you are pasting information into Excel, the information must already be saved to the clipboard. The clipboard commands includes an option to save the clipboard to a .txt file. Would this do what you need? You can use the Terminate Process command to close Excel. The Rename File command can rename the file. The file does not need to be open to use the Rename File function.
  11. Occasionally other programs in your startup group may interfere with the startup of Macro Express. This causes the icon to not get placed in the system tray, though the program is still running. To work around this, open the Preferences window and select Startup. Run on Windows Startup should already be selected. Choose the Wait for ___ Seconds option and enter a value such as 7 or 8. This instructs Macro Express to wait a few seconds before attempting to place the icon in the tray - waiting for the interference to pass. You may want to experiment with the amount of the delay.
  12. It looks like you should be able to do this in 5 steps. Text File Begin Process: "sample.txt" Variable Set Integer %N1% from Position of Text in Variable %T1% Variable Modify String: Delete Part of %T1% Variable Modify String: Append %T1% to Text File Text File End Process Step 1 reads the first line of your text file and saves to T1. Step 2 finds the position of the : character in the text string and saves it to N1 Step 3 deletes part of the text string - start at position one and delete N1 number of characters Step 4 saves the new smaller string to a new text file. Select the Add Trailing CR/LF option. Step 5 closes the loop and repeats the process for the next line in the text file.
  13. Do you have the macros all linked together, one calling another, calling another - in some type of chain? In this type of situation, the macros do not close and you could be running out of system resources. If not, how do you run the macros? Are they all scheduled? Can you tell at what point or which macro causes the IE problem?
  14. Unfortunately I'm not aware of a way for Macro Express to create a system tray icon. It can move the mouse to a specific icon in the system tray, right click on it and close it. But I don't see a way to create the icon.
  15. Some applications will deliberately block the Windows keyboard or mouse hooks. We have seen some applications block the recording of the mouse, but if you write the macro with mouse commands, it will play back correctly. Others will block recording keystrokes, but allow playback. Some will block everything. It sounds like this is what you are running into. Many games will block the hooks and not allow macros. This is where we see the most problems. The macro scope of Program specific or Window specific, means that if you press the hot key while that window or program does not have focus, the macro will not start. But once the macro has started, it can play back in any application or window. It is not restricted to that specific program or window.
  16. The other part to this is to save the Excel file to a .csv file. Use the ASCII Begin File Process command to read each line of the file - each IP address. It will read the first address and save it to a variable such as T1. Enter %T1% as the address to Ping in the Ping Site command and save the results to variable T2. Do your IF statements to find the results and post to another file. Close the loop with an ASCII File End Process command. The loop then starts over again with line two, or your second IP address and does the comparison, etc. It will do this for all 200 addresses in the file. Look at the ASCII Begin File Process topic in the help as well.
  17. If the floating menu is never closed during the day, then it will still be open when you restart Macro Express or the computer. If the menu is closed during the day, which disables the macro, then here is what I would suggest. Create a one line scheduled macro that runs on startup. Use the Macro Enable command to enable the floating menu. When Macro Express starts on Windows startup, the menu is enabled and displayed.
  18. No, unfortunately there isn't any provision for the use of wild cards in the Modify String Variable command. Here's how you can do what you want with two lines. This will work if you always have a 4 digit year. Variable Set Integer %N1% from Position of Text in Variable %T1% - set the Search Text to the / character Variable Modify String: Delete Part of %T1% - start the delete from position N1 and delete 5 characters
  19. Can you tab to the image and have the macro press Enter?
  20. Here is what I would suggest. From the Macro Express - Explorer window click on File | Export | Output Macro Information. Save all of your macro details (you can choose which information to save) to a .txt file. Open the .txt file in Notepad, Word or similar and do your searches.
  21. You may be able to use the Run Macro in Variable command. Save the macro commands to a variable such as T1. Then use the Run Macro in Variable command to run what is stored in T1.
  22. Here is one way to do this. If the clipboard is empty set variable N1 to 1. When N1 changes to 1, the macro exits the Repeat loop. Variable Set Integer %N1% to 0 Repeat Until %N1% = 1 // Enter Code Here If Clipboard Text Equals "" Variable Set Integer %N1% to 1 End If Repeat End
  23. Here's what I would suggest. At the beginning of your macro insert the Variable Set Integer command and set N1 to 1. Process Text File 1 as you normally would. In the Text File Begin Process edit window for the second file, Start Processing on record N1. Only Process Partial Records - enter 1 as the number of records to process. Before the End Process command insert a Variable Modify Integer command and choose the Increment option. This is what the above will do. The first line of File one is saved to T1. The first line of File 2 is saved to T2 because we instructed this command to start processing on line N1 - which is 1. It is only processing the one line. When it is finished, it bumps the value of N1 to 2. So the next time through the cycle, line 2 of both text files are processed and so on.
  24. Hi, I would just use a couple of If Variable statements. Check the coordinate and see if it matches one of the two If statements. If it does, the macro completes the steps you defined for the red or blue match. Otherwise it ignores the steps. If Variable %N1% = 11111 Do the steps for red End If If Variable %N1% = 22222 Do the steps for blue End If
  25. Hi, Use the Abort Macro Hot Key to stop a macro that is running. The default key is Scroll Lock + Pause. You can change this by clicking on Options | Preferences | Playback. It's possible that the game is blocking the keyboard hooks. We have seen this with several different games. You can try clicking on Tools | Restore Keyboard Hooks and then running the macro.
×
×
  • Create New...