Jump to content
Macro Express Forums

rberq

Members
  • Content count

    655
  • Joined

  • Last visited

  • Days Won

    29

rberq last won the day on July 7

rberq had the most liked content!

Community Reputation

11 Good

About rberq

  • Rank
    Expert

Contact Methods

  • ICQ
    0
  1. Shortcuts extremely slow

    How slow is slow? 1/4 second response, 4 second response, what? Also, when Macro Express is running, are there any long-running macros or resource-intensive macros that could be sucking up processor time? With ME running, if you go into Windows Task Manager, can you see any processes using a lot of resources -- CPU, disk, memory?
  2. I think you are on the right track, and I see no reason why your approach shouldn’t work. Your fixit macro should be able to do all the following with keystrokes (which are easier than figuring out where and when to click the mouse). Be sure to insert reasonable time delays between the Text Type functions, so your commands don’t outrun the Explorer and Editor functions. Set Keystroke Speed to a reasonable value. Arrow down (in Explorer) to next macro. Enter (to edit the macro). Alt-v followed by i to enter the Direct Editor. Ctrl-R followed by appropriate values to set the replacement, followed by Tabs to highlight the Replace All button, and ENTER to do the replacement. ESC a couple times to close the replace dialog box and the “not found” box if any. Alt-s followed by l to save/close/return to macro explorer. Like Cory said, don’t rely on magic numbers. No way would I start this macro and ask it to run 545 times. Too much can go wrong, mostly in terms of Windows timing, and once your macro is out of sync with ME Explorer, who knows what havoc you may wreak? I’d suggest making a good backup of your macro file, and letting the macro repeat ten or twenty times maximum, requiring you to restart it for additional iterations.
  3. Integer seconds to yyyymmdd-hhmmss ?

    Yes, I did include a sample script in the post. MsgBox(DateAdd("s",30,"31-Jan-10 08:50:00")) is a complete script. That one line is the entire text (script) file that my macro built. The display is NOT a Macro Express message box, it is a VBScript message box. A macro was used only to write that one line to a text file, to save the text file with the .vbs filetype, and to launch Windows WSCRIPT.EXE which runs the script file. You can simulate this manually by building and saving the one-line script file with Notepad, then typing "WSCRIPT.EXE filename.vbs" at a command prompt or the Windows "Start" command. For your purposes, a message box output is useless, so do some Googling and copy/paste file-building logic so that the (1) macro builds a bigger script, (2) the macro launches WSCRIPT to run the script, (3) the script writes the computed date result to a (second) text file, then (4) the macro retrieves the text file containing the result. It seems convoluted, but after you get it working you may come up with a simpler method. In my mind, the biggest advantage of using VBScript is that Microsoft has already written hundreds or thousands of lines of code to make DateAdd do accurate calculations that span day-end, month-end, year-end, etc. P.S. Getting familiar with Visual Basic and similar object-oriented languages IS painful for somebody used to step-by-step logic. I have suffered through it and have very far to go, probably will never get there at my advanced age. But it is worth it, so get going. Google is your friend.
  4. Integer seconds to yyyymmdd-hhmmss ?

    This isn't two lines, but it's not many: Macro builds a text file containing the VBScript command DateAdd, with the appropriate number of seconds added to the date/time that the macro provides. For example: MsgBox(DateAdd("s",30,"31-Jan-10 08:50:00")) adds 30 seconds to the starting date/time and displays it in a pop-up message box. That one line is the entire text file that the macro must build. Macro saves the text file as testscr.vbs Macro uses the Program Launch command to run wscript.exe, passing it “testscr.vbs” as its parameter. This can be done easily with ME. It has the advantage that Microsoft’s VB Script language does all the date calculations for you – no small matter when you consider leap years, leap centuries, additions that take you from one month or one year to the next, and so on. I have used MsgBox for my example, and you can use it for testing. But for your live macro you will probably want to find a different VBS function that sends the result to another text file where you can retrieve it further down in your macro – or sends the result to some other easy-to-access location. I don’t know what VBS function to suggest, but starting from abject ignorance (almost) I got this far in half an hour, so you can take it from here. Keep us posted.
  5. A scheduled macro never runs

    I remember that "Play macro indefinitely" because I also omitted for my first repeating macro, and that was my whole problem.
  6. Probably what you see on the screen is Macro Explorer, which lists all your macros and allows you to double-click to edit them. Macro Express runs independently of Macro Explorer. Macros can run regardless of whether you have Macro Explorer active or not. At the top of the Macro Explorer screen, select Options | Preferences | Appearance. Set Show in System Tray and a block letter "M" will appear when ME itself is running, regardless of whether Macro Explorer is running or not. If you have ended Macro Explorer, you can restart it by clicking once on the system tray icon. Or right-click the icon to get a list of options, such as starting the Editor (Macro Explorer), terminating Macro Express (AND Macro Explorer if running), etc. Options | Preferences | Startup also allows you to specify whether Explorer (also called Editor) is to start (or not) when Macro Express itself starts.
  7. A scheduled macro never runs

    Can you post a screen shot of the Set Schedule box for your macro? Also what did you specify in the Scope tab for the macro? Also ME Options | Preferences | Scheduler settings?
  8. Speed It Up, or Slow It Down

    Set your scheduled macro to run every second or two seconds. Adjust ME preferences so the Scheduled time is at least as short as the macro's interval. When your scheduled macro runs, check an environment variable or something of the sort which contains your preferred page-turn interval. Based on time, if the interval hasn't yet elapsed, don't hit the page down key. Write two new macros triggered by the (+) and (-) keys, who job is to bump up (or down) the page-turn interval stored in the environment variable. Instead of checking time, you could hit page down every time through the scheduled macro, or every second time, or third, or tenth or whatever. Or have a never-ending macro that loops indefinitely (Repeat loop) with an embedded adjustable delay each time through the loop. Still requires storing some sort of status or interval by means of other macros triggered by (+) and (-). But why would you want a feature like that? Reminds me of a speed-reading class I took, where a sliding shutter came down over the page line by line to force you to stay concentrated to keep ahead of it. It worked, but reading was no longer any fun.
  9. Waiting for Key Press - more choices

    Since you are using a message box, could you instead use the "Multiple Choice Menu" Dialog? I do have a possible solution for the situation you as presented it, but it is way more complicated -- have your primary macro start two other concurrent macros, one that waits for A and one that waits for E, and code a Repeat loop in the primary macro waiting for a signal from either one of the waiting macros. You can wait for "Any key" to be pressed. It's too bad Macro Express doesn't insert the pressed key into a text variable -- then you could check whether it is A or E and re-issue the wait if not.
  10. Announcement: Macro Express v 3.11a

    Thanks for the notice. Still happily running ME version 3.
  11. ME essentially does keyboard actions and mouse commands, and they apply to the active window. So I don't think it can do what you want. For your sake, hopefully somebody will prove me wrong! If you have a dual monitor; or if you can shrink the Explorer window down to a small footprint that shares the screen with your active application, it could work. But your active window would briefly lose focus while Explorer is active.
  12. Yes, Sam. Simpler than my routine and should be just as effective. I still recommend trimming the remaining title.
  13. If the data is consistent -- that is, name portion is exactly the same in both databases -- perhaps you could use the length of the name. Variable Modify String: Right Trim %T72% (get rid of trailing blanks in name) Variable Set Integer %N72% from Length of Variable %T72% (length of name into variable N72) Variable Modify String: Delete Part of %T73% (starting position 1, length N72) Variable Modify String: Trim %T73% (get rid of leading and trailing blanks in title) If the names are not identical between the two databases, it becomes vastly more complicated.
  14. Larger Region To Look For Color

    See if you can struggle through making my macro or acantor's work for you. You will learn a lot. If you give a man a fish you feed him for a day ....
  15. Very clever! Thanks for posting this. So, are you saying this works without the Program Manager screen temporarily replacing JPEGView? Or do you mean Program Manager flashes up and is replaced by JPEGView so quickly that it is no longer a problem?
×