Jump to content
Macro Express Forums

kevin

Admin
  • Posts

    1,950
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by kevin

  1. Have you looked at the Window Control commands? Does that do what you need? Examine the 'Calc ulator and Note pad' sample macro found in samples.mex. This macro file is installed in the same folder as the Macro Express program files (c:\Program Files\Macro Express3). It can also be downloaded from the Sample Macros page.
  2. Thank you for submitting the bug report. The tracking number assigned to this issue is [iSS6850]. We will look into it.
  3. In programming languages a value of NULL or NIL is different than blank or empty. Blank or empty means a defined variable has been assigned and is empty. NULL or NIL means that a defined variable has not been assigned. The Macro Express and Macro Express Pro script language is not meant to be a replacement or substitute for a full programming language. Thus, it does not support NULL variables. It does, of course, support blank or empty variables. In short, this example will work the same way you have always used it: Variable Set String %T1% "" If Variable %T1% = "" Text Box Display: T1 is null End If but technically it is slightly incorrect. In this case T1 is not NULL, it is empty. But the difference does not matter in the macro script. Here are a couple of resources if if you want to learn more: Wikipedia - Null (computer programming) Wikipedia - Multi-valued logic
  4. There is not an 'If Null' in Macro Express or Macro Express Pro. However, you can assign values that you decide mean 'NULL' or unassigned. Like these: Variable Set Integer %N1% to -1 Variable Set String %T1% "NULL" Variable Set String %T1% "**Null**" Variable Set String %T1% "UNASSIGNED" Variable Set Decimal %D1% to -1.01
  5. Check out the ASCII File Begin Process and ASCII File End Process commands. There is an example in the help.
  6. This issue with the tracking number [iSS6793] has already been fixed. The next version of Macro Express Pro will contain the fix. In the meantime, do not disable any macro commands on line 1.
  7. Macro Stop stops a macro. If a called executes Macro Stop both the main and called macro stop. It is not necessary to put a Macro Stop command at the end of the main macro. When the main macro finishes execution it automatically stops. Macro Return stops execution of a called macro. Use Macro Return in the middle of a logic statement to return to the main macro before the end of the called macro. It is not necessary to put a Macro Return at the end of the macro. A Macro Return in the main macro works the same as the Macro Stop command.
  8. Try the Set Variable %T1% to "Name of Machine" found in the Variable Set From Misc command dialog.
  9. The Variable Set String from Prompt command does not have verification built in. You can, however, verify the content by placing the Variable Set String from Prompt command within a repeat loop. Something like this might get you started: Repeat Until %T3% = "DONE" Variable Set String %T1% from Prompt Variable Set Integer %N1% from Length of Variable %T1% If Variable %N1% = 4 Variable Set String %T3% "DONE" End If Repeat End
  10. Start by reading the help. Click Help, Macro Express help. Search for the topic 'Controls'. There are several separate pages. Then look at the 'Calc ulator and Note pad' macro found in samples.mex. The samples.mex macro file is installed in the same folder as the Macro Express program files. By default this would be 'c:\Program Files\Macro Express Pro'. You may also download samples.mex from the Sample Macros web page.
  11. 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 Windows is locked, if you minimize a remote session or if you disconnect a remote session, Windows stops sending the keystrokes and mouse events to the application. The macro continues to run but Windows discards the keystrokes and mouse events. 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 workstation is locked.
  12. I don't have a specific solution either but, have you tried deleting some of the commands prior to the Variable Set String %CurrentCSV_FilePath%: Prompt for a filename command? Specifically, is the Variable Restore: Restore All Variables command causing the problem?
  13. But since these follow a Variable Restore: Restore All Variables maybe he wants to make sure they are reset to 0 after the restore.
  14. Cory, this never fails for me. Please send the crash report and a sample macro.
  15. Here is a shot in the dark. When you delete the empty rows, do you also delete the end of line character? In other words, if you go to the end of the file after deleting where is your cursor? Is it at the end of the last or on the next line down: A line Another line Last line| or A line Another line Last line | (where | represents the location of cursor) If you see the latter, try pressing the Backspace key to create the former to see if it helps. I'm not sure if it will work but that is what I would try.
  16. How would you call the Excel macro manually? Do that in the Macro Express Pro macro.
  17. It sounds like the room is not getting focus. First try putting a small delay at the top of the macro. This gives Windows a little time to switch focus from the popup menu to the 'room' window. If that doesn't work, you may need to put something like this at the top of each macro: If Not Window Title "Room Window" on top Activate Window: "Room Window" End If Substitute the actual window title for 'Room Window'.
  18. Use the If Message command. It allows you to choose the types of buttons to display, which one is the default and a Default Time Out value.
  19. I have found that some programs change the definition of controls either when the program runs again or when windows are closed and reopened. In those cases I have had to switch from using the Get Control command to using the Capture Control command. To use the Capture Control command you need to determine the location of the control in some other way. And yes, sometime that is difficult.
  20. I'm sorry, I do not have time to write a complete macro right now. I can give you some hints, however. You already know how to get the information to the clipboard and from the clipboard to a variable. The examples that follow assume the information from the entire screen is in T1. The next step is to 'parse' information one line at a time. On some computers, each line is terminated with a CR (carriage Return) followed by a LF (line feed). On other systems lines may be terminated by LF alone or (in rare cases) CR alone. It is also possible that information from your screen will not be terminated by CR or LF but, instead, be grouped in lines of 25 (or 132, or whatever) characters. You will need to determine this for your system. The best way to make this determination is to write a macro and observe how it works. The following sample assumes each line is terminated by CRLF. The first step of the parsing process is get CR and LF (CRLF) into a variable. This sample does just that: Variable Set %T13% to ASCII Char of 13 // Set T13 to CR Variable Set %T10% to ASCII Char of 10 // Set T10 to LF Variable Set String %T13% "%T13%%T10%" // Set T13 to CRLF Then use something like this to find the first line: Variable Set Integer %N1% from Position of Text in Variable %T1% // Put %T13% (containing CRLF) into the Search Text field of this command Variable Modify String: Copy Part of %T1% to %T2% // Save the result to N1 At this point T2 will contain the first line. Now, delete the first line from T1: Variable Modify String: Delete Part of %T1% And repeat the steps above. If you want to preserve each line then you will want to place the result in T3 instead of T2. This should get you started. For more information study the variables documentation in the help. Good luck.
  21. Can you copy everything from the clipboard to a variable and then parse through the variable? Then the delay would only be 2 seconds. And then you may be able to reduce the remaining delay down from 2 seconds.
  22. Does the 'Macro Filename (Optional):' contain the correct information? You may leave this blank if the macros are in the same macro file. Also check to make sure there aren't any extra spaces in the name in either the Macro Run command or the macro's name itself.
  23. On Monday, did you reboot your computer? Did the problem survive the reboot? If not, perhaps rebooting would have fixed it. One other thought is that perhaps the Firefox update had a glitch during install. We can count these lessons learned.
  24. In that case you could try highlighting the entire window, copying it to the clipboard, copying from the clipboard to a variable and then parsing the result. The first three steps are pretty easy: Text Type: <ALTD>a<ALTU> // highlight everything in the window Text Type: <CTRLD>c<CTRLU> // copy to the clipboard Variable Set String %T1% from Clipboard // copy from the clipboard to a variable This assumes that your terminal emulation software supports Ctrl-a to highlight everything. If not, you may need to experiment to see what works. Once you know how to do it manually you can implement it in a macro. Parsing gets a little more involved. After running these commands T1 will likely contain a long string with CRLFs separating each line. You can use the various Variable commands to parse through the string to extract information from line 5, column 3. Macro Express Pro makes parsing this kind of information much easier due to the new Split String command.
×
×
  • Create New...