Jump to content
Macro Express Forums

Samrae

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by Samrae

  1. Yes, Windows 10 has assigned many Win+xx hotkeys and Windows does not let them be reassigned by macro or keyboard shortcut programs.

     

    I could not find any description of Win+Z but it is not available for a macro activation.

     

    There are two descriptions for Win+G

    "Opens the Windows 10 Game Bar to take game screenshots and record gaming videos of Windows 10 games"

    "Cycle through gadgets."

  2. ... the main macro gathers the data it needs from a source to determine which of those to call, and then ...

    The problem is that I cannot call a macro by Name because I don't know which macro to call until run time

    If your macro can determine "which of those to call" at "run time" then the technique I suggested should work.

    If Variable %Data% Equals "Something1"
      Variable Set String %MacroToRun% to "Macro001"
    End If
     
    If Variable %Data% Equals "Something2"
      Variable Set String %MacroToRun% to "Macro002"
    Else
      If Variable %Data% Equals "Something3"
        Variable Set String %MacroToRun% to "Macro101"
      End If
    End If
     
    Macro Run: %MacroToRun%
    
    
    However, rberg's suggestions about how to save variable data will also work. I would add that you can use .INI files as well. Depending on what type of information your variables contain, INI files may make the process a little easier.

     

    This article suggests several ways to save and restore variables: How do Local and Global variables work and what is Variable Scope?

  3. you could repeat the entire process 100 times... but I suggest adding more delays, especially when opening and closing windows.

     

    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.

     

    On a similar one-time task last week I used a repeat loop with needed delays. However, to avoid having to spend a lot of time adjusting and optimizing the delays I made them extra large and went to lunch while it ran. In this case there were over 500 items to process and the delays were 3-4 times longer than necessary but, since it was running without any supervision, reliability was more important than speed.

  4. You are correct, Macro Express Pro will not run on Windows RT. It should work on other Windows tablets that are designed to run regular Windows applications. If I understand correctly, the Surface 2 runs Windows RT while the Surface 2 RT Pro runs regular Windows. However, both Surface 3 and Surface 3 Pro run regular Windows.

     

    Here are the system requirements listed for Macro Express Pro:

    • Pentium or equivalent or greater
    • Windows 8, 7, Vista, XP or 2000
      Windows Server 2012, 2008, 2003 or 2000
      (64 bit and 32 bit versions)
    • 56 MB free hard disk space

    As long as the table meets these specifications I would expect that it will work fine. I am curious how it works out. When you decide could you come back and let us know?

  5. Here are some things you could try. I have not tested any of these.

     

    1. At the top of your macro add a command to write something somewhere, in the registry or in a file, that indicates the macro has started. At the end of the macro add a command to remove it.

     

    Have a second macro that runs on a schedule. Have it look for the indicator written by the first macro. If it is there then the macro will know that it started but did not finish. You can then have the second macro rerun the first.

     

    2. Similar to #1, use the "Log Data to File" or "Log Errors to File" command to indicate when the macro started and have a second macro look to see if it finished.

     

    3. Use the "Log Errors to File" command and select the "Do not display error messages (log only)" option. This will make entries in the log file that the macro started, that it had an error, and it didn't finish. Your macro could look at the log file to restart the macro or handle the error as needed.

     

    Note that Macro Express Pro has an "On Error" handler for each macro command. That allows macros to handle error conditions and recover.

  6. Macro Express 3 does not support the Split String command or array variables. The Direct Editor text for macros is different for Macro Express 3 and Macro Express Pro. If you are not running Macro Express Pro you will not be able to use this macro.

     

    Here is what Cory's sample looks like in the Macro Express Pro Script Editor:

    Variable Set String %Sample% to ""TEXT:Alesci Homes Inc" "3" "1" "" "Alesci Homes Inc § § § 3044 S 92nd St § West"
    Split String "%Sample%" on "§" into %Result%, starting at 1
    Variable Set String %Output% to "%Result[4]%"
    Variable Modify String %Output%: Trim
    Text Box Display: Output
    
  7. There is an article with step-by-step directions on how to launch Macro Express Pro as administrator here.

    The topic was mentioned in these newsletters:
    Tip: Run as Administrator (Macro Express News - November 12, 2012)
    Tip: Run as Administrator Redux (Macro Express News - December 13, 2012)

    When running Macro Express Pro as an administrator, programs that Macro Express Pro launches may also be launched as administrator. This newsletter article describes a work around:
    Tip: Run a program as a non-administrator when Macro Express is running as administrator (Macro Express News - December 9, 2013)

  8. pepanee, are you aware of the HotKey that can abort your macros? By default this is Scroll Lock + Pause. You can change it by clicking Options, Preferences, Playback and then the Miscellaneous tab.

     

    This will abort all running macros. I do not know whether or not you can put the abort macros hotkey in a macro. I would think that if you did it would abort the new macro that is running also. I don't have time right now to test that.

     

    The suggestions from Cory and terrypin are similar. You can have your second macro place something on the computer somewhere that the first macro looks for and halt if it finds it (Macro Stop). Cory says to write something to the registry. Terry says to copy something to the clipboard. You could also write to a file. There are macro commands to write to any of these locations and other macro commands to read from them.

     

    However, it might just be easier to manually press Scroll Lock + Pause just prior to starting your second macro.

  9. When cells are copied from Excel CR and LF characters are added to the content of each cell. Let's examine your example:

    00  32 30 0d 0a 33 30 30 0d 0a 31 35 30 30 0d 0a 39 35 0d 0a 31 30 30 30 0d 0a
    

    I do not know where 00 (character NUL) comes from so I won't try to explain it here.

     

    These are hexadecimal numbers.

     

    32 is the hexadecimal value for the digit '3' 30 is the hex value for the digit '0'. 0d = CR and 0a = LF. So your sample data is:

    NUL 3 0 CR LF 3 0 0 CR LF 1 5 0 0 CR LF 9 5 CR LF 1 0 0 0 CR LF

     

    When viewed it might look like this:

    30
    300
    1500
    95
    1000
    

    Cory says he expected to see TAB characters between fields. A TAB or HT is hexadecimal 09. Perhaps whether cells are separated by CRLF or by a TAB depends on the setting in the spreadsheet. I will leave that for you to discover.

     

    It is possible to use the Split String command to separate at the CRLF.

    Variable Set to ASCII Char 13 to %CR%
    Variable Set to ASCII Char 10 to %LF%
    Variable Set String %CRLF% to "%CR%%LF%"
    Split String "%InString%" on "%CRLF%" into %OutArray%, starting at 1
    
  10. Could you use the DateTime variables?

     

    If you want the time 30 minutes in the future from the current time you can do this:

    Date/Time: Set %AdjustedTime% to an adjusted date/time // Set time 30 minutes from now
    
    <DATE/TIME Flags="\xB2" Date="7/3/2014 8:21:49 AM" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="30" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%AdjustedTime%" IsDateVar="TRUE" _COMMENT="Set time 30 minutes from now"/>
    

    If you have the date/time in a variable and it is not the current date/time you could try this:

    Date/Time: Set %StartTime% to the current date/time
    Date/Time: Set %AdjustedTime% to an adjusted date/time // Set time 30 minutes from now
    Variable Modify Date/Time: %DiffTime% = %AdjustedTime% - %StartTime%  // Difference between and 30 minutes from now
    
    <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"/>
    <DATE/TIME Flags="\xB2" Date="7/3/2014 8:21:49 AM" Day_Offset="0" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="30" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%AdjustedTime%" IsDateVar="TRUE" _COMMENT="Set time 30 minutes from now"/>
    <VARIABLE MODIFY DATE/TIME DateVar="%DiffTime%" Option="\x01" LeftVar="%AdjustedTime%" RightVal="%StartTime%" UseInteger="TRUE" MathOpt="\x00" _COMMENT="Difference between and 30 minutes from now"/>
    
    

    Then add %DiffTime% to the date/time you want to increment.

  11. From the Macro Express Pro help topic "Macro Activation":

    VBA Example
    
    HWND hwnd = FindWindow("TMainWin", "Macro Express Player");
    if( IsWindow(hwnd) ) {
      for(int x = 0; x < strlen(s); x ++)
        PostMessage(hwnd, WM_USER+20, s[i], 0);
      PostMessage(hwnd, WM_USER+20, 0, 0);
    }
    else
      MessageBox(GetForegroundWindow(), "Macro Express is not running", "Error", 0);
    
    
    Private Declare Function FindWindow _
      Lib "User32" Alias "FindWindowA" ( _
           ByVal lpClassName As String, _
           ByVal lpWindowName As String) As Long
    
    Private Declare Function PostMessage _
      Lib "User32" Alias "Porterage" ( _
           ByVal Wand As Long, _
           ByVal MSG As Long, _
           ByVal warm As Long, _
           ByVal Parma As Long) As Long
    
    Private Sub Unsacred)
      'Runs a macro express macro
      Const WM_USER = &H400
      Const Command = WM_USER+20
      Const Macroname = "Macroname"
    
      Dim hwnd, I, Result As Long
    
      hwnd = FindWindow("TMainWin", "Macro Express Player")
      For I = 1 To Len(Macroname)
        Result = PostMessage(hwnd, Command, Asc(Mid(Macroname, I, 1)), 0)
      Next I
      Result = PostMessage(hwnd, Command, 0, 0)
    End Sub
    
  12. I am sure that is intentional. What if you have a series of Splits or if you have a variable amount of data? You wouldn't want an entry in, say, T[15] to be left over from a previous split. If the split command did not clear the other elements in the array it would require you to do a Clear Variables command prior to any Split command. That would make your macro even more complicated.

     

    I think it is a good idea to have separate variables for separate purposes. The named variables feature of Macro Express Pro makes this possible. I would suggest that you define an array variable %TimeCode% and not try to use the T variables for more than one purpose. A big advantage of doing this is that the name of the variable describes what is in it. With Macro Express 3 I used to maintain a set of comments (actually Remarks in ME3) that described what the T variables were used for. Much time was spent referring back to that list and fixing problems where the wrong T variable was accidentally used.

  13. The only reason I used the Variable Set to ASCII Char command is to allow the variables to line up in the Text Box Display command. It is purely for cosmetic purposes. You do not need it in your macro unless you too want to line up the variable results.

     

    This creates the variable %TAB% and sets it to the ASCII value for a TAB character.

    Variable Set to ASCII Char 9 to %TAB% // Initialize TAB
    
    Then, if the Text Box Display command contains this:

    Numerator:%TAB%%D[1]%
    Denominator:%TAB%%D[2]%
    Result:%TAB%%TAB%%D[3]%
    Fractional:%TAB%%D[4]%
    
    The results look like this:

    This is a decimal value because the fractional part is not 0
    
    Numerator:	12
    Denominator:	7
    Result:		1.71
    Fractional:	0.71
    
    If you do not use TABs, like this:

    Numerator: %D[1]%
    Denominator: %D[2]%
    Result: %D[3]%
    Fractional: %D[4]%
    
    The the Text Box Display looks like this:

    This is a decimal value because the fractional part is not 0
    
    Numerator: 12
    Denominator: 7
    Result: 1.71
    Fractional: 0.71
    
    You can use spaces but the results may not line up exactly.
  14. You cannot check for a "." in a decimal variable. You could check for "." in a string variable. This is not valid:

    If Variable %D[3]% Contains "."
    
    I think this works the same as

    If Variable %D[3]% Contains 0.0
    

    Use the "Variable Modify Decimal Remove Integer Portion" command. Like this:

    Variable Set to ASCII Char 9 to %TAB% // Initialize TAB
     
    Variable Set String %T[90]%: Prompt // Get numerator
    Variable Set String %T[91]%: Prompt // Get denominator
    Variable Modify String %T[90]%: Convert to Decimal (%D[1]%) // Convert numerator to a decimal variable
    Variable Modify String %T[91]%: Convert to Decimal (%D[2]%) // Convert denominator to a decimal variable
    Variable Modify Decimal: %D[3]% = %D[1]% / %D[2]%
    Variable Modify Decimal: Round %D[3]% to 2 decimal places
     
    Variable Modify Decimal %D[3]%: Remove Integer Portion (%D[4]%)
     
    // Test to see if evenly divided
    If Variable %D[4]% Equals "0"
      Text Box Display: Integer value
    Else
      Text Box Display: Decimal value
    End If
    
    
    Copy/paste this:

    <VARIABLE SET TO ASCII CHAR Value="9" Destination="%TAB%" _COMMENT="Initialize TAB"/>
    <COMMENT/>
    <VARIABLE SET STRING Option="\x01" Destination="%T[90]%" Prompt="Enter numerator" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0" _COMMENT="Get numerator"/>
    <VARIABLE SET STRING Option="\x01" Destination="%T[91]%" Prompt="Enter denominator" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0" _COMMENT="Get denominator"/>
    <VARIABLE MODIFY STRING Option="\x05" Destination="%T[90]%" Variable="%D[1]%" _COMMENT="Convert numerator to a decimal variable\r\n"/>
    <VARIABLE MODIFY STRING Option="\x05" Destination="%T[91]%" Variable="%D[2]%" _COMMENT="Convert denominator to a decimal variable\r\n"/>
    <VARIABLE MODIFY DECIMAL Option="\x03" Destination="%D[3]%" Value1="%D[1]%" Value2="%D[2]%"/>
    <VARIABLE MODIFY DECIMAL Option="\x04" Destination="%D[3]%" Places="2"/>
    <COMMENT/>
    <VARIABLE MODIFY DECIMAL Option="\x07" Destination="%D[3]%" Variable="%D[4]%"/>
    <COMMENT/>
    <COMMENT Value="Test to see if evenly divided"/>
    <IF VARIABLE Variable="%D[4]%" Condition="\x00" Value="0" IgnoreCase="FALSE"/>
    <TEXT BOX DISPLAY Title="Integer value" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 This is an integer value because the fractional part is 0\r\n\\par \r\n\\par Numerator:%TAB%%D[1]%\r\n\\par Denominator:%TAB%%D[2]%\r\n\\par Result:%TAB%%TAB%%D[3]%\r\n\\par Fractional:%TAB%%D[4]%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="335" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
    <ELSE/>
    <TEXT BOX DISPLAY Title="Decimal value" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 This is a decimal value because the fractional part is not 0\r\n\\par \r\n\\par Numerator:%TAB%%D[1]%\r\n\\par Denominator:%TAB%%D[2]%\r\n\\par Result:%TAB%%TAB%%D[3]%\r\n\\par Fractional:%TAB%%D[4]%\\f1 \r\n\\par \\f0 \r\n\\par }\r\n" Left="Center" Top="Center" Width="331" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
    <END IF/>
    
    
  15. The Run Macro in Variable command allows you to perform actions that may not be possible with the standard macro commands. This command uses the syntax from the Direct Editor. This syntax is not the same between Macro Express 3 and Macro Express Pro and it is not converted when a Macro Express 3 macro is loaded into Macro Express Pro.

     

    This macro illustrates this. It was designed to perform some date math to calculate the number of days between two dates. Macro Express Pro has commands that allow you to do this directly using Date/Time variables.

     

    Here is the macro modified for Macro Express Pro. I have changed the macro but have not done any testing with it. You may need to make further changes.

     

    Copy and paste this into a new Macro Express Pro macro:

    <COMMENT Value="Delete files older than %N[99]% days from today >"/>
    <COMMENT Value="Demonstrating run Macro in Variable to set comparison Date stamp string from File details"/>
    <COMMENT Value="Uses variables %T[1]%-T4%,%T[11]%, %T[10]%, %T[98]%, %N[99]%, %N[1]%-%N[6]%"/>
    <VARIABLE SET FROM MISC Destination="%T[4]%" Value="Installation Path"/>
    <MULTIPLE CHOICE MENU Style="\x00" Result="\x01" Dest="%T[3]%" Title="Delete the Files in a Folder?" Prompt="Just Make a List or Delete the Files?" Options="Just Make a List\r\nDelete the Files\r\nMake List and Delete Files" Left="Center" Top="Center" Monitor="0" Width="292" Height="150" OnTop="FALSE"/>
    <ON ERROR/>
    <CATCH ERROR Code="2"/>
    <VARIABLE SET STRING Option="\x00" Destination="%T[3]%" Value="CANCEL" NoEmbeddedVars="FALSE"/>
    <END CATCH ERROR/>
    <END ERROR/>
    <VARIABLE SET STRING Option="\x09" Destination="%T[98]%" Value="Set folder for deletion of some files"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%N[99]%" Value="1"/>
    <VARIABLE SET INTEGER Option="\x01" Destination="%N[99]%" Prompt="Delete files older than : How many days?" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
    <VARIABLE SET STRING Option="\x00" Destination="%T[11]%" NoEmbeddedVars="FALSE"/>
    <VARIABLE SET STRING Option="\x00" Destination="%T[2]%" Value="yyyyMMdd" NoEmbeddedVars="FALSE"/>
    <VARIABLE MODIFY STRING Option="\x11" Destination="%T[11]%" Filename="%T[4]%\\DisplayTemp.txt" Strip="FALSE" NoEmbeddedVars="FALSE"/>
    <DATE/TIME Format="%T[2]%" Flags="\x82" Date="12/30/1899" Day_Offset="-%N[99]%" Month_Offset="-0" Year_Offset="0" Hour_Offset="-0" Minute_Offset="-0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%T[10]%" IsDateVar="FALSE" _IGNORE="0x0002" _ENABLED="FALSE" _COMMENT="* From Macro Express 3"/>
    <DATE/TIME Format="%T[2]%" Flags="\x82" Date="12/30/1899" Day_Offset="-%N[99]%" Month_Offset="-0" Year_Offset="0" Hour_Offset="-0" Minute_Offset="-0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%dtOneDayOld%" IsDateVar="TRUE" _IGNORE="0x0002" _COMMENT="NEW for Macro Express Pro"/>
    <COMMENT/>
    <REPEAT WITH FOLDER Path="%T[98]%" OnlyFiles="TRUE" Destination="%T[1]%" FullPath="TRUE" ProcSubfolders="FALSE"/>
    <VARIABLE SET FROM FILE Filename="%T[1]%" Option="\x00" Date="\x01" Month="%N[2]%" Day="%N[3]%" Year="%N[1]%" Hour="%N[4]%" Minutes="%N[5]%" Seconds="%N[6]%" Flags="\x3F" _ENABLED="FALSE" _COMMENT="* From Macro Express 3"/>
    <VARIABLE SET STRING Option="\x00" Destination="%T[31]%" Value="<DT:%T[2]%\\sT:11:2:%N[3]%/%N[2]%/%N[1]%\\s%N[4]%:%N[5]%:%N[6]%>" NoEmbeddedVars="FALSE" _ENABLED="FALSE" _COMMENT="* From Macro Express 3"/>
    <RUN MACRO IN VARIABLE Variable="%T[31]%" _ENABLED="FALSE" _COMMENT="* From Macro Express 3"/>
    <IF VARIABLE Variable="%T[11]%" Condition="\x02" Value="%T[10]%" IgnoreCase="FALSE" _ENABLED="FALSE" _COMMENT="* From Macro Express 3"/>
    <VARIABLE SET FROM FILE Filename="%T[1]%" Option="\x00" Date="\x01" Month="%N[2]%" Day="%N[3]%" Year="%N[1]%" Hour="%N[4]%" Minutes="%N[5]%" Seconds="%N[6]%" Flags="\x40" DateVar="%dtFileDate%" _COMMENT="NEW for Macro Express Pro"/>
    <IF VARIABLE Variable="%dtFileDate%" Condition="\x02" Value="%dtOneDayOld%" IgnoreCase="FALSE" _COMMENT="NEW for Macro Express Pro"/>
    <IF VARIABLE Variable="%T[3]%" Condition="\x06" Value="Delete" IgnoreCase="TRUE"/>
    <WAIT FOR FILE TO BE READY Filename="%T[1]%" Time="0" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="2"/>
    <DELETE FILE/FILES Path="%T[1]%" Progress="FALSE" Recurse="FALSE" Permanent="FALSE"/>
    <END IF/>
    <COMMENT Value="Just make a list of files to be deleted for now"/>
    <IF VARIABLE Variable="%T[3]%" Condition="\x06" Value="List" IgnoreCase="TRUE"/>
    <VARIABLE MODIFY STRING Option="\x07" Destination="%T[11]%" Variable="%T[1]%" NoEmbeddedVars="FALSE"/>
    <VARIABLE MODIFY STRING Option="\x12" Destination="%T[11]%" Filename="%T[4]%\\DisplayTemp.txt" Strip="FALSE" NoEmbeddedVars="FALSE"/>
    <END IF/>
    <END IF/>
    <END REPEAT/>
    <PROGRAM LAUNCH Path="%T[4]%\\DisplayTemp.txt" Mode="\x00" Default_Path="FALSE" Wait="1" Get_Console="FALSE"/>
    <MACRO RETURN/>
    

    This is what the script should look like (the lines that say "// * From Macro Express 3" should be disabled - with a line drawn through them):

    // Delete files older than %N[99]% days from today >
    // Demonstrating run Macro in Variable to set comparison Date stamp string from File details
    // Uses variables %T[1]%-T4%,%T[11]%, %T[10]%, %T[98]%, %N[99]%, %N[1]%-%N[6]%
    Variable Set From Misc:  "Installation Path" into %T[4]%
    Multiple Choice Menu: Delete the Files in a Folder?
    On Error
      Catch Error: The dialog was cancelled
        Variable Set String %T[3]% to "CANCEL"
      End Catch Error
    End Error
    Variable Set String %T[98]%: Prompt for a foldername
    Variable Set Integer %N[99]% to 1
    Variable Set Integer %N[99]%: Prompt
    Variable Set String %T[11]% to ""
    Variable Set String %T[2]% to "yyyyMMdd"
    Variable Modify String: Save %T[11]% to "%T[4]%\DisplayTemp.txt"
    Date/Time: Set %T[10]% to an adjusted date/time using "%T[2]%" as the format // * From Macro Express 3
    Date/Time: Set %dtOneDayOld% to an adjusted date/time // NEW for Macro Express Pro
     
    Repeat with Folder %T[98]%
    Variable Set From File date // * From Macro Express 3
    Variable Set String %T[31]% to "<DT:%T[2]%\sT:11:2:%N[3]%/%N[2]%/%N[1]%\s%N[4]%:%N[5]%:%N[6]%>" // * From Macro Express 3
    Run Macro in Variable: %T[31]% // * From Macro Express 3
    If Variable %T[11]% Is Less Than "%T[10]%" // * From Macro Express 3
      Variable Set From File date // NEW for Macro Express Pro
      If Variable %dtFileDate% Is Less Than "%dtOneDayOld%" // NEW for Macro Express Pro
        If Variable %T[3]% Contains "Delete"
          Wait for File to be Ready: %T[1]%
          Delete File/Files: "%T[1]%"
        End If
        // Just make a list of files to be deleted for now
        If Variable %T[3]% Contains "List"
          Variable Modify String %T[11]%: Append Text String Variable (%T[1]%)
          Variable Modify String: Append %T[11]% to text file, "%T[4]%\DisplayTemp.txt"
        End If
      End If
    End Repeat
    Program Launch: "DisplayTemp.txt" (Normal)
    Parameters: 
    Macro Return
    
    
  16.  

    My macro file is in the same folder as all the ME executables.

     

    Having your macros in the same folder as the Macro Express program files is not a good idea if you are using a current version of Windows and if Macro Express is installed in a folder under one of the Program Files folders. This was okay for Windows XP but, beginning with Windows Vista, for security reasons, Windows tries to protect files by preventing changes to any of the files located in a Program Files sub-folder.

×
×
  • Create New...