Jump to content
Macro Express Forums

Samrae

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by Samrae

  1. Maybe this:

    If not control %C1% visible
     Macro Stop
    End if
    

    or this:

    If control %C1% visible
     Mouse double left click on control %C1%
     Delay 3 secs
     Macro Run: macro name
    End if
    

    But, I think if the control never becomes visible that this command:

    Wait for control %C1% to be come visible

    would fail and halt the macro.

     

    Keep in mind that sometimes (often?) controls behave weirdly. You may not be able to see a control but it may be visible to Windows (and consequently to Macro Express). You have to test your application and adjust your macros accordingly.

  2. The Expand the filename option was discussed previously: Expand filename: what does it do? This option changes a relative file path to a fully qualified pathname.

     

    If the current directory is set to "C:\Program Files\Macro Express Pro" and the filepath set to '..\Common Files', Expand the filepath will change it to "C:\Program Files\Common Files". Expanding a path of "\Program Files" will add the drive letter resulting in "C:\Program Files".

     

    There's no mention of this option in the Help for the command.

    I have submitted a bug report to Insight Software so they can update the help.

  3. I really hope that Insight would change their mind and turn their heads back and focusing on helping users (like myself) directly with their problems.

    Have you even tried their support? Just because they do not post here does not mean they are not "focused on helping users directly with their problems." Their support seems very clear to me: Reporting bugs and requesting features.

     

    Insight has been helpful whenever I have asked them for support. You should send them an email or call them.

  4. When trying to slow down as in the example it doesn't work. When writing 4 ( <MACRO PLAYBACK SPEED Speed="4"/> ) it says: Macro Playback Speed: 0,25 times faster than normal in the script.

    The Macro Playback Speed command only changes the delays in your macro. If you have no delays, the speed will not change.

     

    If you have questions about this I recommend you contact Insight's support people. They are very responsive to direct requests.

  5. To be useful to others, an attached file should be an MEX file, not an MXE.

    Why do you say that? An .MXE file can be imported into a macro file just as easily as a .MEX file, can't it?

     

    If we are expressing opinions, I think it makes things easier to include the text of your macro in your post so people can read what it does without having to take extra steps to import the macro first. It is easier and faster to know what is going on by seeing this:

    Window Activate: Microsoft Word

    instead of this:

    <WINDOW ACTIVATE Title="Microsoft Word" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/>

    For those who don't know, 'Copy Command Text' in the context menu copies the script in text.

  6. I have a need to read files where the mex file is located

    Try this:

    Variable Set From Misc:  "Current Macro File" into %MacroFilePath%
    Variable Set From File path
    Text Box Display: Result

    <VARIABLE SET FROM MISC Destination="%MacroFilePath%" Value="Current Macro File"/>
    <VARIABLE SET FROM FILE Filename="%MacroFilePath%" Option="\x01" Drive="%Drive%" Path="%Path%" Expand="FALSE" Flags="\x03"/>
    <TEXT BOX DISPLAY Title="Result" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 %MacroFilePath%\r\n\\par %Drive%%Path%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="866" Height="118" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
    

  7. Yes, this is possible. But it requires a technique that may be more complicated than using .INI files or the registry.

     

    Macro Express has the ability to run a macro that is contained in a text macro file. The text macro file can be modified by Macro Express or by another separate process. To set this up do the following:

    • Create new macro
    • Put Variable Set String %printJob% to "A" in it
    • Click View and Direct Editor
    • Copy the macro command
    • Paste into a text file. I would save it in the same folder where your other macro files are located.

    This gives a sample of the ASCII text syntax for the macro command.

     

    In your macro that contains the Multiple Choice Menu command put in a Load Macro Text File file command using the path to the text file you created above.

     

    Now, as your regular macro runs you can modify the text macro file to set %printJob% to B or some other value as needed.

     

    You can put as much or as little of your macro into the separate text macro file as you wish. This requires a separate text macro file, not much different than having an INI file.

     

    I would just create an .INI file in the Temp folder (use %TEMP% in the path) and save the variables in it. Many programs store stuff in the Temp folder.

  8. ... after each report I need to add another down to select the next date to run. Today (down) 11/3/2011 (down) 11/2/2011 etc.

    Can you type the date instead of pressing arrow down? If so, you could have the macro type 3/4/2010, 3/5/2011, etc. This is likely to be more reliable than 730 arrow down keys. There are commands to get day, month and year and put into integer variables that can by typed.

  9. Why doesn't the macro work with the protected pdf document?

    Some programs disable the keyboard hooks when asking for a password. This keeps key loggers and other bad software from capturing your password. But it also ignores keystrokes from Macro Express.

  10. Perhaps simplest would be to do this:

    // Save position of mouse
    Variable Set Integer %X%: Set to the Mouse X Coordinate
    Variable Set Integer %Y%: Set to the Mouse Y Coordinate
    
    Text Type (Simulate Keystrokes): <ALTD>d<ALTU>
    Delay: 0.1 seconds
    Text Type (Simulate Keystrokes): <CTRLD>c<CTRLU>
    Delay: 0.1 seconds
    Variable Set String %URL% from the clipboard contents
    
    // Restore position of mouse
    Mouse Move: %X%, %Y% Relative to Screen
    Delay: %Delay% seconds
    Mouse Left Click

    This moves the mouse but moves it back.

  11. I have a macro that does this. When it runs it looks in the registry for a name. If it is not found, it asks the user for the name and stores it in the registry. This feature runs at the beginning of a macro that they use anyway. If you save the name in the HKEY_CURRENT_USER area of the registry it will be unique for each user that logs on to a computer.

     

    Another idea would be to get the name of the logged on user from Windows using the Variable Set From Misc/Set Variable %T1% to "Username" command.

  12. I have an older version of ME, your files aren't compatible with mine.

    The macros on the Shared Macros page have versions for both Macro Express 3 and Macro Express Pro.

     

    When you put a value in a variable and then the macro calls another macro, does that variable contain the same value that it had before the first macro called it?

    Variables are global within the scope of a single macro thread. If one macro calls another using the Macro Run command and the called macro alters the variable, that altered value is in the variable in the main macro.

×
×
  • Create New...