Jump to content
Macro Express Forums


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About lemming

  • Rank
  1. Hi you could achieve this by creating/updating an environment variable which is readable by other macros, for instance, MacroAisRunning=YES. The relevant commands are: Variable Modify String -> Save to Environment Variable Variable Set String -> Set from an Environment Variable For example if you have Macro A and Macro B, you can get Macro A to set MacroAisRunning=YES right after it is launched. Macro B can read this environment variable to check if Macro A is running. Remember to set MacroAisRunning=NO before terminating Macro A. You can also achieve this by saving macro statuses to INI files or text files, though this requires disk access.
  2. lemming

    Odd program behavior

    Hi what is your hotkey? Perhaps Paradox is already using it, so that could be why it won't work there. Try another hotkey, and also check the Pardox documentation/help for a list of its hotkeys.
  3. lemming

    Dual Monitor Control Woes

    This is a known problem and it even affects scripting languages like autohotkey. The obvious workaround is to make the leftmost monitor the main. If your user is not willing to do this, another solution might be to temporarily move the window to the main monitor, perform the needed operations, then move it back to the secondary.
  4. lemming

    Text editing - possibly with Regex

    Hi Terry, I just came across this topic. Hopefully you already have a solution. Anyway, I played around with AHK and came up with a regex one-liner to glean the data you wanted. alltext := RegExReplace( alltext, "s)\[([^\]]+)\.jpg\][^\[]*- COMMENT -.{0,2}\n" , "$1.jpg`n" ) This regex captures the filename in between the square brackets, then it discards everything that is between .jpg and - COMMENT - (inclusive). Whatever that is left is the result you wanted. I've attached a zip with two files, an .ahk file (with comments) and a text file containing the data you posted. Both files need to be in the same folder. Terry data.zip
  5. lemming

    Spurious text entry

    Hi, you could save yourself a lot of trouble and make your script more reliable by launching an Google advanced search URL instead of trying to type in stuff. For instance, here is the direct URL to search for the word "transition" in the site that you listed. https://www.google.com/search?as_q=transition&as_qdr=all&as_sitesearch=http%3A%2F%2Fsupport2.magix.net%2Fboards%2Fmagix%2Findex.php%3Fshowforum%3D113&as_occt=any&safe=images Most of it looks like gobbledegook, but it is quite straightforward. All the stuff after /search? are search parameters and each parameter is separated by an ampersand (&). as_q= is the search word and as_sitesearch= is the domain. You could surf the links below to find out exactly what they mean, but you usually don't need to. Here's what you could do: 1. Do a search with the Google advanced search page as you normally would. 2. Copy the resulting URL from your web browser. It'll be a long URL. 3. In a text editor, remove any parameters that are blank, e.g. &as_rights= 4. The URL can now be launched by MEP, saved as a bookmark, etc. It'll take you directly to the search results without the need to type in search strings. More info: Google Search URL Parameters – Query String Anatomy http://www.blueglass...string-anatomy/ Scroll down to Google “Advanced Search” URL Parameters
  6. lemming

    Years of Timing Issues Over

    Hi does your task involve copying data from Word or other Rich Text program? Or maybe copying from a live web page? If you then paste this formatted data into a text editor, it may lead to unexpected delays. Some editors have a "paste as plain text" option which should make things faster. Other editors like Notepad++ just discard all formatting and will automatically paste as plain text. I don't use Ultra Edit nor Boxer, so I can't comment on them
  7. lemming

    Text-inserting macro

    Yeah, good points. I realize too that more people are using notebooks these days instead of desktops. The alt-code sequences only work with a numeric keypad, and practically all notebooks lack them. You have to press an additional key to toggle a pseudo numeric keypad, so generating an alt-code sequence might require three hands, depending on the keyboard layout! In this case, MEP or Charmap would be useful.
  8. You can just do this with plain old DOS copy command. Assuming all the text files are in one folder and you want the final file to be in the same folder, you just need cd to the right location and type: copy *.txt mergedfile.txt You can also make use of DOS in MEP to achieve similar results - just use Program Launch with cmd.exe, which is the command-line interpreter, i.e. the Dos prompt. You don't have to include the full path for cmd.exe. You can then put these in the Program Parameters: /K copy "C:\Users\Lemming\Desktop\test\*.txt" "C:\Users\Lemming\Desktop\test\mergedfile.txt" The /K option keeps the Dos window open after the command is finished. This would also pause your script till the window is closed. If you want the window to close immediately, change /K to /C. You'll also need to specify the full path for your files.
  9. lemming

    Text-inserting macro

    Or the alt-code sequence - Alt-0176 for ° No macros needed, nor any other program.
  10. lemming

    Global text replacement inside MEX files?

    Hi you could have just created a symbolic link to the old directory (like an alias or shortcut), so your macros could just chug along thinking nothing has changed. The Junction utility from Sysinternals does this: http://technet.micro...s/bb896768.aspx But as Cory noted, it's not a good practice to hard-code directory paths! Update: You can also do this in Vista or Win 7 with the built-in Mklink command: http://www.maximumpc.com/article/howtos/howto_use_symbolic_links_master_vistas_file_system
  11. lemming

    Text-inserting macro

    Whoops, you're right. I've somehow overlooked this option in Macex. Suffix keys would do what Daniel requires.
  12. lemming

    Text-inserting macro

    Hi Daniel, sorry to hear about your injury. I think it may be hard for others to imagine dealing with limited mobility and partial access to the keyboard. Macex does not seem to support the "quick-correct" feature. But anyway, you could also set up similar abbreviations in Microsoft Word - the AutoCorrect feature has been available for years. But I get where you're coming from; I used Superkey many years ago too and that "quick-correct" feature was awesome and I could make it work in any program. The only equivalent these days seems to be AutoHotkey. Since it is a rival product I won't link to it but you can always google for it. You'd want to look at its "Hotstrings" feature (needs Windows NT/2000/XP or later). -Lemming
  13. Hi, you can launch the built-in Windows util systeminfo.exe and capture the output in a variable. However, this util can be slow because it tries to gather a lot of other info about your system. Also it only shows "System Boot Time", so you'd have to parse through a lot of other info and also perform additional calculations to determine uptime. On the plus side, systeminfo.exe is installed on every Windows PC (since Win XP I believe), and you do not have to specify its exact location since it resides in the default Windows path. An easier method would be to use the uptime.exe utility which you can get for free at http://uptimeexe.codeplex.com/ It's a command-line util which does not have to be installed. Just copy it to anywhere. It runs in a split second and will report your boot time and also your uptime. I've written a script that parses the info from uptime.exe into separate variables. You can add additional logic for your purposes. -Lemming System Uptime for TsunamiZ.mex
  14. GNU utilities for Win32 Some ports of common GNU utilities to native Win32. In this context, native means the executables only depend on the Microsoft C-runtime (msvcrt.dll) and not an emulation layer like that provided by Cygwin tools. http://unxutils.sourceforge.net/ Includes classic Unix utils for text search and manipulation with regular expressions (regex), such as grep, sed, awk. Other useful utils include wget, tail, head, sort, uniq, etc.
  15. lemming

    Firefx 'page loading' icon

    In a related matter, I find that for many public websites, the main cause for slowdowns are ads and ad servers, not the main web server or the main content itself. I installed Adblock Plus and FlashBlock and they've significantly reduced the "slow loading" and "not loading properly" problems. If you're accessing a public site which runs ads, these two extensions could help make your scripts more reliable. http://adblockplus.org/en/ https://addons.mozil...don/flashblock/