Jump to content
Macro Express Forums

rberq

Members
  • Posts

    1,203
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by rberq

  1. I have seen this behavior on rare occasions, but don't recall that I ever really figured it out. A few things to try: 1) Set keystroke speed to a reasonable value -- I generally use 30ms, but that's just an arbitrary value. 2) If you are using the Text Type option that pastes from the clipboard, don't use it. 3) Try typing a few blanks, then type the same number of backspaces to get back to the beginning of the field, then type the real data. That has worked for me sometimes. I know, it's sort of a Mickey Mouse fix, but if it works ...
  2. Thanks for the clarification. I was far more concerned about an IF statement not working, than about the cursor business.
  3. Thanks for the feedback. It's really strange that the "IF ... ELSE" in your original example didn't write anything to the log.
  4. Maybe have the macro check file date and time, and only attempt to copy those that are a few minutes old??? Those not old enough will presumably be processed the next time the macro runs. Command "Variable Set from File" can be used to obtain file information.
  5. I have used "If Mouse Cursor is Internet Navigate" with no problem. Haven't tried with If Arrow. There are several update versions of ME 3 beyond 3.8a. You can download and install them if you are licensed for version 3. Insight web site will have descriptions of the fixes in each release. Maybe there is a fix for your situation. P.S. Add another "write log" just BEFORE your " If Mouse Cursor is Arrow -> write log Else write log ", to make sure there isn't some other logic in your macro that is bypassing this code entirely.
  6. Read from the ASCII file and put the values into variables like T2, T3, T4. Then in the Multiple Choice Menu instruction, enter %T2%, %T3%, %T4%. When the macro runs, the menu will display the values. Variable Set String %T2% "T2 value" Variable Set String %T3% "T3 value" Variable Set String %T4% "T4 value" Multiple Choice Menu: test This example is from ME version 3, but ME Pro should be similar.
  7. The rename instruction does NOT simply assume that the path to "new-name-folder" is the same as the path to "old-namd-folder" -- though logically, what else could it be? So, before the Rename Folder instruction, use Change Directory/Folder to set the working folder to D:\Pelit\Steam\steamapps\common Alternatively, specify the full path for the new name in the Rename Folder command.
  8. win+m says minimize all. win+d says show desktop. According to this link, there is a subtle but significant difference, because some minimized windows are still there, just not visible. https://superuser.com/questions/357226/whats-the-difference-between-the-win-d-and-win-m-shortcuts/357228
  9. Hmmmm. Sorry. That's an option in Macro Express Version 3. Apparently "focused" is the ME Pro equivalent.
  10. Set Scope to Global. Set the Activation property to Window Title "Program Manager". That should cause the macro to run whenever the Program Manager screen gets focus. When setting Window Title, if you click the Browse button, it should show you the names of available windows to select from. On my system (Win 7) Program Manager is always in the list because it is lurking in the background. Setting Scope "Global" ALLOWS the macro to run in a particular window, but does not MAKE it run. Setting the activation property is what triggers the macro to run when the window appears. Once you get it working, you could try setting scope in addition to activation -- in theory it shouldn't hurt anything. Edit: OOPS! Sorry! I re-read your last post and I see you already have an activation. So forget what I said about setting a Window Title activation. But DO try changing Scope to Global. If still no good, try "If Program Manager is On Top" rather than "If focused". If still no good, try a different activation, such as a hot key combination -- though I'm grasping at straws with this suggestion.
  11. In Windows 7 it is "Program Manager". I don't know about Windows 10, but you could try that ....
  12. Variable Modify String: Convert %T1% to integer %N1% convert text variable to integer variable Variable Modify Integer: Dec (%N1%) decrement integer variable Variable Modify Integer: Convert %N1% to text string %T1% convert integer variable back to text variable
  13. Only solution I can think of is for the macro to check the screen resolution and apply a formula to the mouse coordinates. Write a separate macro to do the math, that you can call (run) from your main macro -- otherwise you will get tired coding the same logic over and over. Don't know if it will work, but it's easy to test. Variable Set Integer from Screen Height / Width
  14. See my post earlier in this thread. I should have highlighted the phrase Direct Editor so it would stand out. The approach worked for me, but I haven't used it extensively.
  15. It's hard to say without knowing specifically what edits are required -- but Variable Modify String commands can accomplish a lot, so that would be my first choice. Without some examples, I don't know why you feel it won't work. As a second choice, paste the data into Notepad as you propose, but have your macro run as many of the edit commands as possible, rather than do them manually. That's a lot faster than you can type, and a lot less drudgery, as long as the same rote commands can be used every time. If there's some THINKING involved for special situations, handle those situations manually after the macro has done its work.
  16. Thanks for the tip. I just found that will work for me on a web page that changes frequently. It's also considerably faster than the technique I have been using.
  17. You have a loop within a loop. The outer loop is ASCII File Begin Process. The inner loop is Repeat With Variable Using N1. So yes, get rid of the line “Variable Set String %T1% from File: Testdat.txt" because each time through ASCII File Begin Process the next line of your file will be loaded into T1, which is what you want. Regardless of which line of the ASCII file has just been read, I think “Variable Set String %T1% from File” picks up the FIRST line all over again. That would explain why it always repeats 4 times regardless of what the file contains in subsequent lines. Also, I would recommend converting from text to integer with command Variable Modify String: Convert %T1% to integer %N1% rather than Variable Set %N1% to ASCII value of %T1%. In case %T1% contains blanks or newline/carriage-return characters, trim it before doing the conversion to integer.
  18. I find that keystroke speed of 30ms is satisfactory for most screens: Keystroke Speed: 30 Milliseconds Also, in the Text Type command there is an option to "Use Clipboard to Paste Text". I don't know if you are using that option -- I avoid it because it seems to fail too often; don't know why.
  19. 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?
  20. 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.
  21. 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.
  22. 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.
  23. I remember that "Play macro indefinitely" because I also omitted for my first repeating macro, and that was my whole problem.
  24. 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.
×
×
  • Create New...