Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,206
  • Joined

  • Last visited

  • Days Won

    61

Posts posted by Cory

  1. I must be missing something. WHen did the OP say that where the dates were coming from? Until they respond, I don't see the point of spending time on it.  Let's see what they indicate the source it. Then it should be a couple of date commands and whatever command to do something with theURI.

    That's the other thing. What do they want to do with the URI? If they're using HTTP GET command then one might not even need a string variable for the URI.

  2. Of course you can add and subtract days. This complexity and using other apps is not necessary. Date/Time is at its core a decimal is one needs a more sophisticated operation. But just look at the Variable Modify Date/Time. You can add or subtract an integer value and select that to represent a second, day, month, year... 

    image.jpeg.a0cf10893fbb7146edec525319811362.jpeg

  3. I see one big problem in your original code. You don't have any delay in your repeat loop. This is a terrible practice. Use at least 100 or 1000 ms. It can get behind and suck up huge amounts of CPU. Try adding a delay. 

    Also does the command to shutdown the computer work without the loop? I was thinking you might need ot run it with administrative privileges. Some commands just won't work without them.

    YOu might have addressed this before, but there's a space in "If Not Window"

    Also be aware that MEP is not capable of Unicode. Needs to be only ASCII/ANSI. 

  4. MEP = Macro Express Pro. It's the software this form is dedicated to. 

    MEP has commands to manipulate files like moving them without using File Explorer. If MEP moves the files it knows when it's complete and can go to the command to shut down. All commands > Files and Folders > Move File/Files. Or whichever manipulation you are performing. There is a help section on it to get you started. 

  5. Also using names is handy. See your name manager in the Formula tab. Doing A1:B2 is in most cases stupid. If you're referencing it , it's significant and shoudl have a name. Also much nicer in formulas. Besides many obvious reasons, named regions can change shape and you don't need to update your macro.

    Aside: If you haven't learned to use tables [Insert > Table] and named resources in Excel for tabular data, stop now, spend an hour and learn. You will thank me later. And your forehead will be red from constantly slapping yourself there and cursing yourself "Why didn't I learn this sooner!"

    Back to my thing is that a table will have a name and the headers are the column names and can be used in formulas and such, but most importantly they change shape, usually having more rows. But with F5 if you reference the table "Clients" you will get all the clients no regardless of how to row or column count changes. And if you want part of it like Clients-Name then you can get just that column, and when someone inserts a new column left of it, you don't miss. 

    Aside: Also a reason for using named references in formulas. Not to mention something like a VLookup is much easier to understand in your formulas. You don't have to remember that the third column is the name, you just see "name" and know what that part of your formula is doing. 

    Aside: Stop using Vlookup. Xlookup was designed as it's replacement and is much easier and more capable and easy to learn. It's like using the Index/Match function combination, but all wrapped up in the ideal single function. 

  6. In larger batches and processes with MEP I would break it down into multiple processes. So instead of doing steps 1, 2, and 3 for each record, I'd do step 1 for all records, verify the integrity of the data, then move on to the next steps. Often I'd learn that my idea was flawed because of an unknown and it saves me time often. 

     

    If my client insists on working in Excel, I typically use F5 to select ranges. Then I process the range like a tab file in MEP. And I keep the data in MEP until it's all done then assemble it as tab data in a variable, use F5, and paste it in that way. It limits the switching back and forth to one cycle. 

  7. Generate the POST form data and send it directly to the web server using an HTTP POST request. No browser required and about 100 submissions per minute. 😁

    Just kidding. Sorry could not resist. 

     

    Bust seriously now folks...

    First thing I'd do is to export the table to a tab delimited file and use the ASCII Text File Process command. The results could also be saved to a test file, and I'd create a data link query in Excel to that file that I'd then perform a lookup for in the original table. Therefore there will be no MEP interaction with Excel and I can use the workbook to monitor progress. 

    Then I'd open a new web page each time and tab to the fields and fill in the fields. Then I'd hit the home key and tab through all the fields and copy to compare that all the values match.

    Then click the submit button and wait for confirmation and log the result to file. Ctrl+A is useful.

    Put this all in a retry loop inside the main loop. 

    I'd also run this on a VM or mule machine with no other apps to reduce disruptions. 

    Sometimes I make the delays variables and use a factor. Start with a large factor, then reduce is iteratively until the reliable limit is reached. 

    Some other things I'm not recalling now as it's been a long time. Lots of window activations. 

×
×
  • Create New...