Jump to content
Macro Express Forums

All Activity

This stream auto-updates     

  1. Last week
  2. Text File Begin Process: C:\Users\Me\Documents\tmp.csv Text Type (Simulate Keystrokes): %Value%<ENTER> Text File End Process <TEXT FILE BEGIN PROCESS Filename="C:\\Users\\Me\\Documents\\tmp.csv" Start_Record="1" Process_All="TRUE" Records="1" Variable="%Value%"/> <TEXT TYPE Action="0" Text="%Value%<ENTER>"/> <TEXT FILE END PROCESS/> I have the values stored in a column in the file tmp.csv: A AA AAA etc. The macro outputs each value followed by a new line.
  3. Hopefully I can describe this better. So if i send the %T[3]% it would send the "A" from my .csv in the example above. How would I program the script to go down the list and send AA then AAA, etc from that .csv. The script pulls from the .csv file and inputs the data in the Meditech program. Currently the only way I have found to do it is to put the data directly into Macro Express.
  4. I haven't worked with variable arrays, but I wonder if this would be a good use for one. Like collecting and storing all the lines of text, and then going to the web page and entering them all. ...as opposed to getting a line of text, making your browser active, pasting in the single line of text, going back to your text file, and so on. When you say you're entering them in "a text entry box" on a webpage, what do you mean? Is it a series of boxes, and one line of text for each box; or do you paste the value, then click a button, then paste the next value into the same box? I think the second one would be much slower. Edit: I see now (from your second post) that it is the latter. Probably you have to press <Tab> then <Enter>. You may also have discovered that Shift+Tab jumps you back up to the text box. Depending on the website, there might be ways to have MacEx wait for the site to be ready for the next entry. Maybe the window title changes, or maybe the text cursor changes.
  5. A simple way to repeat, if you know the number of repetitions, is this: Repeat Start (Repeat 10 times) // Do something End Repeat Test this code, which repeats the action ten times, by copying the text below and pasting it directly into the Macro Express Script Editor. Sandwich your own commands between the "Repeat Start" and "End Repeat" statements. You might find it helpful to insert a delay of, for example, 1 second inside the loop, to better see what is happening when you run the macro. <REPEAT START Start="1" Step="1" Count="10" Save="FALSE"/> <COMMENT Value="Do something"/> <END REPEAT/>
  6. I'm taking a line and putting it into an entry area on a website, but then I have to clear what was put in there before adding another line. Not sure if this will work since it doesn't seem like the same scenario that you would normally for what you described.
  7. You're reading a file line by line then you should be using Text File Process or ASCII File Process. No integers. The number of loops is dictated by the number of lines in the file
  8. I'm not a programmer, so others can probably give better answers... I think most implementations have Repeat Until Some steps to do End Repeat. This loops until the "repeat until" is satisfied. You can also have conditional exit points inside the loop. Repeat Until Some steps to do -Does %Var% = XYZ? ---if yes, Break ---otherwise keep going End Repeat. In the Sample Macros file that ships with MEpro is a macro called Repeat Until that uses this "if yes, Break" setup. You can open and dissect it. Note Also: MEp has a pretty good context-sensitive help system. SO you can (for example) click on the End Repeat command in the code or in the list of commands, and press the <F1> button. That section of the help file will popup.
  9. I like to think of myself as a reasonably intelligent person, but for some reason when I start trying to figure out the arguments and commands to repeat a macro, drool runs out of the corners of my mouth and I suddenly wish I paid more attention in high school math classes. Simply put, I am copying values line by line from a text file over into a text entry box on a webpage. I have the mouse positions and keyboard strokes perfectly setup - all I need to do is have this macro run for X amount of times. I see the entry points for this in the repeat start commands, but I start getting mega lost when integers and variables start getting tossed around. I poked around the forums and some of the videos, but none of them seem to match what I'm trying to do. This is a really simple request, but I feel like the application could do a better job holding layman's hands a little more than it does. The verbiage makes perfect sense to people who are comfortable writing formulas, code, whatever you want to call it, but this is pretty damn confusing from where I'm sitting right now. Definitely worth a buy, but I would be stoked if someone could help me out here.
  10. Earlier
  11. Not sure I understand the issue, but the solution may be to output the first value, navigate to the next cell using this: Text Type (Simulate Keystrokes): <ARROW DOWN> ... and then output the next value.
  12. Clever workaround. I used to have a great programmable keyboard that could do something like that -- one key would send keystroke combinations or sequences, so I could start macros by a single keystroke rather than by using both hands and a whole bunch of fingers simultaneously. It's good to know that AHK can do this, and I'm also at a loss as to why it can intercept but ME can't.
  13. Hi Cory. Yes, I have read those posts but I didn't see any that referred specifically to intercepting hotkeys. But maybe I missed that one in which case apologies. My intention in raising this is to be helpful, and try to discover: 1) Whether I'm right about the hotkey problem; 2) If so, whether MEP is likely to be be refined to address this issue any time soon; and 3) To suggest a workaround. My workaround is to use AutoHotKey to capture keystrokes and then run MacroExpress macros. For example, in AHK the script "F9::run, C:\Program Files (x86)\Macro Express Pro 6\MeProc.exe /AMinimise" will react to a user pressing F9 by running my MacroExpress macro "Minimise" which minimises a window. I don't work for AHK and would prefer not to use it. But I do need to use hotkeys in UWP apps and the fact that AHK is able to intercept keystrokes where MEP cannot has me scratching my head.
  14. This has been covered in detail here in several posts. UWP controls do not function, many operations can't be performed, all due to the fact that they are not WinForms. There is very little MEP can do in UWP apps.
  15. In UWP/Windows Store/Metro Windows 10 applications it seems to me that hotkey functionality is very limited. The only two key combinations which seem to me to work as hot keys are those beginng Alt. (not ctrl, winkey or shift), and that single Fn keys cannot be used as hotkeys. Do others also experience this problem?
  16. From an excel .csv how can you send a variable, %T[3]%, which includes multiple rows under it. So: A AA AAA AAAA AAAAA I want to send all of them in the example above. But i seem to only be sending "A". How can i accomplish that? I am sending this variable into Meditech (Healthcare EHR program).
  17. Hi Cory. Did you ever figure out a way to use MEP with UWP apps?
  18. For small amounts of text, it is practical to use Text Type to type the text in from a variable. Typing will be slower than using the clipboard, but perhaps more reliable and predictable. Just don't set the keystroke speed so fast that the "typing" overruns how fast Windows and the application can accept keystrokes. Keystroke Speed: 10 Milliseconds There is a Macro Express "Preference" that applies an automatic time delay after each ME clipboard action. I haven't found it very useful, because to rely on it you must set it for the worst possible case (longest delay you will EVER need), and that will penalize the many macros that need very short delays. Probably better to use a delay command following the clipboard command, as you did, because you can tailor each delay to the particular situation.
  19. rberq: >>>But ME has no inherent way to watch for completion, unless you program it into your script.<<< Is there a way to do that? Additionally, would there be anything to gain by saving the text to a text variable and then have it posted from the variable instead of the clipboard? Thanks for your help. GDZ
  20. Clipboard copy and paste are Windows functions, and Macro Express can't really tell when they will finish. They can be problematical in macros. After all, ME is simply entering the Ctlr-v to paste, like you would enter it from the keyboard. Doing it manually, you watch the screen and naturally you don't go on to the next step until the pasting is complete. But ME has no inherent way to watch for completion, unless you program it into your script. Depending where the data is copied from, and where it is going, Windows does lots of work to format it for the target location. For an example, go to this web page, do Ctlr-a to highlight the whole page including images, Ctrl-c to copy, then Ctrl-v to paste into Microsoft Word. On my machine, the paste takes almost three seconds. https://forecast.weather.gov/MapClick.php?lat=41.7638&lon=-72.6739
  21. All: Unfortunately, upgrading has the same problem. At acantor's suggestion, I used the "Clipboard Paste" command but the problem was the same; the [/QUOTE] command was inserted before the text was placed in the post. By inserting a delay of 750 milliseconds, it worked okay on the test I was running. Following is the code as used and the results: I'm not sure how the "delay" command works. I guess it's possible that if inserting a long text block, it might put the "end-quote" command in the middle of the text. Time will tell, I guess. I wish Macro Express had a command that held up further processing of the macro until all commands prior to that command had completed. If there is such a command, I'm unaware of it. Comments anyone? GDZ
  22. acantor and rberq: To answer your questions: I'm not using Dragon. I'm not using Word. I'm copying text from a post that appears in Chrome and pasting it into a Chrome webpage similar to what I'm writing in right now. The "backquote" is pure text, from a single sentence to several paragraphs of text written previously. The macro got all screwed up when I tried to reproduce it here so following is a screenshot of it" Variable T1 is the name of the person to whom I'm writing that was captured in an earlier macro. Variable T8 is the URL of the post I'm responding to that was captured in an earlier macro. Variable T9 is the forum message number. Variable T8 and T9 formk to the message being replied to Following is a screenshot of the results of the macro. After I wrote my first message, I realized that my version of Macro Express is out of date. I have purchased an upgrade but not yet installed it. As soon as I can get it installed and test this macro, I'll let you know if that makes any difference. Thanks for your help. GDZ
  23. What I often do is make a text box that gets updated and have a 1 second delay so the loop updates the text box every second. When I start, I set a time variable for the desired time in the future. In your case, value a time variable for now then add 10 minutes to it. In the loop, update another time variable with the current time every iteration and compare to the target end time. Then when %Now% is greater than %EndTime%, exit the loop. This method is best if what happens in the loop is time consuming and can vary. But most times I calculate it. 1 second delays and how ever many seconds I need, loop that many times. 600 in this case. There is some time for the macro running, but it's usually minimal and only adds a second or two at the end. And if it's predictable, I'll measure the time it take to iterate 600 times, subtract 10 minutes, and subtract the number of iterations. But this can vary from machine to machine and depending on what the macro is doing. It just depends. If I just want something "about 10 minutes". then this is the quick and dirty way to do it.
  24. I don't fully understand what you are doing, but I wonder if the macro is typing things faster than the application or web form can accept them. You could try putting a one second delay between each TYPE command, and see if the problem goes away. Then start removing the delays, one at a time, until you determine which one(s) are overrunning the application.
  25. I think it's a good idea to embed a time delay within almost every loop. If the macro is watching for a screen change, I usually use a 100ms delay -- 1/10 of a second -- on each pass through the loop. That provides almost instant response in terms of human perception. It also makes it easy to specify how long the repeat loop will run. For example, if you want it to keep repeating for 10 minutes, then 600 repeats with 1-second delays will in theory accomplish that. Or 6,000 repeats with 1/10-second delays. When quick response is not an issue, I have macros that wait 10 or 15 seconds during each repeat. A repeat loop with no embedded delays can eat up a lot of processor power for no particular benefit.
  26. Macro Express executes repeat loops astonishingly quickly. On my computer, repeating nothing a million times takes Macro Express about 3.3 seconds. Repeat Start (Repeat 1000000 times) End Repeat
  1. Load more activity
  • Create New...