paul
-
Posts
1,049 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by paul
-
-
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
-
I doubt I'll have the time to get around to this any time soon. One of my new year resolutions is to avoid fun but time consuming distractions that don't pay :-(
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.
-
I tried that already. In that case the window is in the taskbar.
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.
-
It works fine (kills and restarts), but a DOS-ish window appears saying "Process ending "MacExp.exe" successful".
Is it possible to suppress that window?
Simply edit the properties of the shortcut I suggested you create, and change the Run entry from Normal window to Minimized window.
-
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"
-
The downside is that you must restart Macro Express afterwards. But that is preferable, I think, to rebooting the computer.
Well, instead of invoking TaskKill, simply invoke a batch file whose last command restartes ME!
-
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.
-
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"/>
-
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.
-
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
-
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.
-
In order to help you, we need details. The web page in question would be a good start!
-
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?
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
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?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.
-
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.
-
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!
-
They changed the model in Windows 7. Icons no longer stack in the Notification Area/System Tray.
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?
-
I think I'm having a similar problem. I open an Outlook folder whose window title is "PubContacts - Business in Public Folders - Microsoft Outlook" and then attempt to "Activate" the window using "Partial Match" and the string "PubContacts - Business". But it fails consistently, even if I have just a one-line macro containing the Activate command.
In the past, this has been affected by the existence of hidden windows with conflicting titles. And sure enough, when I look at the hidden windows, I find two additinioal hidden with the same title.
So far, I've never had a need to access hidden windows. They have always just been something I have to work around.
Is there way to tell the Activate command to ignore hidden windows and just activate the visible window?
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.
-
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.
-
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.
-
That's a fantastic mine of information - if only we could pin this text! Thanks Alan, I didn't know any of this.
-
Alt-D will select the address bar, from which you can then tab or shift-tab to your heart's content!
-
Like "degreess" results in the degree symbol.
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.
-
Dude! Suffix option! No need for another app. Read my second paragraph. I do what you want all the time. For instance when I type "hugee" then space it replaces the proper spelling of the French name name "Hugé"
What happens if you type "employee" then space? Do you get "employé"?
-
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.
Can MEX Pro set/change a title of an window?
in Macro Express and Macro Express Pro
Posted
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!