Jump to content
Macro Express Forums

Samrae

Members
  • Content Count

    407
  • Joined

  • Last visited

  • Days Won

    20

Posts posted by Samrae

  1. Make sure that File Locking of Macro Files and Automatic Synchronization Update options are enabled. These were off by default in earlier versions of Macro Express.

     

    I hear that some have used Dropbox to share a macro file. I want to try it but haven't yet.

     

    To avoid losing macros you should make sure you have the Automatic backups turned on. Also, more recent versions of Macro Express have improved backup routines.

    • Highlight a macro
    • Right-click
    • Choose Copy Macro
    • In the Categories column, click the little triangle to expand the list of categories for the macro file that you want to copy to
    • Click the mouse down on the copied macro and drag it to either * Unassigned * or a category in the macro file where you want the macro
    • Edit the macro to change the name to remove 'Copy of'

  2. It may be that when two macros have the same activation the macro that runs would be the one that comes first in the macro file. But, I don't think Macro Express tells you the order of the macros in the macro file.

     

    Macro Express Pro gets around this with the 'Global Except' option. This allows you to write a macro that will run all the time except when certain windows are active.

  3. Can I use ME to, for example, copy a variable from my local environment, then paste it into a text box on within the VPN?

    Yes. Macro Express is perfect for copying stuff between two environments.

     

    I also work within two setups, one at home and one at work with monitors of differing resolutions, and I still didn't find out how to select a link in a web page when the page dimensions and the location of the link can be variable.... I'm sure working with web pages is covered somewhere, but I didn't find it yet.

    Here are three suggestions:

     

    1. Use the Variable Set From Misc: "Name of Machine" into %ComputerName% command to get the name of the computer. Adjust your macro based on which computer is running.

     

    2. There are commands to get dimensions of your screen, monitor and desktop:

     

    Variable Set Integer %ScnWidth%: Set to the Screen Width

    Variable Set Integer %MonWidth%: Set to a Monitor's Width (1)

    Variable Set Integer %DesktopWidth%: Set to the Desktop Width

    Variable Set Integer %ScnHeight%: Set to the Screen Height

    Variable Set Integer %MonHeight%: Set to a Monitor's Height (1)

    Variable Set Integer %DesktopHeight%: Set to the Desktop Height

     

    3. Have your macro 'find' something on the web page: Text Type ctrl-f, then tab to the field containing information you need.

  4. Windows allows windows to be hidden or visible. (Check out the Window Hide and Window Show macro commands.) Some applications do not remove windows but hide them. Other times there are both hidden and visible copies of a specific window. Since Macro Express gets the list of windows from Windows itself it can seem to be confused.

     

    You might be able to do something with the Repeat with Windows command. That command can return only visible windows. Maybe something like this:

    Variable Set String %T2% ""
    Repeat with Windows: Place title in %T1%
     If Variable %T1% contains "Information"
       Break
     End If
     Variable Set String %T2% "Found"
    Repeat End
    If Variable %T2% <> "Found"
     Macro Stop
    End If
    

    • Like 1
  5. @Mindy79: This is the Macro Express Pro discussion forum. There is a separate forum area for discussions about Macro Express 3. The example that follows is for Macro Express Pro but the same technique applies to Macro Express 3.

     

    You need to surround the macro commands that you want repeated with an ASCII File Begin Process followed by an ASCII File End Process command. Like this:

    ASCII File Begin Process: "c:\test.csv" (Comma Delimited Text (.csv))
     If Variable %OneRecord[3]% Equals "Utah"
    Activate or Launch: Window "Notepad", Program "Notepad.exe", Parameters ""
     End If
    ASCII File End Process
    

     

    The code within the Begin/End Process command will repeat once for each line in your file. With each loop, the content of the variables will change.

     

    There is an example of how this works in the sample macros file. Look for samples.mex in the folder where the Macro Express or Macro Express Pro program files are installed. Or, you may download it from the Sample Macros page. Make sure to download the appropriate samples.mex file for Macro Express or Macro Express Pro.

  6. Then something like this might work:

    Variable Set Integer %ScnWidth%: Set to the Screen Width
    Variable Set Integer %ScnHeight%: Set to the Screen Height
    Variable Set Integer %CurWinWidth%: Set to the Current Window's Width
    Variable Set Integer %CurWinHeight%: Set to the Current Window's Height
    
    // See if the app is maximized
    If Variable %CurWinWidth% Does not Equal "%ScnWidth%"
     And
    If Variable %CurWinHeight% Does not Equal "%ScnHeight%"
     Text Type (Simulate Keystrokes): <WIND><CTRLD>s<CTRLU><WINU> // Send Win+Ctrl+s in case another application needs it
     Wait for Text Playback
     Macro Stop
    End If
    
    If Not Window "Google Maps -" is focused
     Macro Stop
    End If
    Text Box Display: Google Maps is running
    

    I did not test this. You may have to adjust the comparisons between %ScnWidth% with %CurWinWidth% and %ScnHeight% with %CurWinHeight% to account for borders.

  7. This worked for me:

    1. Launched Firefox and brought up Google Maps.
    2. Created new macro
    3. Gave it HotKey activation of Win+Ctrl+s
    4. Clicked Scope tab
    5. Chose "Window/Program Specific"
    6. Clicked Add Window
    7. Chose "Google Maps - Firefox" from the list displayed
    8. Changed to "Google Maps -"
    9. Entered the following macro:

    If Not Window "Google Maps -" is focused
     Macro Stop
    End If
    Text Box Display: Google Maps is running
    

  8. You can return multiple values from an external script, such as AutoIt, by having the external script save the information in a location where Macro Express Pro can read it. Save information into an text macro, an INI file, a text file or, as Cory suggests, the registry.

     

    The July 7, 2011 issue of the Macro Express News http://www.macros.com/newsletters/MENewsJul2011.htm contains information about the External Script command.

     

    There are sample external scripts in the External Scripts sample macro file: http://www.macros.com/usermacs/umexternalscripts.htm

     

    You can see the technique of saving information into a text macro with the Multiple Inputs sample macro file: http://www.macros.com/usermacs/ummultipleinputs.htm.

  9. I was able to do it this way:

     

    1. Create a new macro containing only a Text Type command using the Paste Rich Text option.

    2. From within the Macro Express Script Editor click View, Direct Editor.

    3. Highlighted and copied the text.

    4. Opened a Text Editor program. (Notepad would work.)

    5. Pasted the text based macro.

    6. Saved the text file.

     

    7. Created another new macro.

    8. Put in an Activate/Launch command to load WordPad. (Because WordPad can display Rich Text.)

    9. Put a Delay command after Activate/Launch.

    10. Put Load Macro Text File command

    11. Saved the macro.

     

    When this macro runs it launches WordPad and Text Types the Rich Text.

     

     

     

    There is a Paste Rich Text option in the Text Type command.

  10. To save the mouse position:

    Variable Set Integer %X%: Set to the Mouse X Coordinate
    Variable Set Integer %Y%: Set to the Mouse Y Coordinate

    To get the color of the pixel under the mouse use:

    Get Pixel Color from Beneath the Mouse into Color

    You can also get the color of a pixel without moving the mouse:

    Get Pixel Color at (125, 257) Relative to Current Window into Color

    To move the mouse back to the original location use:

    Mouse Move: %X%, %Y% Relative to Screen

×
×
  • Create New...