Jump to content
Macro Express Forums

paul

Members
  • Posts

    1,049
  • Joined

  • Last visited

Everything posted by paul

  1. I agree with these sentiments, though I'd make the point that writing a well-designed macro is much more complex than using a shovel!
  2. Using AutoIt, it's a piece of cake! <EXTERNAL SCRIPT Language="AutoIt" Dest="%tOutput%" Script="WinSetTitle(\"AutoIt Help\", \"\", \"My new window\")\r\n" Encoding="0"/> where: "AutoIt Help" is the exact title of the window (case sensitive) "My new window" is the desired new window name
  3. I really do hope that's a smile at the end of your sentence and that you wrote in jest. Otherwise I just find it very sad.
  4. Then you need to read http://www.howtogeek.com/howto/windows/hide-flashing-command-line-and-batch-file-windows-on-startup and download the utility hstart, then edit your shortcut to read: xxxxxx\hstart.exe /noconsole yyyyyy where: - xxxxxx is the fully qualified path of the HStart executable - yyyyyy is the fully qualified shortcut you created. If you're running a 64-bit windows, then use hstart64.exe, otherwise hstart.exe.
  5. Simply edit the properties of the shortcut I suggested you create, and change the Run entry from Normal window to Minimized window.
  6. Save the following lines into a file whose extension is .bat, e.g. C:\MyBatchFiles\RestartME.bat @echo off taskkill /f /im macexp.exe "xxxxxx\MacExp.exe" For convenience, you could create a shortcut to this batch file on your desktop, then simply double-click on that shortcut when you need it. I've simply copied the taskkill line from above, but haven't tested that it works. The xxxxxx should be replaced by the drive and path of the folder that contains macexp.exe, e.g. "C:\Program Files (x86)\Macro Express Pro\MacExp.exe"
  7. Well, instead of invoking TaskKill, simply invoke a batch file whose last command restartes ME!
  8. As has been stated already, Look_Up's response does not provide a solution to the problem because the Switch...Case commands look for equality and do not handle the Contains that was specified in the original question.
  9. You'll need to use the External Script command to achieve your goal. Here's a solution using AutoIt. It displays 0 if no characters between 1 and 9 are found, otherwise it displays 1. Variable Set String %tString% to "1qwertyu4" External Script: AutoIt Text Box Display: <VARIABLE SET STRING Option="\x00" Destination="%tString%" Value="1qwertyu4" NoEmbeddedVars="FALSE"/> <EXTERNAL SCRIPT Language="AutoIt" Dest="%tOutput%" Script="ConsoleWrite(StringRegExp($CmdLine[1], \"[123456789]\"))" Parameters="%tString%" Encoding="0"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang3081{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 %tString%\r\n\\par %tOutput%\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="2" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
  10. Have you installed any new software recently? Do you have any other (recent) problems with your computer? Have you rebooted? Have you installed a new version of Macro Express recently? Could you show us the code of the offending macro(s)? Eventually, you may have to uninstall and reinstall Macro Express.
  11. I have written clipboard copy and clipboard paste macros that had to be foolproof for end users. Here's pseudo-code for what I did in version 3 of Macro Express: clipboard copy set clipboard to an empty string (faster than the clipboard empty command) repeat 10 times either save (shared) specified variable to the clipboard, or clipboard copy read clipboard into variable if successful, exit, else delay 100ms clipboard paste repeat 10 times read clipboard into variable if successful, exit, else delay 100ms
  12. The Repeat with Folder command should meet your requirements. Note that the order of files within a folder depends on the file system in use; with NTFS it should be alphabetical, with FAT it won't be.
  13. In order to help you, we need details. The web page in question would be a good start!
  14. Use the command Program Launch, with these parameters: Program/Path name: C:\WINDOWS\system32\cmd.exe Program Parameters: /c xxx\pslist.exe yyy >zzz\Data.txt where: xxx is the fully qualified pathname where PsList.exe is located yyy is the name of the process you want to monitor zzz is the fully qualified pathname where you want to store the output file I extract the entire contents of data.txt into a text variable, which looks like this: Process information for PHT: Name Pid Pri Thd Hnd Priv CPU Time Elapsed Time Uedit32 6816 8 9 258 20892 0:00:23.665 49:29:22.392 Then you could discard everything before the name of your process and extract the CPU time. Next time you run PsList, you'll compare the new value of CPUTime to the old. Aim to convert the CPU time to seconds,which will make the comparison easy.
  15. You can use pslist (http://technet.microsoft.com/en-us/sysinternals/bb896682.aspx) with the specified process id or name, and parse its output with ME to determine when a process is no longer continuing to consume CPU or memory resources. I used to do this for downloads so that I could sleep my computer at night once all downloads were finished.
  16. I sympathise! It is possible to compile an AutoIt macro into so-called executable code, meaning AutoIt is no longer required to be installed (except on your machine of course). Then you'd have your macro running this .exe to activate the desired window. But, knowing IT departments as I do, I daresay they'd object. How IT was ever allowed to take control of the PC to the extent they have is utterly beyond me (and I worked in IT for several years). I suppose PC should be renamed to IC!
  17. I don't follow. When I made my taskbar deeper (using W7 Pro x64), the tray icons rearranged themselves into 2 rows. What am I missing?
  18. OK, please try this AutoIt code and let me know if it's successful (it works for me with UltraEdit, but I don't have Outlook, and its behaviour may be quite different). Variable Set String %tWinTitle% to "PubContacts - Business" External Script: AutoIt <VARIABLE SET STRING Option="\x00" Destination="%tWinTitle%" Value="PubContacts - Business" NoEmbeddedVars="FALSE"/> <EXTERNAL SCRIPT Language="AutoIt" Dest="%tOutput%" Script="$winnames = WinList($CmdLine[1])\r\nfor $i = 1 To $winnames[0][0]\r\n $state = WinGetState($winnames[$i][1])\r\n If 2 = BitAND(2, $state) Then ExitLoop\r\nNext\r\nWinActivate($winnames[$i][1])" Parameters="%tWinTitle%" Encoding="0"/> How it works (if it does! ): Set %tWinTitle% to the starting text of some visible window (note: it must already be visible, and there should only be one such visible window). The AutoIt code retrieves all windows (titles and handles) starting with the specified string. It then examines each window (using the handle) to determine whether that window is visible. If it is, then it makes that window active. I haven't included any error checking in this code - that can be done later.
  19. Have you considered making your taskbar 2 rows high instead of 1? It releases a lot more space for icons, while having, IMHO, minimal impact on normal windows.
  20. When W7 first came out, I quickly discovered that, just like WinXP before it, the feature to show only selected icons in the tray was unreliable at best. Since I've got 3 monitors, I decided to allow W7 to show all my icons all the time, a total of 20 icons. I also discovered that if the tray icons are displayed in 2 or more rows, MEP can't reliably locate a tray icon using the Move Mouse to Tray Icon command - repeated requests to Insight to fix the bug have produced no acknowledgement of the problem, and no solution to it.
  21. That's a fantastic mine of information - if only we could pin this text! Thanks Alan, I didn't know any of this.
  22. Alt-D will select the address bar, from which you can then tab or shift-tab to your heart's content!
  23. Let's hope you don't have to do that too often - far too much typing for such a paltry result! I think I'd prefer charmap.
  24. What happens if you type "employee" then space? Do you get "employé"?
  25. When I maintained the PGM library, I wrote a macro to edit other macros - each of our macros had a multi-line header which contained data for other functions, e.g. the Help stuff we provided; when we needed to add or change this header information, we had to do it in all our PGM macros, so the only way forward was to write a macro to do this. Your requirement here sounds similar and more straight-forward.
×
×
  • Create New...