Jump to content
Macro Express Forums

paul

Members
  • Posts

    1,049
  • Joined

  • Last visited

Posts posted by paul

  1. In a single text variable you need to store each unique combination of job, code and date, delimited at each end with a unique character. Then present your new data, also delimited with the same unique character, and look for a Contains.

     

    Here's an example:

    After a few mails, T1 looks like this (I use / as my delimiter):

    /Job1,Code1,Date1/Job1,Code1,Date2/Job2,Code1,Date1/

     

    The new mail has Job1, Code1, Date1 so we look to see if T1 contains

    /Job1,Code1,Date1/

    It does, so this mail is deleted

     

    The next mail has Job1, Code2, Date1 so we look to see if T1 contains

    /Job1,Code2,Date1/

    It does not, so this mail is accepted

  2. Perhaps a Repeat within a Repeat would solve your problem? The outer Repeat deals with documents or files, while the inner Repeat deals with the lines within a file. You'd then use the Break command to exit the inner loop when you've finished processing a file.

  3. I think you misunderstand the purpose and mode of this forum. If you take the time and trouble to describe your problem, you'll usually find that one or more people will try to help you, often successfully.

     

    However, I'd be fairly certain no-one is going to rush to email you following the above posting.

  4. NOTE: ALL of this is to work IN THE BACKGROUND. ANYTHING I do in the FOREGROUND (using keyboard to write letters, using the mouse in a paint program, etc...) are COMPLETELY unaware of this script work.

     

    5. Have a certain MSG typed where it clicked (actually a form on the page)

    I believe the two requirements of yours that I have quoted are mutually exclusive. In general, the TEXT TYPE command operates on the foreground window, i.e. the one with the focus, so I can't see how you could achieve what you want.

  5. But to get to the first field in the window I have to start with a mouse click.

     

    How can I make sure that it clicks the same field every time???

    What I do in such situations is to search for the text immediately before the field I want to click on, then TAB to that field. This works well for me until the web form is redesigned (something banks like to do quite often just to keep us all on our toes <g>).

  6. If the IP gets a ping response, it copies files to the corresponding PC using the Admin (C$) share using Xcopy.exe. It's supposed to wait for xcopy.exe to close (wait indefinitely) before running a netsvc.exe command (designed to remotely start a service). The macro is then supposed to wait for that program to close, too, (also indefinitely) before going back to process the next line of the file.

    If you're copying files over the network from one machine to another, I very strongly recommend you use Robocopy instead of Xcopy! Robocopy is designed for robust file copying and is able to recover from errors and retry a user-specified number of times. Although failures using Xcopy are rare, I have seen several instances where a bit has gone AWOL!

    If you are experiencing problems with Wait for Program to terminate, you could try an alternative approach. Within an infinite Repeat loop (e.g. repeat until N1 <> N1), do a Repeat With Processes, testing whether the Robocopy (or Xcopy) process is still running. If it isn't running, exit both Repeat loops, otherwise wait 1 or 2 seconds (use the Timed Delay in Seconds command to minimze CPU usage) and try again.

    BTW, Robocopy is freely available from Microsoft (it's part of the Windows Resource kit, but can be downloaded without having to purchase that offering).

  7. As to something that can return the value of the Caps Lock state, we have had a request from a client to look into it. If we find a solution it will be posted.

    This should be easy to do using VbScript - let me know if you need more details.

  8. Until ME does allow you to enter multiple lines of text in a prompt, why not get your users to enter one long text string using one or more delimiter characters to indicate where a new line should begin, e.g.

    This is my first line\and this is my second (delimiter is \) OR

    This is my first line^pand this is my second (delimiter is ^p)

     

    Obviously the delimiter character(s) chosen must not be used except as the delimiter.

  9. I tried your suggestion, by moving the Variable Restore All Variables to the second line of the macro, where the first line now sets a different variable to some value. This didn't make any difference - calling the macro twice, the first time with parameters and the second time without, still enables the macro to "remember" the contents of the variables passed in the first time.

  10. I wonder if I've found a bug in Meproc /V?

     

    I have a macro M1 with 2 lines in it:

    Variable Restore All Variables

    Text Box Display %T1%

     

    I've run this:

    meproc /AM1 /VT1:Now is the time

     

    and M1 correctly displays the value of the passed in %T1%

     

    Now I run this:

    meproc /AM1

     

    and the same value is displayed by M1!

     

    Shouldn't %T1% (and all variables) have been reinitialized to empty?

  11. I have an MS-Access database table containing about 2000 addresses, that I can't import to an other address management application.

    Access has comprehensive export facilities and formats, so I can only infer that your other address amanagement application is not capable of importing anything.

    Assuming you have opened your Access table/query of 2000 records, each of which has 12 fields to export, you'll need to write a macro structured as follows:

    Repeat 2000 times

    Move to first/next Access row

    Move to first/next other application "row"

    Repeat 12 times

    Activate Access

    Select Access column and copy contents to clipboard

    Move right to next Access column

    Activate other application

    Focus on column and paste new value from clipboard

    Move to next column

    End Repeat

    End Repeat

     

    Does this help?

×
×
  • Create New...