Jump to content
Macro Express Forums


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Eg6Xpm18cs

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Taking a screenshot should be a quick and trivial thing, but it's a pain when you have to launch a graphics program just to crop and save an image. This is an on-the-fly way to take and save screenshots, in particular a mouse-defined rectangular zone (screen and window capture are also available), with minimal keyboard or mouse interaction and no lingering background processes. This is a simple macro that calls Lightscreen, a dinky (550K .exe) program, which prompts for a mouse-defined rectangle. After mousing the capture zone, the screenshot is taken and put to the clipboard, a Save As dialog pops up prefilled with default filename prefix, then Lightscreen is killed. Change the Lightscreen settings if you want to do something else, then adjust the macro. You may need to add some delay or key/mouse speed limits if the macro glitches. Screenshooter.mex
  2. This macro facilitates editing, comparing, and cut/paste work between windows. It switches the active window between always-on-top and not AoT with nothing more than a hotkey (default is Ctrl+Alt+T, change if desired). Multiple windows can be toggled always on top simultaneously, and no background processes are left running. The macro uses Topmost Toggle (scroll to bottom of page) which launches instantly, then does a Ctrl+rightclick on the active window's title bar to toggle it, flashes a confirmation, kills Topmost Toggle, and returns the mouse to its original position. Functionality for Windows Explorer was removed at the latest (1.8) revision of TT, so here's the 1.7 version that works with Explorer. TopmostToggle.zip The macro has no delays, waits, or speed adjustments, and I've had no problems; keep this in mind as you may need to add a delay or two if it glitches. AlwaysOnTop.mex
  3. Eg6Xpm18cs

    How to determine if a program is actively running?

    Many thanks paul. Shared the macro here.
  4. This macro can be used to detect when a running program or task is finished, as an alternative to monitoring controls, pixel colors, log files, mouse cursors, etc. A typical application would be a long-running or unattended task where you want something to happen when the task is finished, e.g. sound an alarm, launch another program, shutdown PC, etc. I suppose it could also be used as an alarm when a task hangs. The macro calls the PsList.exe part of the PsTools Suite Credit to poster paul for referring me to PsList and providing guidance on how to use it. The macro calls PsList to interrogate CPU activity, extracts CPU run time from PsList and converts it to seconds, then compares it to the CPU time obtained from the previous repeat loop to determine if the process has stopped, i.e. if current and previous CPU times are equal. In the parameters section of the macro, specify the process name to be monitored, and the paths to your PsList.exe and data file. Default delay between CPU interrogations is 30 seconds. Reliability may suffer if short delays are used -- I've noticed that the CPU Time in Windows Task Manager occasionally pauses up to several seconds.... so if the delay is too short, the macro will prematurely signal the end of processing if a long pause occurs. CPU time can be verified by enabling Text Box Display near the end of the macro. A pop-up showing CPU time will appear right after launching the macro, and at every repeat interval thereafter. Compare the CPU time to Task Manager (add CPU Time column in the Processes tab: View / Select Columns). A drawback is that the command window flashes at each CPU interrogation. I don't know how to prevent this, so maybe someone can chime in with a solution.
  5. Eg6Xpm18cs

    How to determine if a program is actively running?

    Thanks for the pslist / PSTools, but the usage is a bit over me. Did you pass data from pslist to a text file or call up the cmd window first? I can send data to a text file from the cmd window using, for example: pslist -m iexplore -e >pslist.txt but not from Macro Express. Or is there a way to go from pslist straight to ME variables? And then how to parse the data?.... by processing as a text file with ME then using Varible Modify String to extract the characters corresponding to the data columns of interest? TIA for any guidance.
  6. Hi all, Is there an ME-based way to determine if a program is actively running compared to just being open? Seems to me that obtaining the program's memory / CPU usage would be most straightforward. Normally I get button / cursor status, or color pick a progress bar, etc., but in this case there's a big difference between active and resting memory usage so it'll be a reliable indicator. Any comments appreciated.
  7. ME3 isn't loading at startup (no MacExp.exe in Task Mgr). In Preferences it's set to run at startup, and I tried a long wait period to avoid any conflicts with other programs. Also ran virus/malware scans, and finally reinstalled ME, still no joy. In msconfig Startups, ME is listed as a "Common Startup" but not a Registry key. What is a Common Startup? I found no key at either HKLM or HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Seems there should be a key in there. Wouldn't reinstalling have recreated them if they were missing? The ME3 shortcut was in my Startup folder for All Users, but I also copied it to the <Owner> Startup folder, but that didn't help. Any suggestions appreciated. I sure would like to avoid reinstalling Windows.
  8. Eg6Xpm18cs

    Move pointer to selected text on web page

    I also do same, just looking for a more solid approach. My application involves selected text at the same general region on the page, so a line scan works for me.
  9. Is there a way to obtain window titles containing foreign (Chinese) characters, perhaps through a Windows command of some sort? ME apparently doesn't recognize foreign characters, storing them as question marks (?) in variables, so I can't use the "Set Value to Topmost Window Title" command. TIA for any help.
  10. Is there a way to move the mouse pointer to the selected text on a web page? (text selected with Ctrl-F). Moving to the cursor position works great in Word, Excel, etc. but I can't get it to work on a web page, even when the pointer has been "cursorized" using the Caret Browsing mode of IE8. Any ideas? TIA.
  11. Eg6Xpm18cs

    How to Get Control of a Feature Whose Name Changes?

    Now I do have a situation where a control has varying Window Text with a common term in all situations, but I'm not seeing how to extract the text. At first I thought Get Control might allow a partial-text target (the common text), but that's not the case. Appreciate any suggestions.
  12. Eg6Xpm18cs

    How to Get Control of a Feature Whose Name Changes?

    Thank you. I often overlook Capture Control because I got in the habit of using the other methods before learning what Capture did.
  13. Eg6Xpm18cs

    How to Get Control of a Feature Whose Name Changes?

    Unfortunately, no, the names/text can vary all over the map. Otherwise I'll resort to tabbing, Alt-shortcuts or mouse moves/click, but I like to use controls when available, as they're solid and give me more confidence in the macro.
  14. Eg6Xpm18cs

    Activated window doesn't appear

    I can't bring myself to do that because the macro is long and works reliably in all other respects. I did find a straightforward way to activate the document: Assign control to the doc then Set Focus to it. I got hung up thinking I needed to click on the control, so missed the obvious.
  15. Hi all, Is there a way to get control of a feature that can have a different (unpredictable) name each time it is accessed? The name I'm referring to is the "Window Text" in the Get Control Utility tool. Any help appreciated.