Jump to content
Macro Express Forums

randallc

Members
  • Posts

    434
  • Joined

  • Last visited

Posts posted by randallc

  1. Hi,

    Looks great.

    Works for me doing;

    Change Directory/Folder: "C:\Programs\SearchEngine"

    Program Launch: "test3.hta"

    <DOFILE:01:NN:C:\Programs\SearchEngine>><LAUNCHDEL2:0:00C:\Programs\SearchEngine\test3.hta>

    Perhaps you have made the new text file in nthe default directory and couldn't find it? Change directory first?

    Best, randall

  2. Hi,

    [*** This only works, of course, if Wilcards work with your planned "wait file exists" anyway?... do they?]

    1. Is this the sort of thing you are asking? It allows you to set a time to wait in the "Text Box Display: timer"

    Text Box Display: timer

    Delay 100 Milliseconds

    Wait for File Exist: "macex.000"

      OR

    Wait Window Lose Focus: "timer"

    If File Exists "macex.000"

      Window Close: "timer"

      Text Box Display:

    End If

    2. can someone remind me of a more elegant way to time out please; I know I've seen it somewhere.

    Best, Randall

  3. Hi,

    More "MacroExpress" friendly, you can just import the DateDiff.mxe, gives date difference as %N1% (using vbscript)

    if your local dates are "MM/DD/YYYY" instead of "DD/MM/YYYY" you will need to adjust lines 3 and 4

    Date/Time: Save "dd/MM/yyyy" into %T11%

    Date/Time: Save "dd/MM/yyyy" into %T11%

    Then you can simply "If variable" compare on %N1%

    Best, Randall

    DateDiff.mxe

  4. Hi,

    1. Slow, using vbs; are you in a rush? [** Assuming the 3 digits are day number of year and NOT after today!]

    Variable Set String %T11% "210"

    Variable Modify String: Save %T11% to Environment Variable

    Variable Set String %T12% "2005"

    Variable Modify String: Save %T12% to Environment Variable

    Macro Run: DateSerialDiffVBS

    Date/Time: Save "yyyyMMdd" into %T1%

    Text Box Display:

    <TVAR2:11:01:210><TMVAR2:19:11:00:000:000:DateSerialDiff><TVAR2:12:01:2005><TMVAR2:19:12:00:000:000:Year><MACRUN2:DateSerialDiffVBS><DT:yyyyMMddT:01:3:{P0%N1%}{P00000}{P00000}{P00000}><TBOX4:T:1:CenterCenter000278000200:000:%DateSerialDiff%(%Year%)=%DateSerialDiffAnswer%

    N1=%N1%

    Date in T1=%T1%>

    Needs attached macro imported to you current mex library;

    Randall

    [cf previous post for example macro]

    EDIT; Of course, you only have to run this slow vbs once, because it gives you today's "Day of yaer" as sum of original number plus returned "%DateDiff%" from that; so you can

    a. calculate any further differences from today's day number of year for the 3 digit

    b. put them into N1,

    c. put them in the "days back" from today

    <DT:yyyyMMddT:01:3:{P0%N1%}{P00000}{P00000}{P00000}>
    again;

    Best, Randall

    DateSerialDiffVBS.mxe

  5. hi,

    In brief, use "Text File Process" to string, say "T1"/ endprocess loop;

    in the loop ; compare T1;

    Variable Set String %T2% "Not Found"

    // Put in your file path and name here

    Text File Begin Process: "Answer.txt"

      If Variable %T1% contains "Known Good"

        Variable Set String %T2% "Found"

        // Exit here if you only need to find one instance

        Repeat Exit

      End If

    Text File End Process

    Text Box Display: After

    <TVAR2:02:01:Not Found><REM2:Put in your file path and name here><BTFBEG:001:000001:000000:C:\Program Files\Macro Express3\Answer.txt><IFVAR2:1:01:7:Known Good><TVAR2:02:01:Found><REM2:Exit here if you only need to find one instance><EXITREP><ENDIF><BTFEND><TBOX4:T:1:CenterCenter000278000200:000:AfterT1=%T1%

    T2=%T2%>

    Randall
  6. One idea would be upgrading to the latest Macro Express release. Version 3.5e.

    As I said in previous thread, I have had to go back to 3.5d...

    I am not sure what was changed, or corrected, but I think the windows for "copying files" and "deleting files" are behaving differently than before.

    Is this deliberate , and a "fix", or a bug?

    Thanks, Randall

  7. See previous post (first time posted had error; fixed now?...); here is better example; does other math too; [this macro is example to run previous; import both]

    // Example of Trig Functions uses vbs ; output as %TrigAnswer% env variavle; AND as %D1%

    Repeat Until %T1% <> %T1%

      Variable Set String %T11% "Tan"

      Multiple Choice Menu: Trig Functions for ME3

      Variable Set String %T12% "30"

      Variable Set String %T12% from Prompt

      Variable Modify String: Save %T11% to Environment Variable

      Variable Modify String: Save %T12% to Environment Variable

      Macro Run: TrigFunctionVBS2

      Text Box Display:

    Repeat End

    Macro Return

    Tan

    Sin

    Cos

    Atn

    Exp

    Hex

    Fix

    Log

    Sqr

    Randall

    TrigExample.mxe

×
×
  • Create New...