Leaderboard


Popular Content

Showing most liked content since 02/22/2013 in all areas

  1. 3 likes
    Also remember to check out the a&ccelerator key things... from the help file (bottom of "Multiple Choice Menu" page): =========== Multiple Choice Tips Make one of the Multiple Choice selections the Default Let's say you want option B to be your default selection. Use the Variable Set String command and select the Set Value Now option. Set the value of variable T1 to B. Insert this command before your Menu command in the macro script. When the macro runs, option B will display as the default selection. Allow users to select a menu item with the keyboard instead of clicking with the mouse Let's look at the Multiple Choice Menu image above. There are four entries in the Menu List. We want to set this up so that when the menu is displayed, the user can press a keystroke rather than click on their choice with the mouse. To do so we would modify the Menu List to look like the following: A &Go to Macro Express web site B &Run Notepad C &Insert email tagline D &Connect to FTP site You'll notice that an ampersand "&" has been placed in front of each item in the menu list. When the list is displayed during playback of the macro, the letter following the ampersand "&" will be underlined. The user can then press the underlined letter for the choice they want. This will highlight their choice. Pressing the Enter key will perform the macro selection chosen. The ampersand may be placed anywhere in the text string. It doesn't need to be placed before the first letter as in the example above. For example, we could set item A to read as follows: Go to &Macro Express web site. In this case the M will be underlined and pressing the "M" key during playback will highlight this menu option. Note 1: Be careful not to duplicate the underlined letters. Otherwise the first duplicate letter will be the default choice each time the letter is pressed. Note 2: If you are using the If Variable Contains command with the Multiple Choice Menu and you have “Save Item Text” checked, be sure to change the text you are comparing so that it includes the ampersand "&". For example, change “If Variable %T1% contains "Choice One" to “If Variable %T1% contains "&Choice One". Note 3: To insert an ampersand in the text that is not used as an accelerator, such as a menu item of "This & That", insert two ampersand symbols. Write the menu item as "This && That", so that it displays correctly when the macro runs.
  2. 3 likes
    Preselect a value in the multiple choice by setting the result value to that value before showing the menu. IE when the multiple choice pops up one will already be selected. Then you can arrow up and down to select different values. Enter to accept.
  3. 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.
  4. 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.
  5. 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%"
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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.
  11. 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
  12. 1 like
    Please read the help file under the section Command Line Parameters and check out the /A parameter.
  13. 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
  14. 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.
  15. 1 like
    You might want to check out my page on working with tabular data. It sounds like you're' doing it but there might be something in there for you. As for writing CSV accumulate your output in a string variable and then write it all at once into a CSV file. That is do it all internally in MEP. No office apps. What you are describing is 'flat file' work, not really database. If I were you I would drive this off of a SQL server. It's easy to learn the kind of things you want to do. Say you want to get the city of an employee. It's almost English. "Select City from Employees where EmployeeID = 24". In fact I think that would pass a grammar check. Where you are headed will cost you a huge amount of time writing routines to sort and manipulate data. You are reinventing SQL Server. It's all been done before and it's free. And MEP has almost no capability for efficiently processing and using tabular data. All one can do is create a series of arrays which emulate columns of data. Congratulations, you just invented the most basic part of a Db Server, A table. This is also why I thought it would be nice to have a simple SQL addon. for MEP. The built in sqlcmd.exe I think will do this but I've never used it before. Since it's command line one might be able to run it from a file input. I keep recommending thing that you reject because they're different or more complex. True they are different but they are simple and the road you're heading down is rocky and goes over the top of a mountain. There's a nice paved road already built down here in the valley. I have done exactly what you are trying to do and I pushed MEP to become a huge program doing many things for my clients. It made me very knowledgeable in MEP but in retrospect it was a mistake. I should have stopped and learned to program much sooner. It only took me a day to write my first program the replaced a macro that was hundreds of lines of code long and terribly unreliable. I think the subroutine was 7 lines long.
  16. 1 like
    We have had a couple of really big discussions about this a couple years back in this forum. With applications like Outlook, the one I was having troubles with, it's not an easy feat because it uses MDI (Multi-Document Interface.) But others here, myself included, did come up with some solutions. Please check there.
  17. 1 like
    I want to copy a column of excel and paste each cell values one by one below into another excel column where my cusror is, ignoring blank cells. I need one by one. paste cell one value then down arrow then cell two value its important. Splitting the array into each cell value is tricky for me and later pasting one by one value Please help
  18. 1 like
    When did you download the PGM Functions Library? Is the latest freeware version password protected?
  19. 1 like
    There appears to be is a carriage return (ASCII 13) at the end of the quote. So what I would do is copy the clipboard to a text variable (T1); calculate the position of ASCII 13 in T1 (N1); copy from character 0 to character N1 in T1, and assign it to T2; and then copy T2 to the clipboard. Variable Set to ASCII Char 13 to %T[99]% // This is the Ascii code for a carriage return Variable Set String %T[1]% from the clipboard contents Variable Set Integer %N[1]% to the position of "%T[99]%" in %T[1]% Variable Modify String: Copy a substring in %T[1]%, starting at 0 and %N[1]% characters long to %T[2]% Variable Modify String: Save %T[2]% to the clipboard You will likely need to tweak the code slightly. I haven't thoroughly tested the code. Also, I did this with Macro Express Pro, so the syntax will be a little different with Macro Express 3.
  20. 1 like
    Thks alan and rberq i think this could help me to solve my problem But one more thing left how could i read time from other program running at system I dont want to use system time so that i can backtest any process runing in that program.....
  21. 1 like
    Does anyone know of any lock screen alternative, so that I can still have my dual PC (Win 7) monitors secure from prying eyes, but yet still run standard macro express functionality? I've done a lot of research, and haven't found any great solutions(winlockr, kid key locker). Basically, I'd like to be able to black out both screens and lock keyboard/mouse, except for a certain combination of keys to unlock. Then I can have macro's running behind the screen. Any thoughts or ideas? I have the latest macro express pro. I also heavily use Microsoft Access, but have no looked into calling macros with vbscript as I assume it's still subject to the same limitations if the screen is locked and you want to find certain windows.
  22. 1 like
    In Windows Explorer, manually place mouse over file name, click once to select the name. You could use other techniques, manual or macro-driven to do the selection. Macro can then do this: Type <ALTD>f<ALTU>m which highlights the name to be changed. Clipboard Copy the highlighted name. Set String T1 from clipboard. Variable Modify String: Lowercase %T1% Text Type T1 which overtypes the highlighted name. Text Type <ENTER>
  23. 1 like
    Works, tho a bit unreliable as it's dependent on web page and text available (which may repeat on page). I find it works better to Find a link then just text strings. Would be nice if we could directly identify weg page 'controls' (fields etc).
  24. 1 like
    Attached is a sample macro file for you. Below is the text for cursory reference. You should be able to at least understand the approach here. Also good to save this as a macro you can call later in other applications. Here I snab the text values for day, month, and year and convert them. Then tweak them and add them to the default value of a DateTime variable. Before I used this method I tried to to do the math but it's hell once you start considering all the leap year rules and so forth. I did it but it was very complicated. In VB.NET this is a simple cast command. I hope someday ISS will add an option to Variable Modify String to cast to DateTime. Alternatively one could make a simple JavaScript to do this instead. // Parse out the string values and cast Text Box Display: Default Date Value // Illustrate the zero date default value Variable Set String %strDoB% to "08/19/1968" // 'As sample I set the date to my birthday. This might be done with a clipboard instead. Variable Modify String: Copy a substring in %strDoB%, starting at 4 and 2 characters long to %strDoBDay% // Copy the day string Variable Modify String %strDoBDay%: Convert to Integer (%intDoBDay%) // Cast the day string to an integer value Variable Modify Integer: %intDoBDay% = %intDoBDay% + 1 // To align the day in 1900 12/30 plus 1 to be 12/31 Variable Modify String: Copy a substring in %strDoB%, starting at 1 and 2 characters long to %strDoBMonth% // Copy the month string Variable Modify String %strDoBMonth%: Convert to Integer (%intDoBMonth%) // Cast the month string to an integer value Variable Modify Integer: %intDoBMonth% = %intDoBMonth% - 1 // To make it zero based Variable Modify String: Copy a substring in %strDoB%, starting at 7 and 4 characters long to %strDoBYear% // Copy the year string Variable Modify String %strDoBYear%: Convert to Integer (%intDoBYear%) // Cast the year to an integer value Variable Modify Integer: %intDoBYear% = %intDoBYear% - 1900 // To align with the 1/1/1900 convention // Add the sample DoB value Variable Modify Date/Time: %dtDoB% = %dtDoB% + %intDoBDay% Days // Simply add the day integer Variable Modify Date/Time: %dtDoB% = %dtDoB% + %intDoBMonth% Months // Simply add the month integer Variable Modify Date/Time: %dtDoB% = %dtDoB% + %intDoBYear% Years // Simply add the year integer Text Box Display: Result CastDate.mex
  25. 1 like
    The most important thing to know about dates is that they're internally stored as decimal values. 1 = 1/1/1990. And each date is a unit value of one. Time within a day is a decimal amount. EG. 0.5 = noon. So really all you'e wanting to do is set a date value and modify it to remove 90 days. Then compare that date to your date to determine if it's less than it. So create a variable called DateThreshold or something like that. Subtract 90 days from it. Now compare that to the suspect date..
  26. 1 like
    Your "steve kunkel" profile has been merged with your stevek profile and removed. The stevek profile should contain all posts from both profiles. Your avatar has also been deleted.
  27. 1 like
    I'm with Rberg on this one, you should at least have a small delay otherwise it will do it millions of times a second and could pack up the system. I would try that first. Next I would log what the color actually is in each iteration of the loop and see if it's actually ever seeing that color. The color you have specified is very specific and these days with blends, shadows, and textures of graphic components you need to be more flexible. I was trying to detect the green in a progress bar once but I counted hundreds of shades of green. I wrote about this on the forum and may still have a web page dedicated to colors in MEP on my site. But essentially I would break the color into RGB components and evaluate them. So if I wanted something that was mostly green I might look for a green value greater than 200 and red and blues less than 50. If you need help with this please let me know. But first you should check to see what colors MEP is actually seeing at those coordinates.
  28. 1 like
    I frequently struggle with this limitation of MEP. I even offered to write a generic .NET add-on program to create a multiple-input form on the fly for users. But there was no interest. The best advice I can think of for you is to use a multiple choice menu but use the multiple choice option instead of the single choice. However this will only work if you have Boolean responses. Another option might be to have a Text Box with multiple lines that would act as a display that you leave up. Then use a variable Set form user input box to affect it. I'm thinking you could enter a line number followed by a colon and take that input to run thou a tree logic again accumulating lines of string and display the results in the Text Box using the Update Text Box command instead.
  29. 1 like
    Acutally it seems simple but somehow i can´t figure it out. I want to have a macro timespecific while the current date doesn´t matter. The date should be ignored. For time calculations i convert the date/time variable into an decimal variable, right? So for the 19. of June Time 10:45 i get 42174,4479166667. The number left from the comma is the date. The number right from comma is 10:45. How can create a date/time variable without the date portion? Or how can i delete that portion in the according decimal variable? Thanks a lot Alex
  30. 1 like
    If you really have only 100 files, and this is a one-time thing, then don't bother coding the macro to progress through all 100 files. Alan's model macro already arrows down in Windows Explorer to highlight the next file, so just set up a hot key to start the macro again manually. It won't take much extra time to hit the key 100 times, and it will save you significant coding effort. In fact, I would be tempted to break Alan's code up into two separate macros: first (hotkey) macro to do the find and paste -- then you eyeball it to make sure it has really done what you want -- then second (hotkey) macro to save the modified file and arrow down to the next file in Explorer. I say this because, whereever you build in time delays, there is the possibility of Windows screwing things up with an unusually long response time. Better you should do a quick visual check on each file before saving it, so if something has gone wrong you can cancel out without saving and start over with that file. If you were doing 10,000 files, no, but with only 100 play it safe.
  31. 1 like
    Heh. I'm just not feeling the love here. I'll spend my limited time finishing my Craigslist RSS scraper instead. Though I suppose on could argue that will only lead to me spending more money ;-)
  32. 1 like
    Hi Cory I just published a preliminary video on my pgmacros website. It's about an MXPro multiple field utility close to its initial release. Something that was done by myself and good 'ol Floyd way way way back when was not really suitable for today, so it is something new and completely different from what we did for MX3. Maybe there would be some good ideas in it for your .net project. Joe
  33. 1 like
    Out of curiosity I decided to see how quickly I could write a macro to calculate elapsed time. Here is my sample macro: // Get Starting time Date/Time: Set %StartTime% to the current date/time Variable Set Integer %RandomDelayTime% to a random value between 0 and 15 Delay: %RandomDelayTime% seconds // Get Ending time Date/Time: Set %EndTime% to the current date/time // Calculate elapsed time Variable Modify Date/Time: %ElapsedTime% = %StartTime% - %EndTime% Variable Modify Date/Time: %decElapsedTime% = %EndTime% - %StartTime% Variable Modify Decimal: %ElapsedSeconds% = %decElapsedTime% * 100000 // Display result Text Box Display: Result You can copy and paste this into your macro: <COMMENT Value="Get Starting time"/> <DATE/TIME Flags="\xB0" Date="7/3/2014 8:21:49 AM" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%StartTime%" IsDateVar="TRUE"/> <COMMENT/> <VARIABLE SET INTEGER Option="\x05" Destination="%RandomDelayTime%" Minimum="0" Maximum="15"/> <DELAY Flags="\x01" Time="%RandomDelayTime%"/> <COMMENT/> <COMMENT Value="Get Ending time"/> <DATE/TIME Flags="\xB0" Date="7/3/2014 8:21:49 AM" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%EndTime%" IsDateVar="TRUE"/> <COMMENT/> <COMMENT Value="Calculate elapsed time"/> <VARIABLE MODIFY DATE/TIME DateVar="%ElapsedTime%" Option="\x01" LeftVar="%StartTime%" RightVal="%EndTime%" UseInteger="TRUE" MathOpt="\x00"/> <VARIABLE MODIFY DATE/TIME DateVar="%decElapsedTime%" Option="\x01" LeftVar="%EndTime%" RightVal="%StartTime%" UseInteger="TRUE" MathOpt="\x00"/> <VARIABLE MODIFY DECIMAL Option="\x02" Destination="%ElapsedSeconds%" Value1="%decElapsedTime%" Value2="100000"/> <COMMENT/> <COMMENT Value="Display result"/> <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 decElapsedTime: %decElapsedTime%\r\n\\par ElapsedSeconds: %ElapsedSeconds%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="462" Height="133" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> This may be the same or similar as the sample previously referenced. I did not open that sample to compare.
  34. 1 like
    Alien - Not that it helps you any, but these are the problems that were fixed with Mouse Locator in the previous build 4.5.0.1 (Dec 2013): 9. The Mouse Locator now displays the pixel color in separate values for Red, Green and Blue. 10. The Mouse Locator now displays the hexadecimal value of the pixel color in BGR format instead of RGB to match what is normally used by programs that accept hexadecimal values for colors. 11. Pressing Ctrl-C in the Mouse Locator now copies the Screen Position and color values to the clipboard. 12. Made a change to the Mouse Locator to eliminate a problem where the pixel color could flicker on and off even if the mouse is not being moved. 13. Made a change to the Mouse Locator so the values displayed for the Pixel Color are updated if the color under the mouse changes even if the mouse does not move. I have seen no problems on my Vista-home, XP-pro, or Win7-64-pro ... one of these days, I'll get a Win 8.1
  35. 1 like
    Greetings, Using Macro Express Standard. Win7 OS. I have a little over 12 million jpg image files which need to be sorted into predefined folders. Is there a way to script a way I can simply assign a destination folder to numpad1 on through numpad9 for 9 folders which I can have the mouse left click on the image thumbnail, cut, and paste the file into the predefined folder? Even if it's a simple copy/paste I am betting its possible to script a delete function to get rid of the originally copied file. I find it very slow to click/drag image files into appropriate folders or tag each image. If there is a way I can just use my numpad to speed through these files, sorting them, this would be great. If the answer is not with this scripting prog, please clue me in. Thanks so very much. Love MacEx, long time user. ~Rob.
  36. 1 like
    Click the "A" icon to modify the Accelerator...
  37. 1 like
    Hi All, Can any one suggest on how to export the Macro POP UP along with inside MEX files to another user Machine. I have created the Categories ( like department wise ) and under that created Macros and Macro Pop up for each category. In my system Icon tray macro pop up displaying the macro files which are lying under that macro pop up. So, now i want to export the same Macro pop up along with macro files to another machine on single click( or export). In another User machine also if I import the (Exported) .MEX file or Playable file that should import all the .mex files along with Macro POP UP and in POP UP shold dispaly all the macros same as in developer system. deployment process of import /export of macro pop up with .mex files. Thanks, Rk
  38. 1 like
    You might want to consider using named variables in MEP instead of the old ME3 variable arrays. I'd like to suggest that in the future you create a succinct example for review that produces the behavior you wish us to consider. Also you might consider putting your code in Code tags. Thanks for attaching an MEX. Repeat Until %N1% Equals "1" Variable Set Integer %N1% to 1 End Repeat Distilled I see this for the repeat exit logic. And in fact it iterates only once. This means your condition isn't being met. I suggest you put a breakpoint at line 26 (If N5 equals) and look at what the variable value actually is. I bet it's not 16250871. The other thing you can do is enable logging for the macro and see where it's going.
  39. 1 like
    First off stop using the old T variables. Name your variables. Second we have covered this before. I can't fathom why you're still stuck on this. In the external script command there is a field "Save console output to:" Where you specify the variable to errr... well... capture the console output. I can't think of how this could be more simple. See the attached macro. Run it and you should get "Gagan Test" in a message box. Does this make sense now? Also it would help if you provided a simple example of something you are having trouble with. Gagan Test.mex
  40. 1 like
    I don't know but I recommend you ask ISS http://macros.com/contact.htm directly. They are usually very quick to respond.Probably faster than this user to user forum.
  41. 1 like
    I don't know. Generally parameters can be passed in any order as long as their formatted correctly. But I don't know in this specific case. I actually specify the MEX file in the registry. In fact I don't use the 'load on start up' option which puts an icon in the system tray but rather opt to add teh MEX start up to the Run section of the Windows registry. More complex and I have a macro to self manage the files listed but it was necessary to make it work in my case.
  42. 1 like
    You don't know how to edit a text file? Well OK.... I'll do it for you. See attached. WCFG file edited by Cory.zip
  43. 1 like
    For the rest of this conversation let's assume you have the full version of MEP installed on the destination machine. There is no other way. If you have any more questions you can respond by number in my list below. To load a macro file (MEX) simply double click on it. MEX are like Word documents or any other kind of data file. Once installed an association is made to the MEX and MXE extensions. To be clear the user need not have Macro Explorer installed. I envision you email the user the macro, have them save it to their desktop, and double click it. Nothing will appear to happen but it will be loaded. Also understand MEP can have multiple MEX files open at one time. Once loaded any activation you have for your trial macro will be active. IE the hotkey you assigned will now function. There are a series of thing you can do to lock down a user installation of MEP. First you can password protect a macro itself for execution. Second you can password protect the macro file for editing. Third you can use the /B command line switch for "Browse Mode" (that term never made sense to me) at start up which will prevent the user from launching the Macro Explorer from the tray icon. See help section "Command Line Parameters" Just remember to also set this parameter to the normal Start Menu shortcut as well. I think that's the standard lot. I'm sure I've forgotten some part as this is just off the top of my head. I take some extra measures myself where I do not use the Start up Group shortcut but rather launch it from the Run section of the registry at start up. I also have a start up macro that ensures no other MEX files are loaded besides the proper corporate MEX file. It also set's up the environment and does a few tests and reports to the admin if anything is awry. You can run a macro from a command prompt. See help file section "Command Line Parameters". Even from another file that isn't even open. I don't know if that would help in any way. Consider using the Portable Version. See help section by same name. You would need to give her a thumb drive but it would allow you to have her test without having to install the program, load MEX files, or need of a license. .
  44. 1 like
    I don't have a lot of time but I don't see a sort and like Samrae asked this is important. If not sorted I would first sort. Then I would make everything arrays and not use ASCII File process except to load the arrays. I think I posted here once my sort routine. Then I would keep track of the indexes of your high and low marks. EG if you know you're already in the C's no need searching A's and B's. And of course when you find one of course do not continue searching. Another thing you can do with sorted arrays is a binary search. It sounds like a techy word but it's not. You have probably done it before when organizing files. Instead of starting from the first and plowing thru every one start in the middle and compare if it's greater or less than. Or equal of course:-) Then repeat this for each subset. EG for 1000 records compare it first to record 500. If it's less than copare to 250. If it's more than compare to 375 and so on. This decreases the iterations by an order of magnitude.
  45. 1 like
    I can't tell you how many of my clunky short term solutions have never been fixed :-)
  46. 1 like
    Look at the "Calc ulator and Note pad" macro in samples.mex. This sample macro file may be found in the folder where Macro Express is installed. Or you can download it here: Sample Macro Collection
  47. 1 like
    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
  48. 1 like
    Simple. In the IF dialog box simply use the condition "Equals" and leave the comparison value blank. Before you do anything with a variable in MEP the value is null (blank). Now bear in mind when I say null I mean null as a mathematician or engineer would mean it. That is nothing or blank. That is not the same as zero. Zero is a quantitative value. But in computer parlance null is a character. In ASCII it is 0x00 or 00000000. If I remember my CS classes from the 80's some computer systems can not deal with a true blank (zero length) value in memory so it's set to the null character. But in logic it functions just like a logical or mathematical null. To me I like to think of it like the aircraft maintenance manuals I used to use. Inevitably there was a page within that was completely blank except for the sentence "This page intentionally left blank". Of course the philosopher in me saw this as a perfect oxymoron. Anyway I like to think that's how the computers regard the null character.
  49. 1 like
    First, OT, is there any way to use this forum's Search that will allow AND combinations? I'm sure I've successfully used it before, either here or in other IP.Board forums, in the form: clipboard and null or clipboard AND null which would find threads containing both the words 'clipboard' and 'null'. But it seems to deliver results as if I was using OR, so I get hundreds of irrelevant ones. Meanwhile, can anyone remind me how I detect that I've just copied a 'null' or 'empty' value to the clipboard please? I'm sure this has been discussed before but I can't find the practical conclusion. After such a copy (with TextType Ctl+c) my clipboard always contains whatever the last 'proper' string was. -- Terry, East Grinstead, UK
  50. 1 like
    Ahhhhh ShortKeys. No wonder I couldn't find anything about it on Google. I started with Keyboard Express a very long time ago but I've never used ShortKeys as I assumed all the functionality was included in ME. Is this not the case?