Jump to content
Macro Express Forums

Yehnfikm8Gq

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by Yehnfikm8Gq

  1. Looks like the weekend Help crew are not up to snuff. I managed to find a solution myself modifying someone else's AutoIt code. Works reasonably well. Below is a demo which puts the full name in %T[2]%: Variable Set String %T[1]%: Prompt External Script: AutoIt Text Box Display: Results <VARIABLE SET STRING Option="\x01" Destination="%T[1]%" Prompt="Enter Partial Tray Icon Name" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <EXTERNAL SCRIPT Language="AutoIt" Dest="%T[2]%" Script="#Include <GuiToolBar.au3>\r\n;Returns full tray button name from partial name passed in param1\r\n\r\nGlobal $hSysTray_Handle, $iSysTray_ButtonNumber\r\nGlobal $sToolTipTitle = $cmdline[1]; param1\r\nGlobal $iSystray_IconText = Get_Systray_IconText($sToolTipTitle)\r\n\r\nIf @Error Then\r\n MsgBox(16, \"Error\", \"Icon not found in system tray\")\r\n Exit\r\nElse\r\n ConsoleWrite($iSystray_IconText)\r\nEndIf\r\n\r\nExit\r\n\r\n;............\r\n\r\nFunc Get_Systray_IconText($sToolTipTitle)\r\n\r\n ; Find systray handle\r\n Local $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')\r\n If @error Then\r\n MsgBox(16, \"Error\", \"System tray not found\")\r\n Exit\r\n EndIf\r\n\r\n ; Get systray item count\r\n Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle)\r\n If $iSystray_ButCount = 0 Then\r\n MsgBox(16, \"Error\", \"No items found in system tray\")\r\n Exit\r\n EndIf\r\n\r\n ; Look for wanted tooltip\r\n Local $iSystray_ButtonNumber\r\n For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1\r\n Local $sText = _GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber)\r\n If StringInStr($sText, $sToolTipTitle) = 1 Then Return $sText\r\n Next\r\n\r\n Return SetError(1, 0, \"\")\r\n\r\nEndFunc\r\n" Parameters="%T[1]%"/> <TEXT BOX DISPLAY Title="Results" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\lang4105\\f0\\fs16 Partial Tray Icon Name: %T[1]%\r\n\\par Full Tray Icon Name: %T[2]%\\lang1033\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="348" Height="119" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> (edit) The AutoIt code is fairly generic for doing things in the Tray which is basically a toolbar. The string search in the above only works if the start of the icon name is used (eg mac in macexp.exe). To search anywhere in the name (eg cex in macexp.exe) replace If StringInStr($sText, $sToolTipTitle) = 1 Then Return $sText with If StringInStr($sText, $sToolTipTitle) > 0 Then Return $sText Below is a variation (working on the start string) which does not give individual error messages from AutoIt but returns "error" in %T[2]% which can be handled in ME. That error includes system tray not found, no system tray icons found, tray button not found. <VARIABLE SET STRING Option="\x01" Destination="%T[1]%" Prompt="Enter Partial Tray Icon Name" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/> <EXTERNAL SCRIPT Language="AutoIt" Dest="%T[2]%" Script="#Include <GuiToolBar.au3>\r\n;Returns full tray button name from partial name passed in param1\r\n\r\nGlobal $hSysTray_Handle, $iSysTray_ButtonNumber\r\nGlobal $sToolTipTitle = $cmdline[1]; param1\r\nGlobal $iSystray_IconText = Get_Systray_IconText($sToolTipTitle)\r\n\r\nIf @Error Then\r\n ConsoleWrite(\"error\")\r\n Exit\r\nElse\r\n ConsoleWrite($iSystray_IconText)\r\nEndIf\r\n\r\nExit\r\n\r\n;............\r\n\r\nFunc Get_Systray_IconText($sToolTipTitle)\r\n\r\n ; Find systray handle\r\n Local $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')\r\n If @error Then\r\n Exit\r\n EndIf\r\n\r\n ; Get systray item count\r\n Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle)\r\n If $iSystray_ButCount = 0 Then\r\n Exit\r\n EndIf\r\n\r\n ; Look for wanted tooltip\r\n Local $iSystray_ButtonNumber\r\n For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1\r\n Local $sText = _GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber)\r\n If StringInStr($sText, $sToolTipTitle) = 1 Then Return $sText\r\n Next\r\n\r\n Return SetError(1, 0, \"\")\r\n\r\nEndFunc\r\n" Parameters="%T[1]%"/> <TEXT BOX DISPLAY Title="Results" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\lang4105\\f0\\fs16 Partial Tray Icon Name: %T[1]%\r\n\\par Full Tray Icon Name: %T[2]%\\lang1033\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="348" Height="119" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
  2. Sometimes the name of a tray icon/tooltip contains information about what the process is doing. That same information may not be easily readable in the application. It would be nice to be able to read the icon name and extract the information. I cannot find a way to do it. What is so frustrating is that the "Mouse Move to Tray Icon" command dialog in the Script Editor lists the entire tooltip for each icon. Unfortunately there is no way to read that into a variable when actually running the macro, ie move mouse to the icon using a partial match and read back the entire icon name. I need a "Set String to Icon Name".
  3. It brings up the issue of what else is in the registry. In my limited travels through the registry I've not come across anything that "goes off the page". Now I wonder. Someone needs to write a macro to find the longest key in a registry!
  4. You're a bit late, the millenium started a while back! hmm, could be referring to over-exhuberance of posting?
  5. I know that some forum members are very enthusiastic about using the registry! I usually prefer text files because you can read them any time you want with ease. Most of us are not aware of all the implications of registry entries. In the case of your macro (correct me if I'm wrong), it appears to write the filenames of every file in every folder that you operate the macro on, into the registry, permanently. Each of those could be 25k filenames (unlimited). Is the registry really intended for storage of huge quantities of information? I think of the registry as holding ini values, mrus, system info and that sort of thing. Not a bulk storage location. Comments?
  6. Back in my post #2 I indicated that you could use something like the mex I posted to flag the event and use "something else" for the specifics. If you want to know what has changed, and particularly where it went, it is not a simple issue. If I were doing this, I would flag the event in ME using the mex file then in Directory Opus I would do a search for *.* and look for files changed within a recent time period. My PC is too slow to monitor all files on the PC with ME. You should check out a current, similar thread in the ME3 forum (which is yours I guess!).
  7. As a quickie for folder size I used GetDirSize in AutoIt (can return size, # of files, # of folders). If you are passing the foldername in a variable from ME (no folder selection dialog needed), it's convenient. Even more convenient in MEPro (External Script). A couple of lines in AutoIt. Easy to add foldername select in ME and display results in ME Text Box if desired.
  8. Perhaps we've assumed too much. Attached is an mex you can import. It will bring up a text message if you add or delete anything in C:\Temp. Remember to delete or disable after use. Excuse the typo in the message!
  9. Re: "The problem only happens when you have more than one macro file open, but you normally have only one macro file open, so why is it a problem? " The problem there is that when I open the next macro, I tell it to close all open macros (as I sometimes have more than one open) so it would close the common macro file too. I could get round it by closing the open macro first then opening the new one "adding to the open macros". It's a nuisance having to do that and so easy to forget. Re "Can you provide a couple of specific examples of what you mean please?" I'm not sure what you're looking for there, the macros are really simple eg a better variant of Ctrl+F for text; converting uppercase to lower case; inserting context-sensitive variables such as %T[0]% with the 0 highlighted. They are things I use all the time whatever I'm doing. As I noted, the best method by far would be to have a user mex that's treated like the System Macros - always there. Any short or hotkeys used would be taken off the available lists for all other macros. I presently have a System (ie MEPro) Maintenance macro file and having a permanent user mex would make global activities much easier.
  10. You see, you had eyeballed it! I wondered if there was anything else going on but the tests I tried were within hours of each other with similar activities on the PC. All activities involving long file searches are slow. I wondered if enabling Indexing Service on the drive would change things but the fact is that searches with Directory Opus are hugely faster. I use Opus to do the "If File Contains.." search and it passes the results to ME which searches for and breaks out the information in the required format.
  11. I have a few macros that I add or would like to add to all macro files. The problem is that if you have more than one macro file open, multiple copies of those macros try to run. You can't use pop-up menus because they are per macro file. You can't add to the System Macros. I can't have a special macro file permanently open with those macros in because normally I only run one macro file at a time. Every File Open I close all other macros. Something like the System Macros but for the user's use would fit the bill. Does anyone else have this issue or a solution?
  12. The Category Box is not that far off OK. You can drag the Macro list to the left if you are not using Categories, but then you lose the name of the active mex files. Re "Agreed. Under File > Reopen (which is what I assume you mean) I can see nothing.." I was referring to the File Open Button with the down arrow dropdown list - same content as the list referred to. I can't understand how that possibly got through testing. Perhaps it's some limit of the authoring software. ME3 does not suffer the problem, in fact the middle of the path is filled with .... to ensure the mex filename is fully visible. Full marks to the ME3 squad. When opening a new file, you get the small Open Macro File dialog, followed by the Explorer-style dialog if you browse and on closing, the Open Macro File dialog is still there. I usually want to see the Open Macro File once, but twice seems unnecessary.
  13. Don't forget to report it to ISS in their "Report a Bug" webpage.
  14. If the company has put security measures in place that hinder work, they have to decide how to compromise. They could for example put most PCs on an internal network (no more twittering!), no outside access. They could lower security locally and provide higher security at their main firewall or more frequent backups. Were ME capable of pushing the button overriding the security, the AV software should detect it as possible malware. That could be handled with an ignore list. If Excel has no simple means of making exceptions that's no fault of ME. Every time you make an exception, you are opening a hole for someone to exploit. If you use ZoneAlarm, you cannot press any of its controls, remotely or with ME. You can only operate them from the attached keyboard and mouse. It's that way for a good reason.
  15. I extracted the Help from the versions I still have on file. ME2.1 did not have a Pause Key setting, ME3.4 did. that's as far as I can go. The four current combos which I already described are Stop: Scroll lock + Pause Win + ' Pause Ctrl + Pause Same for Pause Macro. If there is no setting box for Pause Macro, you are out of luck. You can upgrade for free to the current 3.8 version. I know some people like to stick with what they know.
  16. Isn't this part of the security issue that Paul noted in your other Excel thread?
  17. I'm glad to see at least one other person cares to comment. I'm a button-pusher myself. Hotkeys/shortcuts are more useful to someone working in the two application windows all the time. I find Adobe Photoshop a real pain to use because it has virtually no buttons up top. Every other graphic application does and for most people speeds up work no end. In Photopaint I have 50 buttons across the top (all customizable) plus the Property Bar which is context-sensitive to the Tool. I use the lot and there's no way I'm going to remember that many hotkeys or shortcuts. Perhaps the Side Bar was put there to make life easy for beginners. It's way out of proportion. Unifying text and button sizes would improve the look considerably. Taking your setup, that's fine. You can customize to your way of working - it's always nice to see more of the nitty gritty. I'm in the same camp re wasted space. In Restore Down mode, there is so much wasted space but so much I can't see. The top right, the category box (I only want to see the mex name; I categorize by grouping in Macro Files), the info box at the bottom, the over-sized buttons at left. I suppose now that monitors are becoming widescreen the wasted vertical space is more of an issue. I would like to be able to remove the category box as an option and replace with a short list of open Macro Files somewhere else (like in the huge blank top right of dialog box!). The Category box is 2.5cm of usable width. I'm sure that some people use the box a lot - that's fine but there should be a choice. Just for aesthetics I would run the Explorer bar right across the dialog even if there aren't more buttons. It looks like something is missing from top right. Perhaps others would disagree, no point in having a long bar if it has little on it.
  18. While on the subject of leaving messages for running macros, you could make this into quite a sophisticated setup. Each macro could append a short text string (say to a text file), the first 4 letters of the name, modified if there are conflicts, maybe each in quotes so no recognizable strings are created by adjoining names. The stored string is added to by every joining macro. When each macro checks the file, it uses "If Contains..." to determine whether to stop. If the control macro(s) has to stop a macro, it access the text string, replaces the macro shortname with nothing and saves the new string back to the text file. To bring in another thread, you could then have a macro that read the text string and displayed a list of running macros (taking into account affecting running macros by its presence).
  19. If I'm replying generally to the main thread I use the Reply button at the bottom. If I'm replying specifically to someone, I use the button on their message. Perhaps there are too many "side discussions"?
  20. My question was a hypothetical. I thought that you may have a eyeball estimate from running your tests. In the thread about finding changed file in lists, I found that adding "counter plus if statement to exit the repeat" slowed down the list processing by a factor of 4 which was surprising. The slow down ratio may be dependent on PC setup. Often we want to count number of filenames or lines in file and in ME that also means transferring the info to a variable. The CRLF method for text files may also have significant dependency on PC setup.
  21. For Eppraisal.com you need the Address, City and State. I did not try without State but many city names exist in several States. You did not detail how the State information is presented. The level of automation will dictate how complicated it becomes. Below is a rough outline. I can't spend too much time being very specific because this is a considerable task. It's like asking someone to explain relativity in an hour. You'll have to slog through it and ask for help where necessary. Let's say you have Address, City, State in 3 columns Open "http://www.eppraisal.com" (Text type into browser address bar, enter) Open the spreadsheet in Excel T10=A T12=3 Repeat until T1="" (absolutely nothing, blank) Let's say the first house address is in A3-C3 (see above and bottom for locating first cell) Copy Address into T1, City into T2, State into T3 (right arrow to move between cells) Append "," to T2 Append T3 to T2 (eg Orlando,FL) Activate your browser window Text Type Tab (select with mouse in dialog, it wil appear <TAB>) Text Type T1 Wait for Text Playback Text Type Tab Text Type T2 Wait for Text Playback Text Type Enter Wait for Window Title (partial match on the street address T1, enter as %T1%) Small time delay (0.5 secs) Text Type Tab Tab Tab Tab (should highlight Home Values) Text Type Shift Down Mouse move (directly below, about 1/4 the way up the box, you may be able to push it to 1/2 way) Mouse left click (selects about 4 visible lines of text) Text Type Shift Up Copy to Clipboard Set Variable T5 to Clipboard content Find position of $ in T5, say N5 N5=N5-1 (omit if you don't want the $) Delete part of T5 from character 1 to N5 Find position of character ASCII value 13 (CR - end of line) in T5, say N5 N5=N5-1 Copy part of T5 into T6 from 1 to N5 You could perform a check at this point to check the value has been copied properly (omitted). During testing, put a Text Box Display here showing T6 Send browser back to Eppraisal home page Activate Excel Right Arrow (to D3) CopyT6 to Clipboard (you may have to convert T6 to integer depending on Excel formatting and whether you include $) Paste (into D3) Use arrows (one down, three left) to go to A4 for next address. Alternatively use Text Type Ctrl+G in Excel and enter A4. You can put the starting and repeat cells into a variable T11=T10 (T10 is always A, set before the start of the Repeat) (T12 starting value of 3 set before the start of the Repeat) Append T12 to T11 (A3) - use this to locate cell Convert T12 to integer N12 N12=N12+1 (now 4) Convert N12 to text T12 Next time through T11 will come out A4 Repeat End Save the Spreadsheet etc You may have to allow time for the Eppraisal home page to load. Messing with webpages is fraught with problems. You may have to add lots of small time delays for things to occur. If the address is not found that's another load of logic. Try getting to work first with recognized addresses.
  22. The second task will need some research. For the first, what does the current list look like? A text file with each address on a new line A really long sentence with the whole lot separated by spaces, commas etc Any of the above with the address in quotes If it's a simple text file you can import directly into Excel via File Open and follow the dialogs or Data/Get External Data. Success may depend on any extraneous characters. You can format the spreadsheet after pasting. If there are unwanted spaces etc it will be best to get rid of them before putting in Excel.
  23. Looks like no simple remedy. Thanks for the ideas. I did the "writing to text file, macro name and start time" for some overnight scheduled macros but once they were reliably running I discontinued. I still write the approximate boot time to the file. It's not a big problem for me because I put all my scheduled macros in one file. If that file is loaded all enabled macros are potentially active. Where I may get caught out is doing stuff for this forum where I knock off a quick test macro. There could be a tooltip listing on the running icon. It would be difficult to know what to include. Generally, you could not include scheduled macros (potentially too many). Perhaps if their frequency was less than say 24 hours or a user defined term. I only use a few Activations so I've no idea which ones would show the running icon. All but scheduled? Anyone know? It's the short and sweet ones that could be most problematic - you are unaware of their running and look elsewhere to find why the PC is misbehaving. A tool to monitor or log ME's CPU usage may be a nice-to-have. Food for thought. (edit) I looked at Sysinternals Process Explorer. The context menu for a process/properties/ shows I/Obytes and CPU usage for the process but seems to have a short logging time.
  24. Stemming from other posts about multiple running macros, how do you know which are running? I don't usually run multiples unless I'm at the PC. The tooltip only shows one at most so if you start 6 macros, you've no idea if any have stopped. I can imagine that if you made a scheduled macro for test purposes that briefly operated intermittently, you could forget and be completely unaware it was still running.
  25. Does File/Export/Output Macro Information do what you want?
×
×
  • Create New...