Jump to content
Macro Express Forums

lemming

Members
  • Posts

    140
  • Joined

  • Last visited

Everything posted by lemming

  1. Even if you could create a toolbar in Macex, there are current limitations which would make it unusable. Mainly the "run only one macro at a time" limitation. That means your toolbar macro has to be the only macro running, and no other macros/hotkeys would work! The alternative is a pop-up menu, as you mentioned.
  2. The hotkey you're hitting is actually the Resume Pause hotkey which will continue a macro after pause. I think it should be renamed to "Resume after pause" or just "Resume macro" to avoid confusion. To pause a macro, you can choose from 4 hotkeys which can be configured under prefs->Playback. (see screencapt) To resume, hit the hotkey mentioned above. Yea, this could have been better documented. -Lemming.
  3. What we need is a public wishlist, so that users can suggest improvements or point out weaknesses in Macex. Right now we only have the "request a feature" page which, annoyingly, requires you to fill in name, email, etc. Plus nobody else gets to see those submissions. A separate wishlist section in this forum would go a long way towards improving Macex. Plus it would greatly reduce duplicate requests, and even eliminate unnecessary requests, if other users can suggest ways of doing it with existing commands.
  4. This posting contains example code for a filename with timestamp.
  5. Hmm, doesn't seem like a good method at all. From the helpfile: Note: This command suspends Macro Express for the amount of time specified. During this time the macro cannot be terminated by pressing the Scroll Lock+Pause keys or by right clicking on the "Running Man" icon in the system tray. Warning: By putting Macro Express into this wait condition, you will not be able to access Macro Express at all, including stopping the macro until the specified time has elapsed. Use this command with caution. Perhaps you could look into the Schedule options instead ?
  6. pcarlow and HeyJim, I've posted a macro which can extract all urls from a Google search page. http://pgmacros.com/community/index.php?showtopic=1043 Just to show what Macex is capable of. -Lemming
  7. This macro will: 1. Load the source html of a Google search result page, 2. extract all urls from the html, 3. filter out Google-related links (e.g. About Google, Advanced search, cached pages, etc), 4. and display a list of urls it managed to extract. This macro only works with Firefox, and I've set the scope for only Google search result pages. You can easily change this, of course. I'd stopped using IE months ago, so I'll leave it to the holdouts to modify this script for IE or other browsers. Should be really trivial though. This script has no error-checking, and may explode if it hits bad HTML. However, this is usually not a problem for machine-generated html code like Google's results. You might also need to tweak the delays for slower machines. To use: 1. Search for anything in Google, using Mozilla Firefox 2. Wait for page to completely finish loading. 3. Hit Ctrl-Tab 4. URL extraction results should be displayed in under 2 seconds. The url extraction works by finding pairs of href="http and "> , which indicate a clickable link for example, <a href="http://www.macros.com/"> -Lemming Clear Text Variables: All Clipboard Empty // Define CR/LF Variable Set %T95% to ASCII Char of 13 Variable Set %T96% to ASCII Char of 10 Variable Set String %T95% "%T95%%T96%" // obtain source code Text Type: <CONTROL>u Wait For Window Title: "view-source" Delay 20 Milliseconds Text Type: <CONTROL>a Delay 250 Milliseconds Clipboard Copy Delay 100 Milliseconds Variable Set String %T1% from Clipboard Window Close: "view-source" Delay 10 Milliseconds // Process urls Variable Set String %T99% "CONTINUE" Repeat Until %T99% = "STOP" Variable Set String %T98% "NORMAL LINK" // Look for href="http Variable Set Integer %N1% from Position of Text in Variable %T1% If Variable %N1% = 0 Variable Set String %T99% "STOP" End If // Delete everything up till first http Variable Modify Integer: %N1% = %N1% + 5 Variable Modify String: Delete Part of %T1% // Look for "> Variable Set Integer %N2% from Position of Text in Variable %T1% // calc length of url Variable Modify Integer: %N3% = %N2% - 1 // copy url Variable Modify String: Copy Part of %T1% to %T2% // Filter out Google links If Variable %T2% contains "google.com" // Indicate this is a Google link Variable Set String %T98% "GOOGLE LINK" End If If Variable %T2% contains "q=cache" // Indicate this is a Google link Variable Set String %T98% "GOOGLE LINK" End If If Variable %T98% = "GOOGLE LINK" // don't add to list Else // append url to T3, with CRLF Variable Set String %T3% "%T3%%T2%%T95%" End If Repeat End // display results Text Box Display: URLs obtained from Google parse_links_v0.2.mex
  8. While the Wait for Key Press command could be used here, it has one major limitation. If the user doesn't press any key within the time frame, the macro will abort. If might be able to remove the abort error message using The Advanced Options, but note that these are "all or nothing" settings which affect every macro.
  9. Sure (see image). The commands involved are Varible Set String and Variable Modify String. If the var is not a string, you can use the convert to text string option.
  10. You probably need to clean up your copied data before sticking it into a decimal variable. Anything that is not a number or period will make it invalid, i.e. set to zero. I'd suggest copying the data to a String variable first, then using Modify String Variable to Trim spaces and Strip CR/LF. Underlining is not copied into a String variable so you shouldn't need to worry about that. But look out for other non-numeric chars like underscores or tabs. You can get rid of those by using the Replace Substring option. And finally, you will need to do a String to Decimal conversion using the Modify String Variable command again, this time with the Convert To Decimal option.
  11. As a kludge, you can use a "Heartbeat" macro which periodically checks if your macro is still running. If it is not, you can just launch it again. K. Peterson has posted such a macro, which involves the use of the Schedule feature. You might be able to modify it for your needs. http://www.macros.com/usermacs/umheartbeat.htm
  12. K. Peterson posted a macro called "Heartbeat" which involves the use the Schedule feature. You might be able to modify it for your needs. http://www.macros.com/usermacs/umheartbeat.htm
  13. You could create a macro that does nothing, then assign that to the hotkey(s). An example would be a macro that only has one line: Delay 6ms or even just a Remark (comment). In addition, you should also use the Scope field to limit the hotkey to only certain programs or windows.
  14. It's probably some limitation in your "report not available" code. Since you did not post any of the code, it is hard for us to diagnose. But I'm guessing it is a timing issue, or you did not account for stray dialog boxes which occasionally appear. I'm also guessing you're not around when the bug happens, which makes it hard to debug. If you're unable to hang around to debug, you could try making a screencapt just before the suspect code in your macro. This way, you can check if the correct program has focus, if there is a stray dialog box, etc. Here is some generic code for a screencapt with timestamp: Date/Time: Save "hh-mm-ss" into %T1% Text Type: <PRTSCR> Delay 30 Milliseconds Clipboard Save Graphic: "Debug %T1%.jpg" Delay 30 Milliseconds
  15. 1. If you're refering to keystroke speed, you can use the KeyStroke Speed command. Macex can send keystrokes too fast for some programs. The default value is 0. Larger values will lead to slower keystrokes. 2. Yes, the contains will match any substring within T3. For example, if your command is IF T3 contains fun, it would be true if: T3 = Let's have some fun. But it would also be true if: T3 = The funeral is scheduled for today. So make sure this is what you intended. Note that there is also an Ignore Case option to narrow/widen the match.
  16. Did you want a dead stop ? If so, there is the Abort Macro hotkey which by default is Scroll lock + Pause. If you want the macro to interrupt what it is currently doing, and do something else, that would be harder.
  17. I see the problem. Perhaps this script may work for you. It just reads whatever url is in the IE address bar, then plugs it into the Wait for Web Page command. However, it will only work if the url in the address bar is correct. If your site is very slow, the script may retrieve a blank (no data) or it may retrieve the previous url. Either way, the Wait for Web Page command will get wrong info. To test this script: 1) load any slow web page in IE. 2) while the page is still loading, make sure its url is in the address bar, and press Ctrl-Keypad5. 3) If the script works, you will get a "Page loaded" text box the moment it is finished loading. Delay 10 Milliseconds // Get the address bar control Get Control %C1% (Internet Explorer: Edit) // retrieve url in address bar Variable Get Control Text: %C1% to %T1% Delay 10 Milliseconds // wait 30 sec for web page Wait for Web Page: "%T1%" Text Box Display: Page loaded! Wait_for_any_web_page.mex
  18. You seem to need a lot of self-referencing in your macros. I have a feeling it may not be necessary. Perhaps you could provide more details about what you're trying to achieve, then we might be able to suggest a different, better way of doing it.
  19. Variables are not stored between different macros, i.e. there are no "global" variables. That is one of the major weaknesses in Macex. You can use the Variable Save command to do what you need. However, it is a really kludgy solution. For example, if you have two macros and want to pass data back and forth. Basically, you need to issue a variable save command in the first macro. Then you issue a variable restore command in the second macro. To pass data from the second to first macro, you reverse the process. In addition, the variable save/restore command has its own limitations. You can only save/restore all text variables at once, which means you have to be careful when you restore because it will overwrite all existing variables from T1 to T99. Like I said, a real kludge.
  20. If your macro is properly structured, then there is no need for "anything between". Macex will continue on with the next command if the IF T3 contains statement is false. If one of the statements is true (T3 matches something), then one of your macros will be run. After that, any remaining IF statements will still be evaluated, but nothing will happen, assuming T3 doesn't match anything else. The question is: what do you want done if T3 doesn't contain any of the text you're looking for?
  21. You can also try the Control Panel Run command which would give you direct access to Internet Settings.
  22. If you can break down the conversion procedure into repeatable steps, then you might be able to use Macex. The Macro Explorer itself is macro-able.
  23. Why not use a variable, say N11, for all your Set Delay statements? That way, you only need to change N11 once. Pict included:
  24. This is not the Win xp command prompt right? I don't recall such a shortcut for Win xp. Anyway, if you're using a 3rd party terminal prog, it might have hooked itself after Macex. You could try the Tool->Restore Keyboard Hooks command by right-clicking on the Macex icon. from the helpfile: Restore Keyboard Hooks It is possible for other programs which are run after Macro Express to improperly install themselves into the system wide Windows keyboard hooks. This causes Macro Express to no longer be able to monitor keystrokes. This option will reinstall the Windows keyboard hooks used by Macro Express so that Macro Express will have the first look at the keystrokes and will be able to monitor the keystrokes again.
  25. You're probably getting some other characters which are not visible. Try this Text Cleaner script. It cleans up the T1 variable; modify as necessary: // Null char Variable Set %T90% to ASCII Char of 0 // Bell Variable Set %T91% to ASCII Char of 7 // Backspace Variable Set %T92% to ASCII Char of 8 // Tab Variable Set %T93% to ASCII Char of 9 // Escape Variable Set %T94% to ASCII Char of 27 // Delete Variable Set %T95% to ASCII Char of 127 // strip CR/FL Variable Modify String: Strip CR/LF from %T1% // strip other non-printables Replace "%T90%" with "" in %T1% Replace "%T91%" with "" in %T1% Replace "%T92%" with "" in %T1% Replace "%T93%" with "" in %T1% Replace "%T94%" with "" in %T1% Replace "%T95%" with "" in %T1% I got the ASCII chart from here. Text_Cleaner.mex
×
×
  • Create New...