Jump to content
Macro Express Forums

redcordial

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by redcordial

  1. Hi Alexis, try this:

    Edited: The variable FileCount is first set to zero.

    Replace "C:\\TestFolder" with the path to your own folder.

    Cheers

     

    <VARIABLE SET INTEGER Option="\x00" Destination="%FileCount%" Value="0"/>
    <REPEAT WITH FOLDER Path="C:\\TestFolder" OnlyFiles="TRUE" Destination="%MyStr%" FullPath="FALSE" ProcSubfolders="FALSE"/>
    <VARIABLE MODIFY INTEGER Option="\x07" Destination="%FileCount%"/>
    <END REPEAT/>
    

  2. Further to my previous post, the problem is not just with imported macros, but can be reproduced

    in MEP by running a repeat loop that calls another macro repeatedly as follows:

    Create a macro using the code below, then create a second macro called "MySub".

     

    The variable "MyVar" will always be zero so the macro will run indefinitely for this test.

    The called macro "MySub" does not need any code in it (leave blank) for this demo.

     

    Open the Windows Task Manager and watch the available memory decrease as the macro is running.

     

    <REPEAT UNTIL Variable="%MyVar%" Condition="\x00" Value="1"/>
    <MACRO RUN Use_ID="FALSE" Name="MySub" ID="-1" Wait="TRUE"/>
    <END REPEAT/>
    

  3. Hi Scasper, I have recently been working on a database of greyhound race results which are stored in a text file. I needed to calculate the start and end dates for evaluating

    a particular set of results. This macro counts back the number of days from today's date. I have set the variable LastNoteDate for the demo.

    The date format can be changed in the date/time variable if required.

    Hope this helps.

     

     

    <VARIABLE SET STRING Option="\x00" Destination="%LastNoteDate%" Value="01 Mar 2009"/>
    <VARIABLE SET INTEGER Option="\x00" Destination="%DayCounter%" Value="0"/>
    <REPEAT UNTIL Variable="%TodaysDateAdjusted%" Condition="\x00" Value="%LastNoteDate%"/>
    <VARIABLE MODIFY INTEGER Option="\x08" Destination="%DayCounter%"/>
    <DATE/TIME Format="dd mmm yyyy" Flags="\xB2" Date="30/Dec/99" Day_Offset="%DayCounter%" Month_Offset="0" Year_Offset="0" Hour_Offset="0" Minute_Offset="0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%TodaysDateAdjusted%" IsDateVar="FALSE"/>
    <END REPEAT/>
    <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 LastNoteDate \\f1 %LastNoteDate%\r\n\\par \\f0 Days Since Last Note \\f1 %DayCounter%\r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
    

×
×
  • Create New...