Jump to content
Macro Express Forums

Leaderboard


Popular Content

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

  1. 3 points
    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 points
    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 point
    You can include end of line character(s) when saving information to a text file. You should be able to save the end of paragraph character once you identify what that character is. The end of line character(s) differ depending on what computer system you are using. For Windows this would be CR followed by LF or CRLF. However, if your destination computer is Linux this may be LF and for Apple this may be only either CR. I will leave it to you to determine which specific character(s) you need for end of paragraph or end of line. To include these characters in your macros use the "Variable Set to ASCII Char" command. This is a sample from my macros that sets variables for CR, LF and TAB. Variable Set to ASCII Char 13 to %CR% Variable Set to ASCII Char 10 to %LF% Variable Set to ASCII Char 9 to %TAB% For more information about ASCII Characters enter "ASCII characters" into your preferred search engine.
  4. 1 point
    This will remove the name that is contained in %T[2]% from variable %[T3]%. Variable Modify String: Replace "%T[2]%" in %T[3]% with "" // Leave the "Replace Text With" box empty
  5. 1 point
    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.
  6. 1 point
    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.
  7. 1 point
    * 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.
  8. 1 point
    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%"
  9. 1 point
    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
  10. 1 point
    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 point
    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 point
    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
  13. 1 point
    Please read the help file under the section Command Line Parameters and check out the /A parameter.
  14. 1 point
    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
  15. 1 point
    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.
  16. 1 point
    This topic has been discussed a lot and there is no simple way i know of to do it.
  17. 1 point
    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.
  18. 1 point
    I messed with a few of those products but gave up on them. Now I interact by generating my own HTTP Requests and manually processing the HTTP Responses. It's sounds really complicated but it was much simpler than I thought. Think of sending a simple ASCII text file to the server and it responding with a simple ASCII traxt file. That's about it. In most cases I use my browser to manually do something like send a form result and capture it with Fiddler. Then I identify the variable part, say a name for instance, and make that a variable in my code. Then I create my own request trying to emulate it. Then capture the response and do what I need to with it. No web browsers involved and super fast and reliable. And since the code didn't run in the web page the measures they take against automation never get a chance to run. And there's no button clicking. If you're ever interested let me know. I give free half hour initial consultation calls as well. And if you take what I give you in 30 minutes and do something for your benefit and I never make any money I'm happy for it.
  19. 1 point
    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.
  20. 1 point
    When did you download the PGM Functions Library? Is the latest freeware version password protected?
  21. 1 point
    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 point
    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 point
    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
  24. 1 point
    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.
  25. 1 point
    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.
  26. 1 point
    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.
  27. 1 point
    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
  28. 1 point
    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.
  29. 1 point
    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 ;-)
  30. 1 point
    Thought I would pass this along to the forum ... Started the new Professional Grade Macros website. Not much there yet, but over the past few weeks I was working on its overall design and layout. The first task was to get all the tutorial videos, as well as the mex library, which were created for the Macro Express Explained book onto the site so people could still get access to them. Over the past couple of weeks there were plenty of downloads. Posted an MXPro article today. - Joe
  31. 1 point
    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
  32. 1 point
    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.
  33. 1 point
    In Variables, choose Variable Set String. Then set the variable to use and "Set Value to File Name (Prompt)" This will open a file selection box.
  34. 1 point
    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 point
    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 point
    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
  37. 1 point
    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.
  38. 1 point
    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
  39. 1 point
    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.
  40. 1 point
    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.
  41. 1 point
    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. .
  42. 1 point
    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.
  43. 1 point
    I can't tell you how many of my clunky short term solutions have never been fixed :-)
  44. 1 point
    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
  45. 1 point
    Proposal - Macro Express Community on Stackexchange Q&A Hi all, Sorry to intrude, but I just started a new stack exchange Q&A area for macro express and would like everyone to pitch in and help get this proposal passed. I'm an avid macro express user, but its really hard to find a good place to get questions answered besides this forum. Please help support the growing macro express community: http://area51.stackexchange.com/proposals/49648/macro-express-windows-automation-tool?referrer=BusOzT0bacooh9wd2t83TA2 Thanks!
  46. 1 point
    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
  47. 1 point
    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.
  48. 1 point
    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..
  49. 1 point
    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 point
    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?
×