Jump to content
Macro Express Forums

Cory

Members
  • Posts

    4,207
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Cory

  1. I would export the data to a delimited file. I like a tab delimiter better than comma, but either will work. Then I would use the ASCII File Process command in MEP. So the text you want to enter in the fields would be in columns, then they tabs woudl exist in the Type Text command.
  2. You can speak for me too rberg. 😃 And I am the dog.
  3. It seems like the "System Event" activation with the WM_LBUTTONDBLCLK message should work, but I've never been able to figure out how to use the feature. Paul knew how to do them. I even see an old post of his here with mention of one. It's one of the least mentioned activations in the forum and the least documented. I'd like to get one of these to work someday. I think I'll look into it more this afternoon.
  4. I don't think MEP is designed to do such a thing. My first thought would be to watch the Windows messages for an event. I've never tried it. I think this might be the message you woudl want to look for. Or maybe have a macro with a single click activation that has a short delay, that being the period between the two clicks, and when it's run the next time, see if it's running or not. If the macro sees that the macro is running, then do what you want. But I can't remember if one can run a macro concurrently like that. But maybe some kind of trick like that. Maybe the first time it runs it puts a time stamp in the registry and on the second time it runs if less than a specified time has elapsed, then consider it a double-click and run the rest of the macro. I'm not sure it woudl be quick enough though. Depends on the period. A fast double click might not work. Something weird like that.
  5. Many tricks one can do in a web form. Tab counting I used mostly, but sometimes it's variable. So I will search for some text, usually a filed label, then tab from there.
  6. You might fund this useful if you are entering in more than one cell. One can build the block of cells in memory using tabs and CRLF.
  7. Maybe you have the script editor focused and it's copying what you have highlighted. That is the raw text of the delay command. How are you setting the clipboard contents? And why? You should focus your destination control and use the Text Type command where you can opt to paste. Please show your code. Give us a simple example.
  8. It's been a long time but there are options that make it more like a runtime-only installation. For instance there's a NoEditor option.
  9. LOL. Well put. Also I would add that I find that copying all a worksheet or exporting it, then processing it in ASCII File Process and pasting it back in or importing is easier. But of course that's not always an option.
  10. General thoughts: I don't like the macro recorder becasue I would experience similar frustration in cases like this. I advise all newbs to get into directly writing their macros as soon as possible. I advise you look at what it has recorded but also think of how you do it and write the code yourself. Avoid using the mouse. Try writing a test macro as simple as possible that only attempts to do one thing. Keep it as simple as possible and make it independent. Then post it and a sample spreadsheet if necessary here so we can look at it and experiment. Check out F5 "Go To". Ctrl + Space selects and entire column, Shift + Space selects an entire row. Delete will delete the contents. Ctrl + Shift "+" inserts a row. Ctrl + [minus key] deletes the entire row. Click here. In general, explore all the keyboard shortcuts in Excel.
  11. There's another trick one can do to count. Read the entire file in and get the number of characters. Then replace the carriage return or line feed with nothing. Subtract the second length, and that's the number of lines.
  12. It's been a while since I worked in the old MEP, so I might get some things wrong. I would first use Text File Process and count the number of lines and store in an integer variable. Then create an integer variable using Set Random Variable, or whatever it's called in ME. Then use text file process command and use the "Start at" with your random number and set the "Number of Records" to 1.
  13. One might be able to do this in MEP. If you're interested in that alternative to VBA, you might find some help here. I don't follow exactly what the steps are, but sometimes it's good to export the data to a CSV and then run ASCII File Process.
  14. I don't think so but I don't understand. Could you elaborate? And why would you want to slow down your mouse while using your keyboard? I can't think of any time I use my keyboard and my mouse at the same time. What's the application?
  15. I'm willing to bet that if case is changing, it's something your program is doing. An uppercase A is not (shift+A) as some people imagine, it's a unique binary code. My guess is like some apps it helps people who don't use the shift key get the correct sentence case. Maybe try modifying the string to be all lower case just to see what happens.
  16. LOL. One thing that I like to point out for people is that dates are essentially a decimal with formatting options. 1 = 1/1/1900. So if one can't find an extant function, one can make or treat it like a decimal to do whatever is needed. For instance in the past I've had problems showing things the way I want like total hours, colon, and minutes. So I just break it up, multiply by 24, multiply the remainder by 60 into a different variable, and output they two with a colon between them. This way I can show something like 123:45.
  17. I would subtract 7 days. But that seems too simple so I must not be understanding your question. Variable Modify Date/Time > Subtract > Integer or value.
  18. Then ignore all I wrote about using controls. The WebBrowser is one big control. MEP is a great program but it's not well suited for some web page automation. You could do more with iMacros, but then it means learning a more difficult programming language. Sometimes tabbing though a page and using the spacebar can toggle these.
  19. Not that I know of. Not in the way you're hoping. I've not tried it but using the Variable Set Boolean command there is an option to set "If Control" and "Is focused". If the radio button several from the other buttons, that is a separate control, and it's focused when in this state, then one could detect this. Also there's a Get Control Text. There is no text in a radio button, but it might show up as zero and negative one indicating true or false. BTW the text "Carbon steel" is the label and I don't think MEP woudl return it. Also if you use the "Windows Controls" commands you might avoid the problem altogether. MEP Windows Control commands are always the first thing I try. I only resort to keystrokes and such if I can't do it with control commands. If you haven't learned them yet, you should. Hard to experiment with MEP control commands without having access to your program. If this is a web page or a UWP app control commands are useless. You could also get the position of the control and Get Pixel Color relative to the control position to detect if it's blue or not white.
  20. There is nothing like a timer object in other programming languages. Much as you say when doing things like this one should always have a delay in the loop, say 1 minute or even 1 second. Just something to keep the loop from hammering your processor by running as fast as it can resulting in thousands of iterations a second. In practice if I want to check somehting for a limit of 30 minutes I'd just have a 1 minute delay and do 30 iterations. However there is some time to do the process so the actual time will be longer. In most cases I find this is not important. In cases where it was important or the process could run a long time, I'll creates a time variable for now, add 30 minutes, then in my loop have an excessive number of iterations but check each time if we are past the time limit in the variable.
  21. How you manage a token depends on what you are doing and how you want to manage them. I could only waste time wildly speculating. Give us some idea of the flow and control and maybe I could give you some ideas. I think the last one I did the master would check multiple registry values in a loop with a one second delay if it needed to react quickly, and as a scheduled macro if it was longer than a few minutes. I don't understand "Is there no time variable to work with?" There are time variables in MEP, but it sounds like you probably know that already. I don't know if you know this or not but macros can be created that are used like subroutines or an object in a OOP language. Back when I was writing a lot of macros I'd have large categories (as called in Macro Explorer) of macros that would be passed a variable and then do general purpose task, say sorting an array. This way I could use those function/subroutine macros in many macros. If you get into this there's some things you should understand about the scope of the variable. You can ask us then for an explanation. I think I still have a web page on that topic someplace...
×
×
  • Create New...