Jump to content
Macro Express Forums

Samrae

Members
  • Content Count

    398
  • Joined

  • Last visited

  • Days Won

    20

Posts posted by Samrae


  1. I recommend you begin by clicking Options, Preferences, Activations and then the ShortKeys tab. Enter something like ".." in the Prefix keys box. Once you do that your shortkey macro will not automatically type out.

     

    If the macro is one you recently changed you can click on the "Modified" header. This will bring the most recently modified macro to the top (or bottom) of the list. If I recall correctly, I usually have to click in the Modified header twice to move the most recently modified macro to the top.

     

    If the issue is with your shortkey activation settings then you may want to try the "Use suffix keys" option. There is extensive documentation on how the shortkey macro activation works here: https://www.macros.com/skplayback.htm

     

     


  2. A copy of the samples.mex file can be found in the folder where the Macro Express program files are installed (C:\Program Files (x86)\Macro Express Pro 6). Use Windows File Explorer to copy this file to another folder then, within Macro Express, click File, Open File to open it.

     

    You should not open the samples.mex file directly in the C:\Program Files (x86)\Macro Express Pro 6 folder.

     

    Or, as acantor said, you can download samples.mex from here: Sample Macros.

     

     


  3. Yes, if you are using the portable version the settings would be in an .INI file and not in the registry.

     

    If the .INI file contains Check Syntax = 1 I would expect the syntax checking to work. To be sure, you could delete the line in the .INI file that contains Check Syntax to tell Macro Express to turn syntax checking back on.

     

    Be sure that Macro Express is not running when you change the .INI file.

     


  4. I duplicated this issue using Macro Express Pro 6. When the Syntax Error box is displayed and you click "Don't show this again", syntax checking is turned off and cannot be easily turned back on.

     

    Syntax checking can be restored if you edit the registry and change

      HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express 4\Editor\Check Syntax

     

    to a value of 1.

     

    I have reported this to Insight Software Solutions. There should be a better way to re-enable syntax checking.


  5. 11 hours ago, iconoglasses said:

    Hi! Thanks, but to the first- there needs to be a TAB between the User Name and Password, that one doesn't have it. A few tests have resulted in part of my password being entered on the User Name line. Spaces are also read as an incorrect password. There must be a TAB use or equivalent.

     

    So, add a tab:

    Text Type (Simulate Keystrokes): your User Name
    Delay: 4 seconds
    Text Type (Simulate Keystrokes):  <KEYD:VK_TAB>
    Delay: 1 seconds
    Text Type (Simulate Keystrokes):  <KEYU:VK_TAB>
    Delay: 4 seconds
    Text Type (Simulate Keystrokes): your Password
    Delay: 4 seconds
     
    Text Type (Simulate Keystrokes):  <KEYD:VK_TAB>
    Delay: .5 seconds
    Text Type (Simulate Keystrokes):  <KEYU:VK_TAB>

     

    Quote

    To the second suggestion, I did the simulate keystrokes and used the key down and up and it did not work. It then proceeded to enter the first 2 characters of my password on the User Name field, before the rest spilled over into the Password area.

     

    Maybe a clue. It is interesting that your password was entered partially into two different fields. Here is another thing to try. Macro Express can "type" much faster than you can. 😃 What I have been trying to suggest is to slow things down. Maybe you also need to slow down the keystrokes between the characters of your name and password.

     

    If I recall correctly, when using a 3270 emulator, each keystroke is accepted by the emulator, sent to the host (IBM mainframe computer) and then sent back to the emulator to be displayed (or something like that).

     

    Try something like this. This will be very slow! It is only a test to see if slowing things down helps the emulator and host recognize the keystrokes. Try it and tell us exactly what you see.

    Keystroke Speed: 500 milliseconds
    Text Type (Simulate Keystrokes): UserName
    Delay: 2 seconds
    Text Type (Simulate Keystrokes): <KEYD:VK_TAB>
    Delay: 1 seconds
    Text Type (Simulate Keystrokes): <KEYU:VK_TAB>
    Delay: 2 seconds
    Text Type (Simulate Keystrokes): Password
    Delay: 2 seconds
    Text Type (Simulate Keystrokes): <KEYD:VK_TAB>
    Delay: 1 seconds
    Text Type (Simulate Keystrokes): <KEYU:VK_TAB>
    Delay: 2 seconds
    Text Type (Simulate Keystrokes): <KEYD:VK_TAB>
    Delay: 1 seconds
    Text Type (Simulate Keystrokes): <KEYU:VK_TAB>

     

     


  6. It has been a while since I used 3270 emulator software. I remember some things being a little tricky to automate because the emulator software handled keystrokes directly instead of via the usual Windows messages and hooks.

     

    What happens if you send keystrokes via "Simulate Keystrokes" instead of via a Window Control? Something like this:

    // Do whatever commands are necessary to launch the Mocha 3270
    // emulator and wait for it to be completely loaded and stable
     
    Text Type (Simulate Keystrokes): your User Name
    Delay: 1 seconds
    Text Type (Simulate Keystrokes): your Password
    Delay: 5 seconds
    Text Type (Simulate Keystrokes): <TAB>
    Delay: 5 seconds
    Text Type (Simulate Keystrokes): <TAB>

    The Delays are extra long just to see if the commands work. If they do you can reduce the delay time.

     

    If that does not work you could try something like this:

    // Do whatever commands are necessary to launch the Mocha 3270
    // emulator and wait for it to be completely loaded and stable
     
    Text Type (Simulate Keystrokes): your User Name
    Delay: 1 seconds
    Text Type (Simulate Keystrokes): your Password
    Delay: 4 seconds
     
    Text Type (Simulate Keystrokes):  <KEYD:VK_TAB>
    Delay: .5 seconds
    Text Type (Simulate Keystrokes):  <KEYU:VK_TAB>

     

    Copy this and paste it into your macro:

    <COMMENT Value="Do whatever commands are necessary to launch the Mocha 3270"/>
    <COMMENT Value="emulator and wait for it to be completely loaded and stable"/>
    <COMMENT/>
    <TEXT TYPE Action="0" Text="your User Name"/>
    <DELAY Flags="\x01" Time="1"/>
    <TEXT TYPE Action="0" Text="your Password"/>
    <DELAY Flags="\x01" Time="4"/>
    <COMMENT/>
    <TEXT TYPE Action="0" Text=" <KEYD:VK_TAB>"/>
    <DELAY Flags="\x01" Time=".5"/>
    <TEXT TYPE Action="0" Text=" <KEYU:VK_TAB>"/>

     


  7. In the Text Type command dialog there is a dropdown with options that determine how the Text Type work. The Action= corresponds to this choice:

     

      Simulate Keystrokes:                  Action="0"

      Use Clipboard and Paste Text:  Action="1"

      Send Text Directly to Control:    Action="2"

      Paste Rich Text:                           Action="3"

     


  8. 2 hours ago, biplab54 said:

    Message should update after completion of every repeat.

    You may find that displaying the message that often slows down your processing. Some of my macros update the counter every 25 iterations while other macros update every 100.

     

    Here is a snippet of one of my macros. It works just as Cory suggested. This sample uses the ASCII File Begin/End Process loop but a Repeat loop will work just as well

    Text Box Display: Progress
    // Process the file
    ASCII File Begin Process: "D:\ZZZZ\csv\zd.csv" (Comma Delimited Text (.csv))
     
    // Display progress counter
      Variable Modify Integer: %N[2]% = %N[1]% / 100
      If Variable %N[2]% Does not Equal "%N[3]%"
        Text Box Update: Progress
        Variable Modify Integer set %N[3]% to the contents of %N[2]%
      End If
    
    ASCII File End Process
    <TEXT BOX DISPLAY Title="Progress" Content="{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\lang1033\\f0\\fs16 \r\n\\par     Processing line number: %N[1]%\r\n\\par }\r\n" Left="Right" Top="Top" Width="327" Height="114" Monitor="0" OnTop="TRUE" Keep_Focus="FALSE" Mode="\x02" Delay="1"/>
    <COMMENT Value="Process the file"/>
    <ASCII FILE BEGIN PROCESS Filename="D:\\ZipCodeDownload\\csv\\zd.csv" Format="CSV" Start_Record="1" Process_All="TRUE" Records="1" Variable="%T%" Start_Index="10"/>
    <COMMENT Value="Display progress counter"/>
    <VARIABLE MODIFY INTEGER Option="\x03" Destination="%N[2]%" Value1="%N[1]%" Value2="100"/>
    <IF VARIABLE Variable="%N[2]%" Condition="\x01" Value="%N[3]%" IgnoreCase="FALSE"/>
    <TEXT BOX UPDATE Header="Progress" Content="{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\lang1033\\f0\\fs16 \r\n\\par     Processing line number: %N[1]%\r\n\\par }\r\n"/>
    <VARIABLE MODIFY INTEGER Option="\x06" Destination="%N[3]%" Variable="%N[2]%"/>
    <END IF/>
    <COMMENT/>
    <ASCII FILE END PROCESS/>

     


  9. I do not know Python but here are some suggestions.

     

    1. To make information available to a separate program you would need to have Macro Express save it somewhere the other program has access to. I can think of two options: You could write to a file or you could write to the registry. There are macro commands to write and read to either place. I would think there are Python commands to read and write to a file or the registry.

     

    2. There are two ways to launch a macro via an external program such as a Python script.

     

    a) Have Python call Macro Express this way:

    C:\Program Files (x86)\Macro Express Pro 6\MeProc.exe /A::Filename?Macroname

    Substitute "Filename" with the name of your macro file and "Macroname" with the name of your macro. See Launching macros from a command line parameter for more information.

     

    b) Call via an API call. There are some examples written in Delphi, C/C++/Visual C Example, and VBA here: API Examples . You would need to use these examples to do the equivalent using Python.


  10. I recently decided to investigate the purpose of the C:\Windows\WinSxS folder. You may discover that it gets huge containing many gigabytes of of files. I thought I could shrink my backups by cleaning up these files (it didn't). From a Google search:

     

    Quote

    Windows uses a system folder called WinSxS to store files that are needed for your Windows installation, as well as backups or updates to those files.

     

    Because of what this folder is used for I would expect Windows to prevent any attempt to run programs from there. Thank you Terry for showing the correct path to SnippingTool.exe.


  11. When you launch Macro Express and then close it the size and position of the Macro Express windows will be remembered. The next time it launches it will come up in that position.

     

    For those macro commands that display something, most allow you to set the position. The Basic pause does not allow you to specify the position but the Complex Pause command will.


  12. Your response tells us that it is possible to run a macro on the remote computer (assuming you ran Notepad on the remote computer). At this point I would not worry about Window Controls (sorry Cory). Maybe later but not right now.

     

    This is how I would approach this. (Do all this on the remote machine.) Put a Macro Stop command in your macro. Start by putting it after the launch of ACT and, perhaps, the first keystrokes. Run it. If something does not work adjust the macro commands until it does. If it does what it is supposed to move the Macro Stop command down in your macro. Run that. Repeat.


  13. When Macro Express runs it can type keystrokes and move or click the mouse much faster than a human can do it manually. Each computer and application responds differently. I would expect that connecting to your neighbor's computer via RDP is much, much slower than running ACT on your laptop.

     

    It is possible that the problem is as Cory describes where keystrokes and mouse movements are not occurring because of the RDP connection and the application having focus. However, it could also be that the macro is just running too fast.

     

    Here are some suggestions.

     

    1. Try having the macro type ridiculously slowly. This lets you watch each step as it occurs. I suggest Keystroke Speed: 500 milliseconds. My previous recommendation of Keystroke Speed: 1000 milliseconds is too slow.

     

    Watch the macro run. Make a note about what works and what does not. If even one keystroke works then you should be able to get the macro to work.

     

    2. Try launching Notepad (notepad.exe) and typing something into it. That will help us determine if the issue is with RDP, keystrokes, or ACT. Here is a sample you can just copy (from the second box) and paste into a new macro.

      Program Launch: "Notepad.exe" (Normal)
    Parameters: 
       
      Delay: 0.3 seconds // Wait for Notepad to come up and get focus
      Text Type (Simulate Keystrokes): This is a test: %Count%
       
      Keystroke Speed: 500 milliseconds
      Text Type (Simulate Keystrokes): <ENTER><ENTER>The macro should be typing very slowly now.
    1
    2
    3
    
    DONE
    
      Keystroke Speed: 0 milliseconds
    <PROGRAM LAUNCH Path="Notepad.exe" Mode="\x00" Default_Path="TRUE" Wait="1" Get_Console="FALSE"/>
    <COMMENT/>
    <DELAY Flags="\x01" Time="0.3" _COMMENT="Wait for Notepad to come up and get focus"/>
    <TEXT TYPE Action="0" Text="This is a test: %Count%"/>
    <COMMENT/>
    <KEYSTROKE SPEED Delay="500"/>
    <TEXT TYPE Action="0" Text="<ENTER><ENTER>The macro should be typing very slowly now.\r\n1\r\n2\r\n3\r\n\r\nDONE\r\n"/>
    <KEYSTROKE SPEED Delay="0"/>

    3. It is possible that Macro Express needs to run as Administrator in order to interact with ACT.

     


  14. 19 hours ago, IndigoJon said:

    for some reason on the remote machine, only some of the commands are being acted on...for example "Alt-i" should ...

     

    Sometimes <ALT>i does not work. Try using <ALTD>i<ALTU>. While I sometime run across a program where things like <ALT>i do not work I have never had an instance where <ALTD>i<ALTU> failed for me.

    Text Type (Simulate Keystrokes): <ALTD>i<ALTU>
    Delay: 500 milliseconds
     Text Type (Simulate Keystrokes): t
    Delay: 500 milliseconds

     


  15. Here are some observations:

     

    Activities Emailer.mex

     

    1. I would recommend a delay after the Activate or Launch command. It may take some time for the computer to load the program and be ready to accept keystrokes. This might be why it does not work on the remote computer.

     

    2. Since you are not doing any mouse movements or clicks you could remove the Window Resize command.

     

    3. Line 16 is

    Text Type (Simulate Keystrokes): <CTRL> <SPACE>

    Did you intent to have <ctrl><space><space> ? There is an extra space between > and <

     

    4. Is there a reason why you cannot combine some of the lines? You could replace several lines beginning on line 71 with

    Text Type (Simulate Keystrokes): Neah Activities Message

    5. You could simplify the macro by including a Keystroke Speed command and eliminating many of the delays.

     

    Friends & Family Emailer.mex has similar issues.

     

    Something like this may work (I did not test run this modified macro):

    Activate or Launch: Window "Act! Premium", Program "Act! Premium.lnk", Parameters ""
    Delay: 4 seconds
     
    Keystroke Speed: 1000 milliseconds
    Text Type (Simulate Keystrokes): <ALT>it<F4><F6>
    Delay: 3000 milliseconds
    Text Type (Simulate Keystrokes): <F6>
    Delay: 1700 milliseconds
    Text Type (Simulate Keystrokes): <F6>
    Delay: 1700 milliseconds
    Text Type (Simulate Keystrokes): <CTRL><SPACE>
    Text Type (Simulate Keystrokes): <CONTROL>c
    Delay: 250 milliseconds
    Text Type (Simulate Keystrokes): <CONTROL>v
    Delay: 1250 milliseconds
     
    Text Type (Simulate Keystrokes): <ALT>o
    Pause: Complex
    Delay: 500 milliseconds
    Keystroke Speed: 1000 milliseconds
    Text Type (Simulate Keystrokes): <ALT><F4><ALT>y<ALT>imn
    Delay: 2000 milliseconds
    Text Type (Simulate Keystrokes): e<ENTER><TAB><ENTER><F4><F6><F6><F6>
     
    Text Type (Simulate Keystrokes): <CTRL><SPACE><ENTER><TAB><TAB><ENTER>
    Delay: 2000 milliseconds
    Text Type (Simulate Keystrokes): g<TAB><TAB><TAB><ENTER>
     
    Text Type (Simulate Keystrokes): Neah Activities Message
    Text Type (Simulate Keystrokes): <ENTER><ENTER><ENTER>
    
    Keystroke Speed: 0 milliseconds
    <ACTIVATE OR LAUNCH Title="Act! Premium" Exact_Match="FALSE" Wildcards="FALSE" Path="C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Act! Premium\\Act! Premium.lnk" Mode="\x00" Default_Path="TRUE" Wait="1" Wait_For_Program="12"/>
    <DELAY Flags="\x01" Time="4"/>
    <COMMENT/>
    <KEYSTROKE SPEED Delay="1000"/>
    <TEXT TYPE Action="0" Text="<ALT>it<F4><F6>"/>
    <DELAY Flags="\x02" Time="3000"/>
    <TEXT TYPE Action="0" Text="<F6>"/>
    <DELAY Flags="\x02" Time="1700"/>
    <TEXT TYPE Action="0" Text="<F6>"/>
    <DELAY Flags="\x02" Time="1700"/>
    <TEXT TYPE Action="0" Text="<CTRL><SPACE>"/>
    <TEXT TYPE Action="0" Text="<CONTROL>c"/>
    <DELAY Flags="\x02" Time="250"/>
    <TEXT TYPE Action="0" Text="<CONTROL>v"/>
    <DELAY Flags="\x02" Time="1250"/>
    <COMMENT/>
    <TEXT TYPE Action="0" Text="<ALT>o"/>
    <PAUSE Flags="\x11" Message="Susan, type in whatever you need to here, or cut and paste text from another document, then click on <Resume>" Left="Center" Top="Center" Monitor="0"/>
    <DELAY Flags="\x02" Time="500"/>
    <KEYSTROKE SPEED Delay="1000"/>
    <TEXT TYPE Action="0" Text="<ALT><F4><ALT>y<ALT>imn"/>
    <DELAY Flags="\x02" Time="2000"/>
    <TEXT TYPE Action="0" Text="e<ENTER><TAB><ENTER><F4><F6><F6><F6>"/>
    <COMMENT/>
    <TEXT TYPE Action="0" Text="<CTRL><SPACE><ENTER><TAB><TAB><ENTER>"/>
    <DELAY Flags="\x02" Time="2000"/>
    <TEXT TYPE Action="0" Text="g<TAB><TAB><TAB><ENTER>"/>
    <COMMENT/>
    <TEXT TYPE Action="0" Text="Neah Activities Message"/>
    <TEXT TYPE Action="0" Text="<ENTER><ENTER><ENTER>"/>
    <COMMENT/>
    <KEYSTROKE SPEED Delay="0"/>

     

×
×
  • Create New...