Leaderboard


Popular Content

Showing most liked content since 08/19/2016 in all areas

  1. 1 like
    acantor sounds pessimistic, but he is absolutely right. The best Macro Express can do with Windows and especially web forms, is to be almost 100% reliable. It is great for automating personal tasks at work -- I always said it was worth half a person as a time saver. You can even roll it out to dozens or hundreds of users, but not to dummies. You/they have to watch carefully as the macros run and recognize when ME has gone wrong.
  2. 1 like
    Variable Set Integer %N1% from Position of Text in Variable %T1% (search for "user with code ") That gives you the displacement within the variable of the text "user with code ". Add 15 to the value in N1, and you have the starting position within the text of the two-character code. Extract the characters into another variable with Variable Modify String: Copy Part of %T1% to %T2% (starting position N1, characters to copy 2) If I have misunderstood what you want, then give us some examples of text you are working with, and the codes you are trying to isolate.
  3. 1 like
    If you sink enough time and effort into the problem, you may come up with a solution that almost always works. But you gotta love experimenting and tweaking, or you will likely find the experience a miserable drudge! I use a combination of techniques, including: - Clicking on a "neutral" part of the screen that resets the tab order. Then send tabs/shift tabs to the control. - Searching for a pixel colour on a control, or to something near the target, and then tabbing and/or clicking. - Searching for text on the screen. Then give the word or phrase focus, and then tab to the target. - Searching for text on the screen and then selecting it. Then search for the pixel colour of the selection,and click. Some of my Macro Express scripts perform thousands of actions to zero in on a target on a web app, and are almost 100% reliable. But they were labours of love. I was willing to put in the time to get them to work. And some of them are a bit brittle.
  4. 1 like
    I have done the same as Cory on some screens. Sometimes on a web page I will start with Alt-d to highlight the URL, because that also positions the cursor at the URL and gives a known starting point for tabbing. Of course, whoever maintains the page might also change the number of tabs needed. But you can diagnose and fix that fairly quickly when it happens, with the judicious use of Macro Stop statements inserted temporarily to see where the tabbing has left off. Sometimes if I can position the mouse fairly close above or below where I know the button will be, I write a short Repeat loop to move the mouse down or up a few pixels at a time, checking after each move to see if the mouse pointer has changed from an arrow to a finger. That works pretty well but sometimes fails due to timing, Windows busy doing something else so not changing the pointer quickly enough for example.
  5. 1 like
    * Example of one line of data, in variable T1. In your macro the Text File Process will populate the text variable, rather than the Set String command. Variable Set String %T1% " X:1701 Y:580" * Set integer to position of "X:" within the data Variable Set Integer %N1% from Position of Text in Variable %T1% * Bump position up by 2 characters so N1 is pointing to the first digit instead of to "X:" Variable Modify Integer: %N1% = %N1% + 2 * What Cory said -- move four digits from the data to another variable Variable Modify String: Copy Part of %T1% to %T2% [starting position N1, number of digits 4] * Display the extracted digits to verify the extraction is working properly Text Box Display: %T2% Of course in your actual macro, you would move the extracted digits to the array instead of Text Box Display.
  6. 1 like
    I would use Text File Process command if it's a file. Then in the loop I would use the Variable Modify String with the Copy Part of Text option. Simple. Assuming the X coordinate is always 4 digits of course. As per your sample.
  7. 1 like
    Here are two other ways to append a carriage return to a text file. Note that in Windows lines are terminated with two control characters: CR LF 1. The "Variable Modify String: Append %T1% to Text File" has a checkbox that says to include CR/LF. You could use this with an empty variable to append only CRLF. 2. This is what I do. At the top of my macro I include these: Variable Set %T13% to ASCII Char of 13 Variable Set %T10% to ASCII Char of 10 Then when setting strings I do something like this: Variable Set String %T1% "SomeValue%T13%%T10%"
  8. 1 like
    Try this: Use Text File Begin Process to get each line, sequentially, into a text variable. (One line on each pass through the loop defined by Text File Begin Process / Text File End Process). When the line is in the text variable (T1 for example), if variable T1 contains "S-Shata" then display the whole of T1 (the whole line) with the Text Box Display command. Text File Begin Process: "filename.txt" If Variable %T1% contains "S-Shata" Text Box Display: %T1% End If Text File End Process
  9. 1 like
    Increment an integer counter each time through the Repeat loop. Then test the counter value. For example, if your delay command specifies 1 second delay after checking pixel value, then when the counter reaches 120 the macro has been waiting about two minutes. If you use a half-second delay, check counter for 240 rather than 120; etc. When the counter reaches 120, click on the refresh button and reset the counter to zero to wait some more. You may be able to press the F5 key to refresh rather than using the mouse. Get pixel color Set counter = 0 Repeat until pixel color Wait 1 second Increment counter If counter >= 120 Click refresh Set counter = 0 End if Get pixel color Repeat End
  10. 1 like
    Here's the macro I said I'd post on return from holiday. Wish I'd seen your post about MXE files a few hours earlier, Samrae! I'd almost finished the macro, but it was based on my own method of identifying the variable type (tStringXyz is a text macro, nNumber an integer, dValue decimal, etc). Your MXE export idea allowed the following more flexible approach, which works for any style of variable naming. However, note that this works only for MX Pro, not MX3. Exports from the latter seem to be in a radically different form, based on the couple of old examples I found. The 'input' section for MX3 could instead follow my earlier method of first creating a text file from the target and the 'addition' section could be very similar to this one. It's not blisteringly fast, but a LOT faster than doing the job manually. About 1.5 seconds per variable on my first few tests, the largest with about 80 variables, mainly text. The major advantage I see for automating this is that it's so much easier to ensure identical variable names. Not having to remember or search for the names used before, with possible ambiguity and confusion if I vary them. See other notes in command comments. // Export the source macro as MXE (MX Pro only, not MX3). // Select the source macro containing the variables for copying across to the target macro Text Box Display: Select source macro Wait for Right Mouse Click Text Box Close: Select source macro Text Type (Simulate Keystrokes): x // Choose Export Delay: 0.2 seconds Text Type (Simulate Keystrokes): p // Choose Playable (MXE) Delay: 0.2 seconds // Save the MXE as a TXT file with a permanent name and path of your choice. Text Type (Use Clipboard and Paste Text): C:\Users\terry\Dropbox\Macro Express (Sundry)\ExportedMXE.txt // Choose Playable (MXE) Wait for Text Playback Mouse Move: 790, 564 Relative to Current Window // Save button Mouse Left Click Text Type (Simulate Keystrokes): y // Yes to overwrite Delay: 0.1 seconds Wait for File to Exist: C:\Users\terry\Dropbox\Macro Express (Sundry)\ExportedMXE.txt // In MX Explorer, select the TARGET macro to receive the copied variables Text Box Display: Select target macro Wait for Right Mouse Click Text Box Close: Select target macro Text Type (Simulate Keystrokes): i // Open the target macro in Script Editor Wait for Window Title: Macro Express Pro - Script Editor [ // Procees the exported text file, line by line. Text File Begin Process: C:\Users\terry\Dropbox\Macro Express (Sundry)\ExportedMXE.txt // Do nothing if the line does not start with '['. // If it DOES start with a right square bracket, it contains variable information which needs parsing, ready for adding to the target macro. Variable Modify String: Copy a substring in %tTextLine%, starting at 1 and 1 characters long to %tFirstChar% If Variable %tFirstChar% Does not Equal "[" // Ignore this text line Continue End If // This is a variable, but it might be one of the built-in types. If Variable %tTextLine% Contains "%T%" // Ignore this text line OR If Variable %tTextLine% Contains "%N%" // Ignore this text line OR If Variable %tTextLine% Contains "%D%" // Ignore this text line OR If Variable %tTextLine% Contains "%C%" // Ignore this text line // Then ignore this too. Continue End If // This is a variable // Locate the first colon ': ', in order to capture the variable type. Variable Set Integer %nColon% to the position of ":" in %tTextLine% Variable Modify Integer: %nColon% = %nColon% - 2 Variable Modify String: Copy a substring in %tTextLine%, starting at 2 and %nColon% characters long to %tVariableType% // Locate the first '% ' (at the end of the variable name). Variable Set Integer %nEndVariable% to the position of "% " in %tTextLine% Variable Modify Integer %nEndVariable%: Decrement // Last char in variable name // Calculate nVarStart, the first char of variable name. Variable Set Integer %nVarStart% to 0 Variable Modify Integer: %nVarStart% = %nColon% + 4 // Calculate nVarNum, the number of chars in variable name. Variable Set Integer %nVarNum% to 0 Variable Modify Integer: %nVarNum% = %nEndVariable% - %nColon% Variable Modify Integer: %nVarNum% = %nVarNum% - 3 Variable Modify String: Copy a substring in %tTextLine%, starting at %nVarStart% and %nVarNum% characters long to %tVariableName% // NOTE: Some of the labels used in the MXE are different to those in the Script Editor. string = Text integer = Integer float = Decimal control = Control handle = Handle bool = Boolean large integer = Large Integer datetime = Date/Time // NOTE: The two other variable data fields Global and Elements could also be captured at this stage. But for 99% of my work they are not used, so I've not done so. Macro Playback Speed: 0.33 times faster than normal Switch( %tVariableType% ) Case: string // Text // Add the selected variable to the target macro Mouse Move: 1340, 120 Relative to Screen // Variables tab Mouse Left Click Delay: 0.1 seconds Mouse Move: 1720, 1092 Relative to Screen // Add button Mouse Left Click Delay: 0.3 seconds Wait for Window Title: Variable Properties Text Type (Simulate Keystrokes): %tVariableName% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <TAB> // Select Variable Type box Delay: 0.1 seconds Text Type (Simulate Keystrokes): t Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> // Confirm Delay: 0.1 seconds End Case Case: integer // Integer // Add the selected variable to the target macro Mouse Move: 1340, 120 Relative to Screen // Variables tab Mouse Left Click Delay: 0.1 seconds Mouse Move: 1720, 1092 Relative to Screen // Add button Mouse Left Click Delay: 0.3 seconds Wait for Window Title: Variable Properties Text Type (Simulate Keystrokes): %tVariableName% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <TAB> // Select Variable Type box Delay: 0.1 seconds Text Type (Simulate Keystrokes): i Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> // Confirm Delay: 0.1 seconds End Case Case: float // Decimal // Add the selected variable to the target macro Mouse Move: 1340, 120 Relative to Screen // Variables tab Mouse Left Click Delay: 0.1 seconds Mouse Move: 1720, 1092 Relative to Screen // Add button Mouse Left Click Delay: 0.3 seconds Wait for Window Title: Variable Properties Text Type (Simulate Keystrokes): %tVariableName% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <TAB> // Select Variable Type box Delay: 0.1 seconds Text Box Display: Text Type (Simulate Keystrokes): d Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> // Confirm Delay: 0.1 seconds End Case Case: control // Control // Add the selected variable to the target macro Mouse Move: 1340, 120 Relative to Screen // Variables tab Mouse Left Click Delay: 0.1 seconds Mouse Move: 1720, 1092 Relative to Screen // Add button Mouse Left Click Delay: 0.3 seconds Wait for Window Title: Variable Properties Text Type (Simulate Keystrokes): %tVariableName% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <TAB> // Select Variable Type box Delay: 0.1 seconds Text Type (Simulate Keystrokes): c Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> // Confirm Delay: 0.1 seconds End Case Case: large integer // Large integer // Add the selected variable to the target macro Mouse Move: 1340, 120 Relative to Screen // Variables tab Mouse Left Click Delay: 0.1 seconds Mouse Move: 1720, 1092 Relative to Screen // Add button Mouse Left Click Delay: 0.3 seconds Wait for Window Title: Variable Properties Text Type (Simulate Keystrokes): %tVariableName% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <TAB> // Select Variable Type box Delay: 0.1 seconds Text Type (Simulate Keystrokes): l Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> // Confirm Delay: 0.1 seconds End Case Case: bool // Boolean // Add the selected variable to the target macro Mouse Move: 1340, 120 Relative to Screen // Variables tab Mouse Left Click Delay: 0.1 seconds Mouse Move: 1720, 1092 Relative to Screen // Add button Mouse Left Click Delay: 0.3 seconds Wait for Window Title: Variable Properties Text Type (Simulate Keystrokes): %tVariableName% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <TAB> // Select Variable Type box Delay: 0.1 seconds Text Type (Simulate Keystrokes): b Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> // Confirm Delay: 0.1 seconds End Case Case: handle // Handle // Add the selected variable to the target macro Mouse Move: 1340, 120 Relative to Screen // Variables tab Mouse Left Click Delay: 0.1 seconds Mouse Move: 1720, 1092 Relative to Screen // Add button Mouse Left Click Delay: 0.3 seconds Wait for Window Title: Variable Properties Text Type (Simulate Keystrokes): %tVariableName% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <TAB> // Select Variable Type box Delay: 0.1 seconds Text Type (Simulate Keystrokes): h Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> // Confirm Delay: 0.1 seconds End Case Case: datetime // Date/Time Mouse Move: 1340, 120 Relative to Screen // Variables tab Mouse Left Click Delay: 0.1 seconds Mouse Move: 1720, 1092 Relative to Screen // Add button Mouse Left Click Delay: 0.3 seconds Wait for Window Title: Variable Properties Text Type (Simulate Keystrokes): %tVariableName% Delay: 0.1 seconds Text Type (Simulate Keystrokes): <TAB> // Select Variable Type box Delay: 0.1 seconds Text Type (Simulate Keystrokes): d Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ARROW DOWN> Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ENTER> // Confirm Delay: 0.1 seconds End Case End Switch Delay: 0.1 seconds Text File End Process And the code: <COMMENT Value="Export the source macro as MXE (MX Pro only, not MX3)."/> <COMMENT Value="Select the source macro containing the variables for copying across to the target macro"/> <COMMENT/> <TEXT BOX DISPLAY Title="Select source macro" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n{\\colortbl ;\\red255\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\qc\\b\\f0\\fs20 In MX Explorer, navigate to the source macro, select it, and \\cf1 right-click\\cf0 it.\r\n\\par \r\n\\par This message will close automatically.\\f1 \r\n\\par }\r\n" Left="868" Top="485" Width="313" Height="183" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x02" Delay="0"/> <WAIT FOR RIGHT MOUSE CLICK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT BOX CLOSE Header="Select source macro"/> <TEXT TYPE Action="0" Text="x" _COMMENT="Choose Export"/> <DELAY Flags="\x01" Time="0.2"/> <TEXT TYPE Action="0" Text="p" _COMMENT="Choose Playable (MXE)"/> <DELAY Flags="\x01" Time="0.2"/> <COMMENT Value="Save the MXE as a TXT file with a permanent name and path of your choice."/> <TEXT TYPE Action="1" Text="C:\\Users\\terry\\Dropbox\\Macro Express (Sundry)\\ExportedMXE.txt" _COMMENT="Choose Playable (MXE)"/> <WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MOUSE MOVE Option="\x02" X="790" Y="564" _PROMPT="0x000A" _COMMENT="Save button"/> <MOUSE LEFT CLICK/> <TEXT TYPE Action="0" Text="y" _COMMENT="Yes to overwrite"/> <DELAY Flags="\x01" Time="0.1"/> <WAIT FOR FILE TO EXIST Filename="C:\\Users\\terry\\Dropbox\\Macro Express (Sundry)\\ExportedMXE.txt" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <COMMENT Value="In MX Explorer, select the TARGET macro to receive the copied variables"/> <TEXT BOX DISPLAY Title="Select target macro" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n{\\colortbl ;\\red255\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\qc\\b\\f0\\fs20 In MX Explorer, navigate to and \\cf1 right click\\cf0 the target macro.\r\n\\par \r\n\\par This message will close automatically.\\f1 \r\n\\par }\r\n" Left="868" Top="485" Width="313" Height="183" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x02" Delay="0"/> <WAIT FOR RIGHT MOUSE CLICK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT BOX CLOSE Header="Select target macro"/> <TEXT TYPE Action="0" Text="i" _COMMENT="Open the target macro in Script Editor"/> <WAIT FOR WINDOW TITLE Title="Macro Express Pro - Script Editor [" Partial="TRUE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <COMMENT Value="Procees the exported text file, line by line."/> <TEXT FILE BEGIN PROCESS Filename="C:\\Users\\terry\\Dropbox\\Macro Express (Sundry)\\ExportedMXE.txt" Start_Record="2" Process_All="TRUE" Records="1" Variable="%tTextLine%"/> <COMMENT Value="Do nothing if the line does not start with '['."/> <COMMENT Value="If it DOES start with a right square bracket, it contains variable information which needs parsing, ready for adding to the target macro."/> <COMMENT/> <VARIABLE MODIFY STRING Option="\x09" Destination="%tFirstChar%" Variable="%tTextLine%" Start="1" Count="1" NoEmbeddedVars="FALSE"/> <IF VARIABLE Variable="%tFirstChar%" Condition="\x01" Value="[" IgnoreCase="FALSE" _COMMENT="Ignore this text line"/> <CONTINUE/> <END IF/> <COMMENT Value="This is a variable, but it might be one of the built-in types."/> <IF VARIABLE Variable="%tTextLine%" Condition="\x06" Value="%T%" IgnoreCase="FALSE" _COMMENT="Ignore this text line"/> <OR/> <IF VARIABLE Variable="%tTextLine%" Condition="\x06" Value="%N%" IgnoreCase="FALSE" _COMMENT="Ignore this text line"/> <OR/> <IF VARIABLE Variable="%tTextLine%" Condition="\x06" Value="%D%" IgnoreCase="FALSE" _COMMENT="Ignore this text line"/> <OR/> <IF VARIABLE Variable="%tTextLine%" Condition="\x06" Value="%C%" IgnoreCase="FALSE" _COMMENT="Ignore this text line"/> <COMMENT Value="Then ignore this too."/> <CONTINUE/> <END IF/> <COMMENT Value="This is a variable"/> <COMMENT Value="Locate the first colon ': ', in order to capture the variable type."/> <VARIABLE SET INTEGER Option="\x0E" Destination="%nColon%" Text_Variable="%tTextLine%" Text=":" Ignore_Case="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%nColon%" Value1="%nColon%" Value2="2"/> <VARIABLE MODIFY STRING Option="\x09" Destination="%tVariableType%" Variable="%tTextLine%" Start="2" Count="%nColon%" NoEmbeddedVars="FALSE"/> <COMMENT/> <COMMENT Value="Locate the first '% ' (at the end of the variable name)."/> <VARIABLE SET INTEGER Option="\x0E" Destination="%nEndVariable%" Text_Variable="%tTextLine%" Text="% " Ignore_Case="FALSE"/> <VARIABLE MODIFY INTEGER Option="\x08" Destination="%nEndVariable%" _COMMENT="Last char in variable name"/> <COMMENT Value="Calculate nVarStart, the first char of variable name."/> <VARIABLE SET INTEGER Option="\x00" Destination="%nVarStart%" Value="0"/> <VARIABLE MODIFY INTEGER Option="\x00" Destination="%nVarStart%" Value1="%nColon%" Value2="4"/> <COMMENT Value="Calculate nVarNum, the number of chars in variable name."/> <VARIABLE SET INTEGER Option="\x00" Destination="%nVarNum%" Value="0"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%nVarNum%" Value1="%nEndVariable%" Value2="%nColon%"/> <VARIABLE MODIFY INTEGER Option="\x01" Destination="%nVarNum%" Value1="%nVarNum%" Value2="3"/> <VARIABLE MODIFY STRING Option="\x09" Destination="%tVariableName%" Variable="%tTextLine%" Start="%nVarStart%" Count="%nVarNum%" NoEmbeddedVars="FALSE"/> <COMMENT Value="NOTE: Some of the labels used in the MXE are different to those in the Script Editor. \r\nstring = Text\r\ninteger = Integer\r\nfloat = Decimal\r\ncontrol = Control\r\nhandle = Handle\r\nbool = Boolean\r\nlarge integer = Large Integer\r\ndatetime = Date/Time\r\n"/> <COMMENT Value="NOTE: The two other variable data fields Global and Elements could also be captured at this stage. But for 99% of my work they are not used, so I've not done so."/> <COMMENT/> <MACRO PLAYBACK SPEED Speed="3" _ENABLED="FALSE"/> <SWITCH Variable="%tVariableType%"/> <CASE Value="string" _COMMENT="Text"/> <COMMENT Value="Add the selected variable to the target macro"/> <MOUSE MOVE Option="\x01" X="1340" Y="120" _PROMPT="0x000A" _COMMENT="Variables tab"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.1"/> <MOUSE MOVE Option="\x01" X="1720" Y="1092" _PROMPT="0x000A" _COMMENT="Add button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.3"/> <WAIT FOR WINDOW TITLE Title="Variable Properties" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="%tVariableName%"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="Select Variable Type box"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="t"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Confirm"/> <DELAY Flags="\x01" Time="0.1"/> <END CASE/> <CASE Value="integer" _COMMENT="Integer"/> <COMMENT Value="Add the selected variable to the target macro"/> <MOUSE MOVE Option="\x01" X="1340" Y="120" _PROMPT="0x000A" _COMMENT="Variables tab"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.1"/> <MOUSE MOVE Option="\x01" X="1720" Y="1092" _PROMPT="0x000A" _COMMENT="Add button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.3"/> <WAIT FOR WINDOW TITLE Title="Variable Properties" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="%tVariableName%"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="Select Variable Type box"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="i"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Confirm"/> <DELAY Flags="\x01" Time="0.1"/> <END CASE/> <CASE Value="float" _COMMENT="Decimal"/> <COMMENT Value="Add the selected variable to the target macro"/> <MOUSE MOVE Option="\x01" X="1340" Y="120" _PROMPT="0x000A" _COMMENT="Variables tab"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.1"/> <MOUSE MOVE Option="\x01" X="1720" Y="1092" _PROMPT="0x000A" _COMMENT="Add button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.3"/> <WAIT FOR WINDOW TITLE Title="Variable Properties" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="%tVariableName%"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="Select Variable Type box"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Now add this DECIMAL variable\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE"/> <TEXT TYPE Action="0" Text="d"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Confirm"/> <DELAY Flags="\x01" Time="0.1"/> <END CASE/> <CASE Value="control" _COMMENT="Control"/> <COMMENT Value="Add the selected variable to the target macro"/> <MOUSE MOVE Option="\x01" X="1340" Y="120" _PROMPT="0x000A" _COMMENT="Variables tab"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.1"/> <MOUSE MOVE Option="\x01" X="1720" Y="1092" _PROMPT="0x000A" _COMMENT="Add button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.3"/> <WAIT FOR WINDOW TITLE Title="Variable Properties" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="%tVariableName%"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="Select Variable Type box"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="c"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Confirm"/> <DELAY Flags="\x01" Time="0.1"/> <END CASE/> <CASE Value="large integer" _COMMENT="Large integer"/> <COMMENT Value="Add the selected variable to the target macro"/> <MOUSE MOVE Option="\x01" X="1340" Y="120" _PROMPT="0x000A" _COMMENT="Variables tab"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.1"/> <MOUSE MOVE Option="\x01" X="1720" Y="1092" _PROMPT="0x000A" _COMMENT="Add button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.3"/> <WAIT FOR WINDOW TITLE Title="Variable Properties" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="%tVariableName%"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="Select Variable Type box"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="l"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Confirm"/> <DELAY Flags="\x01" Time="0.1"/> <END CASE/> <CASE Value="bool" _COMMENT="Boolean"/> <COMMENT Value="Add the selected variable to the target macro"/> <MOUSE MOVE Option="\x01" X="1340" Y="120" _PROMPT="0x000A" _COMMENT="Variables tab"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.1"/> <MOUSE MOVE Option="\x01" X="1720" Y="1092" _PROMPT="0x000A" _COMMENT="Add button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.3"/> <WAIT FOR WINDOW TITLE Title="Variable Properties" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="%tVariableName%"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="Select Variable Type box"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="b"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Confirm"/> <DELAY Flags="\x01" Time="0.1"/> <END CASE/> <CASE Value="handle" _COMMENT="Handle"/> <COMMENT Value="Add the selected variable to the target macro"/> <MOUSE MOVE Option="\x01" X="1340" Y="120" _PROMPT="0x000A" _COMMENT="Variables tab"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.1"/> <MOUSE MOVE Option="\x01" X="1720" Y="1092" _PROMPT="0x000A" _COMMENT="Add button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.3"/> <WAIT FOR WINDOW TITLE Title="Variable Properties" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="%tVariableName%"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="Select Variable Type box"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="h"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Confirm"/> <DELAY Flags="\x01" Time="0.1"/> <END CASE/> <CASE Value="datetime" _COMMENT="Date/Time"/> <MOUSE MOVE Option="\x01" X="1340" Y="120" _PROMPT="0x000A" _COMMENT="Variables tab"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.1"/> <MOUSE MOVE Option="\x01" X="1720" Y="1092" _PROMPT="0x000A" _COMMENT="Add button"/> <MOUSE LEFT CLICK/> <DELAY Flags="\x01" Time="0.3"/> <WAIT FOR WINDOW TITLE Title="Variable Properties" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <TEXT TYPE Action="0" Text="%tVariableName%"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<TAB>" _COMMENT="Select Variable Type box"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="d"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ARROW DOWN>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="Confirm"/> <DELAY Flags="\x01" Time="0.1"/> <END CASE/> <END SWITCH/> <DELAY Flags="\x01" Time="0.1"/> <TEXT FILE END PROCESS/> And the MEX is attached. Naturally it will require some customising for folder locations etc. -- Terry, East Grinstead, UK CopyVariablesFromSourceToTarget.mex
  11. 1 like
    I think this will work: Repeat with Folder (folder E:\Temp, putting file name only into text variable T1) Use Variable Modify Text commands to copy T1 to T2 and strip off the file extension from T2 Create Folder: "C:\%T2%" Wait for Folder Exist: "C:\%T2%" Copy File or Files: "E:\Temp\%T1%" (destination C:\%T2%\%T1%) Repeat End
  12. 1 like
    Others can better help you if you post your macro in a form that can be copied (as you did) and in a form that can be read, like this: // Accepte l'invitation. Variable Set Integer %N[1]% to %bleu_invitation% Repeat Until %N[1]% Does not Equal "%bleu_invitation%" Mouse Move: %pos_accepter_invitation[1]%, %pos_accepter_invitation[2]% Relative to Screen Mouse Left Click Text Box Display: débug : Delay: 500 seconds Mouse Move: 0, 0 Relative to Screen Delay: 500 milliseconds Get Pixel Color at (%pos_inte_invitation[1]%, %pos_inte_invitation[2]%) Relative to Screen into %N[1]% Text Box Display: débug : // Calibrage debug. Variable Set Decimal %bug_zone% to 1.7 Macro Run: - CALIBRAGE # - auto-debug. End Repeat Variable Set Decimal %bug_counter% to 0 You can copy your macro in a readable format by highlighting the macro commands, right-clicking your mouse and choosing "Copy Command Text". Looking at your macro in a format that we can read it shows that you have a delay of 500 seconds. That is more than 8 minutes.
  13. 1 like
    I hope this is ok being posted like this. A review of the forum guidelines didn't stand out to me as such, but I am tired and could have easily missed it. So if this isn't allowed, admins, please delete and I'll rephrase the request. Here's the short and sweet. I'd like to have someone review a video of a macro running I've developed for a client that's the first of many projects that we have to do through the rest of the year. I want to have a discussion about what's viewed at the 10,000 foot level with maybe the occasional 10 foot level. I don't need a bullet list of what's wrong and what should be changed, rather I'm looking for a back-and-forth conversation about the project, the macro, the approach, etc. I've worked with this client before, they were impressed with ME and now we're really getting deep with it. To prevent any liability, though, I'd have to have the person reviewing the video of the macro and the macro itself sign an NDA, limiting the liability just to anything to do with this particular client. As such, I'm looking for an individual who would be interested in working for me likely as a 1099 employee but possibly a w-2 employee. The work would be specific to this client to start, hence the value of reviewing what we are doing and giving input on this particular macro. It also likely wouldn't require assistance until later this year, start of Jan/2017 and might not be needed at all - however I do anticipate there still to be work as the pipeline is starting to get filled quite quickly to the point where I'm concerned I won't have the bandwidth to handle it. I wouldn't have anyone sign anything first. Instead, feel free to contact me and we can discuss your experience and see if it's something you're interested in before we even talk about signing any sort of legal document. I also would not be opposed to any sort of partnership with other Macro Developers who have their own business and want to do a C2C or some other agreement. If that can't work, or if this post has to get deleted, then I will either record the video and scrub a lot of of in editing or I will send just the macro with much of it edited as well. But ideally I would like to have a no restrictions conversation about what the macro is doing and I really can't do that without the full thing being seen and an NDA being signed. PM me if interested. Flame me if this isn't allowed. Admin delete if you get to it first . Thanks, Doug
  14. 1 like
    Please read the help file under the section Command Line Parameters and check out the /A parameter.
  15. 1 like
    I threw together a macro using ASCII File Process. Hope this helps. BTW, i'm using ME3 not MEP but there shouldn't be any differences here. This file process seems to ignore blanks. Hope this helps! How this works is that each loop it moves down a line. So data from A4 = %t1%, B4 = %t2%, ect. When it loops A5 = %t1%, B5 = %t2%, ect. That is why you would only need %T1% // Save a text file called asc processing file.txt // Have a spread sheet called Microsoft Excel - Book 1 Temp open Activate Window: "Microsoft Excel - Book 1 Temp" Text Type: <F5> Delay 0.5 Seconds Text Type: Sheet1!A4:A204 Text Type: <ENTER> Delay 0.5 Seconds Clipboard Copy // // Settings: "Save Clipboard to a Text File" // // Settings: You will need to browse to the .txt file and choose it Clipboard Save Text: "asc processing file.txt" Delay 0.5 Seconds Text Type: <F5> Delay 0.5 Seconds // Below puts it back into excel but you would need activate what ever program when you run the real deal. //Putting it back to excel was just for testing Text Type: Sheet1!B3 Text Type: <ENTER> Delay 0.5 Seconds ASCII File Begin Process: "asc processing file.txt" (Tab Delimited Text ) Text Type: %T1% Text Type: <ARROW DOWN> ASCII File End Process
  16. 1 like
    I can't see the screen image you attached. But I think you're talking about the icon that disables individual line(s) in a macro. For example in my screen shot below, I have highlighted three lines. If I click the icon the lines will appear with a line drawn through them, and will be ignored when the macro runs. In Macro Express 3.x it just happens that the icon is opposite line 9; it has nothing to do with line 9. As to why a line in your macros is not running, we would have to see the macro scripts.
  17. 1 like
    I am trying to run a hotkey that will copy the value into a variable from a excel cell.. perform a 'IF End' test function and the test function will replace the abbrivation of whatever the variable contains and then write it back to the cell.. Other than my 'AIR CANADA' and BANK OF NOVA SCOTIA' cells, the macro is giving me unpredictable results. There are times where it does replace the cell at all and at times will replace the cell with something that is not even in any of my test conditions. If I open up notepad and highlight the same words and run the macro, it behaves fine. Below is my script: <DIS:<CLIPE><CLIPC><TVAR2:01:03:><TMVAR2:01:01:00:000:000:><IFVAR2:1:01:1:AIR CANADA><TMVAR2:21:01:00:000:000:AIR CANADAAC><ENDIF><IFVAR2:1:01:1:ABB INC.><TMVAR2:21:01:00:000:000:ABB INC.ABB><ENDIF><IFVAR2:1:01:1:ABB CANADA><TMVAR2:21:01:00:000:000:ABB CANADAABB><ENDIF><IFVAR2:1:01:1:BANK OF NOVA SCOTIA><TMVAR2:21:01:00:000:000:BANK OF NOVA SCOTIABNS><ENDIF><IFVAR2:1:01:1:ALBERTA EMPLOYMENT, IMMIGRATION AND INDUSTRY><TMVAR2:21:01:00:000:000:ALBERTA EMPLOYMENT, IMMIGRATION AND INDUSTRYAEII><ENDIF><IFVAR2:1:01:1:ALBERTA HEALTH AND WELLNESS><TMVAR2:21:01:00:000:000:ALBERTA HEALTH AND WELLNESSAHW><ENDIF><IFVAR2:1:01:1:AMERICAN EXPRESS - CANADA><TMVAR2:21:01:00:000:000:AMERICAN EXPRESS - CANADAAMEX><ENDIF><IFVAR2:1:01:1:ATB FINANCIAL - ALBERTA TREASURY BRANCHES><TMVAR2:21:01:00:000:000:ATB FINANCIAL - ALBERTA TREASURY BRANCHESATB><ENDIF><IFVAR2:1:01:1:Banque Nationale Du Canada (BNC)><TMVAR2:21:01:00:000:000:Banque Nationale Du Canada (BNC)BNC><ENDIF><IFVAR2:1:01:1:BELL CANADA><TMVAR2:21:01:00:000:000:BELL CANADABELL><ENDIF><TEXTTYPE:%T1%><TEXTTYPE:<ARROW DOWN>> any ideas would be greatly appricated..