Jump to content
Macro Express Forums

Samrae

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by Samrae

  1. What version of Windows are you using? If you are using a later version of Windows and Visual Boy Advance is running in either compatibility mode or as administrator then you will need to run Macro Express as administrator.

     

    However, some games detect macro programs and prevent their use. If that is the case you may be out of luck. You could try to restore the hooks (Tools, Restore Keyboard and Mouse Hooks).

  2. You can always use the commands in Word to change colors between text type commands. This macro works for Word 2007.

    // Intialization
    Variable Set String %SampleText1% to "This sample text is in the default color
    "
    Variable Set String %SampleText2% to "This sample text is dark red
    "
    Variable Set String %SampleText3% to "This sample text is black
    "
    Variable Set String %SampleText4% to "This sample text is blue
    "
     
    If Not Window "- Microsoft Word" is focused
      Window Activate: - Microsoft Word
    End If
     
     
    Text Type (Simulate Keystrokes): %SampleText1%
     
    // Change to red
    Text Type (Simulate Keystrokes): <ALTD>h<ALTU> // 'Home' ribbon
    Text Type (Simulate Keystrokes): fc // Bring up font color
    Text Type (Simulate Keystrokes): <SHIFTD><TAB><TAB><TAB><SHIFTU> // Move to standard colors
    Text Type (Simulate Keystrokes): <ARROW RIGHT> // Choose dark red
    Text Type (Simulate Keystrokes): <ENTER>
    Text Type (Simulate Keystrokes): %SampleText2%
     
    // Change to black
    Text Type (Simulate Keystrokes): <ALTD>h<ALTU> // 'Home' ribbon
    Text Type (Simulate Keystrokes): fc // Bring up font color
    Text Type (Simulate Keystrokes): <TAB><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW RIGHT> // Choose black
    Text Type (Simulate Keystrokes): <ENTER>
    Text Type (Simulate Keystrokes): %SampleText3%
     
    // Change to blue
    Text Type (Simulate Keystrokes): <ALTD>h<ALTU> // 'Home' ribbon
    Text Type (Simulate Keystrokes): fc // Bring up font color
    Text Type (Simulate Keystrokes): <SHIFTD><TAB><TAB><TAB><SHIFTU> // Move to standard colors
    Text Type (Simulate Keystrokes): <ARROW LEFT><ARROW LEFT> // Choose blue
    Text Type (Simulate Keystrokes): <ENTER>
    Text Type (Simulate Keystrokes): %SampleText4%
     
    // Back to black
    Text Type (Simulate Keystrokes): <ALTD>h<ALTU> // 'Home' ribbon
    Text Type (Simulate Keystrokes): fc // Bring up font color
    Text Type (Simulate Keystrokes): <TAB><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW RIGHT> // Choose black
    Text Type (Simulate Keystrokes): <ENTER>
    Text Type (Simulate Keystrokes): 
    This concludes this sample macro

    To try it copy and paste this into your macro:

    <COMMENT Value="Intialization"/>
    <VARIABLE SET STRING Option="\x00" Destination="%SampleText1%" Value="This sample text is in the default color\r\n" NoEmbeddedVars="FALSE"/>
    <VARIABLE SET STRING Option="\x00" Destination="%SampleText2%" Value="This sample text is dark red\r\n" NoEmbeddedVars="FALSE"/>
    <VARIABLE SET STRING Option="\x00" Destination="%SampleText3%" Value="This sample text is black\r\n" NoEmbeddedVars="FALSE"/>
    <VARIABLE SET STRING Option="\x00" Destination="%SampleText4%" Value="This sample text is blue\r\n" NoEmbeddedVars="FALSE"/>
    <COMMENT/>
    <IF NOT WINDOW Option="\x00" Title="- Microsoft Word" Partial="TRUE" Wildcards="FALSE"/>
    <WINDOW ACTIVATE Title="- Microsoft Word" Exact_Match="FALSE" Wildcards="FALSE"/>
    <END IF/>
    <COMMENT/>
    <COMMENT/>
    <TEXT TYPE Action="0" Text="%SampleText1%"/>
    <COMMENT/>
    <COMMENT Value="Change to red"/>
    <TEXT TYPE Action="0" Text="<ALTD>h<ALTU>" _COMMENT="'Home' ribbon"/>
    <TEXT TYPE Action="0" Text="fc" _COMMENT="Bring up font color"/>
    <TEXT TYPE Action="0" Text="<SHIFTD><TAB><TAB><TAB><SHIFTU>" _COMMENT="Move to standard colors"/>
    <TEXT TYPE Action="0" Text="<ARROW RIGHT>" _COMMENT="Choose dark red"/>
    <TEXT TYPE Action="0" Text="<ENTER>"/>
    <TEXT TYPE Action="0" Text="%SampleText2%"/>
    <COMMENT/>
    <COMMENT Value="Change to black"/>
    <TEXT TYPE Action="0" Text="<ALTD>h<ALTU>" _COMMENT="'Home' ribbon"/>
    <TEXT TYPE Action="0" Text="fc" _COMMENT="Bring up font color"/>
    <TEXT TYPE Action="0" Text="<TAB><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW RIGHT>" _COMMENT="Choose black"/>
    <TEXT TYPE Action="0" Text="<ENTER>"/>
    <TEXT TYPE Action="0" Text="%SampleText3%"/>
    <COMMENT/>
    <COMMENT Value="Change to blue"/>
    <TEXT TYPE Action="0" Text="<ALTD>h<ALTU>" _COMMENT="'Home' ribbon"/>
    <TEXT TYPE Action="0" Text="fc" _COMMENT="Bring up font color"/>
    <TEXT TYPE Action="0" Text="<SHIFTD><TAB><TAB><TAB><SHIFTU>" _COMMENT="Move to standard colors"/>
    <TEXT TYPE Action="0" Text="<ARROW LEFT><ARROW LEFT>" _COMMENT="Choose blue"/>
    <TEXT TYPE Action="0" Text="<ENTER>"/>
    <TEXT TYPE Action="0" Text="%SampleText4%"/>
    <COMMENT/>
    <COMMENT Value="Back to black"/>
    <TEXT TYPE Action="0" Text="<ALTD>h<ALTU>" _COMMENT="'Home' ribbon"/>
    <TEXT TYPE Action="0" Text="fc" _COMMENT="Bring up font color"/>
    <TEXT TYPE Action="0" Text="<TAB><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW DOWN><ARROW RIGHT>" _COMMENT="Choose black"/>
    <TEXT TYPE Action="0" Text="<ENTER>"/>
    <TEXT TYPE Action="0" Text="\r\nThis concludes this sample macro\r\n"/>
    <COMMENT/>
    
    
  3. If you install Macro Express without the Editor the only way "a tech savvy user can work around" it would be to reinstall Macro Express with the Editor.

     

    To "lock down a full installation" you would assign a password to a macro file that prevents a user editing any of the macros in that macro file. (Look in the help and search for 'password' for more information.)

     

    How I can create and replace the default macex.mex?

     

    All the macros are stored in a file. The default macro file is saved in the user's My Documents folder. To replace this file simply copy your version of macex.mex over the existing macex.mex. (Macro files can have any name and be stored in any location.)

    • Like 1
  4. Yes, you can install just the Macro Express Pro Player so others can run macros you create but not edit or create macros but they need a licensed copy of Macro Express Pro.

     

    You cannot assign an activation to a playable macro (they are meant to be double-clicked). I think you can have them save the .mex file to their desktop and double-click it to run it. But, since they would have a licensed copy of Macro Express Pro anyway, you could just send them a macro file and have them replace the default macex.mex.

  5. So, something like this:

    Variable Set to ASCII Char 13 to %CR%
    Variable Set to ASCII Char 10 to %LF%
    Variable Set String %Clipboard% from the clipboard contents
    Split String "%Clipboard%" on "%CR%%LF%" into %Record%, starting at 1
    // Here:
      %Record[1]% holds the first line, "ID: 0555"
      %Record[2]% holds the second line, "Name: Steve"
      %Record[3]% holds "Job Title: Mop guy"
      etc.
    
    
  6. There are commands that enable and disable a macro. A disabled macro will still run it just won't be activated again. Would it work to have macro A launch, disable itself, launch macro a, and either enable itself before finishing or have a process that later enables macro A? Maybe something like this:

    // This is macro A
    Macro Disable: A
    Variable Set String %T9% from Window Title
    // Do some stuff
    Macro Run: a
    // Do more stuff
    Macro Enable: A
    
  7. Are the OLD and NEW files the same except for the email addresses? Are the records in the same order? Your macro gets the first record from file NEW and compares it with all the records in file OLD. Then it gets the second record from NEW and compares it with all records in OLD. And so on. If each file contains 900 records that would be 810,000 searches.

     

    If the records in OLD and NEW match (same number of records, same order) then you could do something like this:

     

    - Read file OLD into a variable (OldVar)

    - Split OldVar into an array variable (OldArray) at end of line (CRLF)

    - Read file New into a variable (NewVar)

    - Split NewVar into an array variable (NewArray) at end of line (CRLF)

     

    - Set up a repeat loop to process from the beginning to the end of OldArray

    - Parse one record from OldArray[idx] and compare with the record from NewArray[idx] and make your adjustments as needed and write the output to a file.

     

    I will create a more specific example if you can confirm that records in the file OLD align with the records in file NEW.

  8. Using Macro Express Pro:

     

    Repeat with Folder E:\temp
      Variable Modify String: Append %A_File% to text file, "E:\temp\files.txt"
    End Repeat
    
    

    If you only need to do this once you can do this manually:

    Win+R (to bring up the run dialog)

    cmd

     

    In the command prompt type something like this (follow each line with <ENTER>):

    C:

    cd \photos

    dir *.jpg >files.txt

     

    To close command prompt

    exit

  9. To change the read-only attribute on any file right-click on it, click Properties and remove the checkmark in the Read-only box.

     

    If that doesn't work you may be trying to put the file in a folder where you do not have read and write access. A file can be read-only by either the read-only attribute or by being placed in a folder that does not allow read and write access.

  10. Is there a predictable string immediately in front of or behind the number? If so, copy of the original information to a new variable, use the "Variable Set Integer from Position of Text" command to find the needed tag, then use the "Variable Modify String: Copy Part of" command to copy or delete parts of the original source information as needed.

    You can loop through the string one character at a time and copy out only the numbers.

     

    Here are other forum discussion topics asking similar things:

     

    ME to copy different amount of numbers

    Checking for letters, numbers in string-variables

    Parsing this

  11. The "Repeat Start" command has an option to put the counter in an integer variable. You could then copy the integer variable to a text variable using the "Variable Modify Integer: Convert %N1% to text string %T1%" command.

  12. You might want to consider upgrading to the latest version. There have been a bunch of things fixed since v 3.7.4.1.

     

    Another suggestion is to use something like "- SketchUp" in the window title. Some programs have invisible windows with the same or similar name as the visible one. The activate commands can be sent to the hidden window instead of the visible one.

×
×
  • Create New...