Jump to content
Macro Express Forums

Yehnfikm8Gq

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by Yehnfikm8Gq

  1. Is it possible that ME is not the root cause? It may be it is an application that is particularly affected by something else. I usually run Sysinternals' Process Exlorer and Filemon to get a feel for what is going on. Regmon often looks a bit like Filemon output (it's amazing how much activity ZoneAlarm has). I've only been able to plot a useful course of action a couple of times but you never know. As a guide for my PC, I see ZA activity all the time. Other applications and Explorer.exe occasionally. Directory Opus continually accesses folders (far more than Explorer) but does not access the Registry very often. In the quiescent state, ME appears in Filemon once in a blue moon, Regmon about once a second.
  2. They are guilty as hell. It's like saying hacking is not a crime "because your firewall was not good enough" or I broke into your house "because you didn't use a deadbolt". Also, you don't have to sign a promise not to commit a crime to commit one. It's clearly an intentional denial of service, whatever law that goes down to.
  3. Here's an update on my multi-point pixel match macros (not that anyone probably cares!). I have the macro working well, running PixelSearch as a standalone AutoIt exe in conjunction with ME. Here's what I've developed/found: Mapping A hotkey ME macro maps the 4x4 grid (presently 3 pixel spacing) to the right and below the chosen pixel. A Multi-Choice Display gives the option of entering X and Y for the reference point (followed by Variable Set Integer dialogs) or using the mouse position. A dialog tells you to place the mouse in the spot you want to find. Hit OK and it records the colour value at each point of the grid into a text file, together with the grid spacing. Also the x, y of the mouse location for reference and testing only. If part of the grid is off the screen at the edge, it substitutes -1 in place of the colour value and tells you that it will now be a 12 point match (or less) rather than the full 16. At present this will not occur left and top edges because the grid is right and below the mouse point. Using A separate macro is used for the search running an AutoIt exe (AiT). At the moment the search area is set via dialog but could be written into the macro. Presently based on screen position only, not window position. The macro reads the map and puts the colours into an array. The target colour is converted from Decimal BGR to Hex RGB and into an ini file with other info. It starts up the AutoIt exe file which reads the search area boundaries, the grid spacing, the colour to search for and colour variation (currently 0). It takes about 1 sec on my old PC to start up the exe, less than 1 sec to scan the screen if nothing found. The exe searches for the first colour occurrence. If not found it tells ME via the ini file the search failed. If found, the X and Y are passed to ME which checks the colour at the bottom right corner of the grid (2 point match). If not a match, ME tells AiT to find the next occurrence. If there is a 2 point match, it then does the 16 point match. If matched, a dialog tells you a match is found; whether it's 16 point or less and the X,Y location. If not matched ME tells AiT to continue the single pixel search. This could all be done in AiT but I have chosen to put as much in ME as possible. Where the grid goes off the screen, all the comparison values that were set to -1 during mapping are ignored (ME puts them equal to a full match) Usage Issues 1. As rberg intimated, sometimes using the top left grid pixel is not ideal. You may want to use another, or even random. That complicates the search macro considerably. Where part of the grid is offscreen right or bottom edge, it would be better to use bottom right rather than top left as the grid reference. Also, scanning backwards from the bottom right corner may be desirable. That is easy to do in AiT. Were I doing this for commercial reasons I may have incorporated these. It's too much work when doing for fun. 2. To quote the obvious, the larger the search area the longer it may take to scan. I found that searches can be very long if you choose the wrong pixel. Very quick if the pixel is unique or has one or two occurrences. Every time a pixel is matched, AiT tells ME, ME does a check, tells AiT to continue all via ini. Using the Registry is about twice the speed on my PC. If the entire row is the same colour, AiT is using PixelSearch pixel-by-pixel which is very inefficient. Choice of target is important. See "Additional Tools" para. 3. If you incorporated colour variation, the search could be very long. At that stage I would do all the number crunching in AiT since it has the built-in colour variation parameter. Doing it in ME would be a pain. 4. To go to search by window would not be that difficult but is simply a lot more code to write so I have not bothered. Pixel location macros are best done with a fixed display for repeatability eg application fullscreen. 5. Forms and icons are more problematic since colours tend to be uniform and appear many times. Reducing the search area helps considerably. Additional Tools I found that moving the reference point may change the number of pixel matches from 1200 to 1. Clearly it helps to use a unique pixel. I wrote a macro that you would use prior to any mapping. You put the mouse at what you think is a good location. ME starts an AiT External Script which quickly scans the screen from 0,0 to the reference point and tells you how may occurrences (and presently/optionally lists an array with their X,Y). Currently it stops at 500 occurrences (to save time) and tells you it's not a good choice. For less than 500, the X,Y are copied to the Clipboard. I have to tidy up the code and will probably post. There's a heck of lot of it.
  4. I've been playing with Pop-Up and Floating menus. They seem to be very useful for multi-user applications and for hotkey "multipliers" (one hotkey effectively gives up to 36 new hotkeys). What I've found very annoying is an extension of the "Import a revised macro" issue. If you revise the master copy of a macro and import to a Macro File, it is imported without overwriting the old version - you have to delete that as a separate action (whether manually or by maintenance macro). Unlike ME3 you don't seem to get a warning that a hotkey (for example) already exists. You don't get a warning that the macro name already exists and no option to overwrite the existing. That in itself is annoying. The next problem is if the macro is on a Pop-Up or Floating Menu. When the old version is deleted, whether before or after the import, the item disappears off the Menu. You have to edit the Menu to add it back. Has anyone any workarounds for this? Along with the lack of Global Replace, it's another area that needs to be improved for maintaining MEPro systems. I suppose in the multi-user environment one would replace the entire edited mex file rather than importing the revised macro to each PC.
  5. As I'm liable to do, I'm not answering the question but pointing in another direction! I'm not saying that you don't need to have ME Explorer completely out of the picture. You definitely don't have have it visible to run macros, in fact in multi-user situations I would have thought it undesirable. There are several areas that you should look at. I've already mentioned Pop-Up and Floating Menus which are simple to set up and extensively described in Help. There's a limit of 36? macros per menu which may be good enough - you can always split menus into two or more. I've never used them but within 2 minutes I had all the macros from one Macro File on a Floating Menu (stays visible when the macros run) and a Pop-Up Menu (activate with hotkey and disappears when macro runs). You don't have to worry about Categories because you can't see them - they are not on that format of menu. You don't need hotkeys either - if you choose the Name and Scope option, there is a letter against each macro. Press A and the A macro runs. I'm guessing for most uses, Pop-Up is better than Floating because the menu is inactive unless popped-up. You don't need ME Explorer window visible unless you have some admin to do or writing your own macros. You would start up ME with Explorer minimized to the taskbar and use say a hotkey to bring up the required Pop-Up. You can have multiple Pop-Ups with different sets of macros listed on each etc. The second item is Command Line parameters (described in Help). If you have other people using the macros you may want to start ME in certain way. With the /A<nickname> parameter you could have the most-used Pop-Up menu appear when ME is started; or the most-used Macro file. You may want to use /B to stop others modifying macros. Maybe even the /T where ME is an icon in the system tray (running but minimized to tray). When you were talking about the System macros appearing out of order I thought you were talking about Categories. You are referring to the actual macros, not the Category. One explanation of that is "All Categories" has been selected, so you will get every macro in every Category appearing in the list, in whatever order you designated - Name/Scope/Activation etc.
  6. That's usually where you already defined %20% as a Text Variable and are trying to use it as an Integer Variable, or some other combo of types, or you did not bother to define the variable. Usually the first time you enter a variable name, if you do not Add it to the list for the type, it prompts you. If you decline, later you will get error messages. Rather than type %20% in the input box (and not register the variable), click the Variable button, enter 20 at the top and follow instructions.
  7. It was another variety of denial of service but one in which the perps gained financially. It's not that different to swarming a large company to profit from any drop in stock prices. It shows that we need to be spending way more on investigating and prosecuting computer fraud. If you are writing programs of those capabilities, you must be aware of the ramifications so you are as responsible as any white collar fraud, or the getaway driver at least. If you are an employee the liability for what you program at work with authorization is your employers. Anything else, you are responsible. Going into the programming business on your own is a huge liability. In a forum such as this, I'm not sure where liability goes. It would probably be judged as "participant beware" or Caveat lector.
  8. What makes no sense to me is the Category order. Although I don't use them, they are always in alphanumeric order. I added a bunch of Categories to test. Every time I restarted ME it opened with the last-used. Ditto for reboots. I cannot get them out of alphanumeric order. If you are concerned with order, make sure no other Categories are lower in alphabetical order than your System and X Categories. I'm sure that's what you do. There are a number of applications starting lower than "S" eg Word, so you may have to add a prefix like zSystem or (Zystem!). Other than that there is no way to hide categories. The only way to hide other sets of macros is to put in separate Macro Files as I do, but that doesn't work if they have to be available to run. Have you given any thought to dispensing with ME Explorer being the main interface - have it open minimized. Why not make pop-up or floating menus for the users? I haven't used them myself - I use ME Explorer with no Categories so I don't have your issues. You can also make a Multi-Choice Menu system listing all the tasks and each task runs a macro. You don't have to see ME Explorer at all. If you have four applications, hotkey say Ctrl+W brings up the menu for Word, on which you can select the macro to run. Pop-us may be neater.
  9. I'm confused too! In para 1 you are talking about user macros. In para 2 you are talking about "my" macros. I assumed they were different things: Each user had a set of macros and that's all they needed. "My" macros referred to your maintenance macros and did not need to be anywhere but on your PC. ...plus four "subroutines" that are called by other macros (reduces errors as if there's a problem, I just fix the subroutine one time and don't have to fix all the macros), plus the default "System" macros.... What are these "other" macros? Part of the user's normal set; part of your maintenance setup that is on every PC, or just on your PC? If those subroutines have to be on every user PC, then they will be accessible by everyone. You could put those subroutines in another Macro File (and load that file when needed) but if they have to run with the normal macros that won't work. .......except that I have four sets of macro files, for accomplishing the same tasks working with four different programs, so the user gets the file appropriate for the program that he/she is using..... With my idea you would make it Bill Word.exe, Bill Excel.exe, etc one for each program. I don't use Categories, every task has its own category by Macro File: Web Page Design, Text Processing, Catalogs etc. It sounds like you have the System macros in a Category of their own rather than having them in the main macro listings. For users can't you put them in a separate Category and arrange the Category names so that the normal macros are the default (like you prefixed with 'X'). If they are getting in the way, put them in with one of the other Categories. Considering the hotkeys, they are unlikely to be activated by accident! I've no idea why your selected Category is changing. When I test my setup, it always opens with the last Macro File and the last Category used. That is the default as far as I know and would be fine in most circumstances including yours. Other than that, someone else will have to chip in on Category use. ....While I'm editing and going back and forth with different macros, sometimes the System macros appear, covering up some of my macros..... That sounds the strange (corrupt?) and I'm not sure how they cover up "some"; surely it's all or nothing? Otherwise same comment as previous para.
  10. I'll leave the subject of Categories to others. I don't use them and maybe you don't have to either. Why not give each user their own Macro File eg Bill.mex, Lucy.mex loaded with their macros, no Categories? That way each user only has access to their macros and ME always opens at their setup. You would have your system Macro Files to yourself and transfer changes to user Macro Files as needed. Some thought would be needed as to how to do that with minimum effort. Depends on number of users and frequency of updating. If they are always the same for everyone, you update a master copy say master.mex . You write a macro to save master.mex as an mex file per user's name, Bill.mex, Lucy.mex. Each update of the master you run the copy macro and then simply replace each user's file. In doing that you could also arrange each person's macros in their own Categories if it was a good idea to do so. Otherwise, just one list of unassigned macros.
  11. How can a process be focused? Surely it's either running in the background with everything else or it has a window? There's process running as an Activation. I assume you check Activations to see what there was so perhaps I'm missing something.
  12. I'm assuming that plain Ctrl+key does not work. Sometimes the down and up help. Sometimes separate steps help. There's no fixed rule, it depends on the PC behaviour. Trying to do too much at once can lead to problems. You start off with the simple Ctrl+key. If that does not work, split the Ctrl into Up and Down. If that does not work split Text Type into logical parts. If that does not work add time delays between them.
  13. I've never tried, someone else will have to answer. This is from Help: "Screen Savers will prevent a Timed Macro from operating correctly. Focus cannot be given to a program if a screen saver is running. Also, the security measures built into the "Lock Workstation" function of Windows NT, 2000 and XP will prevent Macro Express from executing a macro."
  14. Agreed the Hex conversion is easy. It's just a bunch more code. Once it is sent to AutoIt it gets converted to decimalRGB. AutoIt's colour tolerance is a decimal number for each 0-255 colour value. That's pre-programmed as a parameter: PixelSearch ( left, top, right, bottom, color [, shade-variation [, step [, hwnd]]]. The PixelSearch in AutoIt is very fast but it is designed to scan a rectangle and find the first occurrence. I'm having a few debugging problems getting it to work with multiple occurrences. For comparison, in AutoIt if I increment x and y to do a search it takes 13 secs for the screen. PixelSearch does it in less than one second. If running from ME, it takes about one second for the AutoIt exe to start. I expect to have some time delays handshaking between the two apps. Work still in progress.
  15. In lieu of more expert opinion, the running man has been a problem for most of us. Your problems seem more extreme. As an interim measure you could try Process Explorer as an emergency alternative to the crashed Taskbar. I do not know if it will start up and show processes under your circumstances. Their pskill looks like it may be a good candidate too! Although the PE link is MS, SysInternals used to be an independent group that wrote a whole suite of useful tools. You can find the latest info and links here. (edit) I can't say this will work for anyone else but this is what I tried: Copy pskill.exe into the Windows folder Start/Run (the one bottom left of screen) Type: pskill -t macexp.exe This kills exp and edit processes
  16. The bottom line for me is that this is something that is long overdue in both versions of ME. If users can fiddle something, it cannot be too big a stretch for ISS to add. ME3 is more of a problem because it has no Goto command (which is also very useful for streamlining code).
  17. This is the ME3 forum. "Wait for" are all dead-end. I had a post prepared for the MEPro forum since there's not point in posting here.
  18. This is related to a post in ME3 forum related to waiting for more than one event. I did not see much point in point in posting in that forum. Here's a crude method of having alternative "Wait For" states. I've used two key presses as it's easier to demonstrate. Because the time resolution is at least 1 sec per item, it's not very responsive. Keypresses work best by tapping the key. I'm not sure if anything like this has been posted - if it has here's a reminder. The ding is just to give an indication it's looping (change to your choice). The macro loops ignoring errors and skipping the GoTo commands. When a key is pressed the macro jumps out of the loop to do the desired actions. :start Sound File: DING.WAV Wait for Key Press: A On Error Catch Error: The condition was not met within the specified amount of time Goto:SKIP KEYPRESS A End Catch Error End Error Goto:WHATEVER YOU NEED TO DO 1 :SKIP KEYPRESS A Wait for Key Press: B On Error Catch Error: The condition was not met within the specified amount of time Goto:SKIP KEYPRESS B End Catch Error End Error Goto:WHATEVER YOU NEED TO DO 2 :SKIP KEYPRESS B Goto:start :WHATEVER YOU NEED TO DO 1 Text Box Display: Key Press A Macro Stop :WHATEVER YOU NEED TO DO 2 Text Box Display: Key Press B Macro Stop <LABEL Name="start"/> <SOUND FILE File="C:\\Program Files\\Macro Express Aux\\DING.WAV" Wait="FALSE" _PROMPT="0x0007"/> <WAIT FOR KEY PRESS Key="A" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="1" _HANDLE="0x0014"/> <ON ERROR/> <CATCH ERROR Code="20"/> <GOTO Name="SKIP KEYPRESS A"/> <END CATCH ERROR/> <END ERROR/> <GOTO Name="WHATEVER YOU NEED TO DO 1"/> <LABEL Name="SKIP KEYPRESS A"/> <WAIT FOR KEY PRESS Key="B" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="2" _HANDLE="0x0014"/> <ON ERROR/> <CATCH ERROR Code="20"/> <GOTO Name="SKIP KEYPRESS B"/> <END CATCH ERROR/> <END ERROR/> <GOTO Name="WHATEVER YOU NEED TO DO 2"/> <LABEL Name="SKIP KEYPRESS B"/> <GOTO Name="start"/> <LABEL Name="WHATEVER YOU NEED TO DO 1"/> <TEXT BOX DISPLAY Title="Key Press A" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <MACRO STOP/> <LABEL Name="WHATEVER YOU NEED TO DO 2"/> <TEXT BOX DISPLAY Title="Key Press B" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <MACRO STOP/>
  19. All the "Wait for" commands are "dead ends". You cannot go anywhere else until the condition is met. Loops are out of the question with "Wait for". In ME3 you don't have the choice of running more than one macro or using Catch Error as a crude switch for the two "Wait for" commands.
  20. The last section refers to the "Other" menu. What is that? Further up the page you set %strMenuName% to "Finance Menu" before running the toggle macro. Is that the same thing as "Other"?
  21. No you cannot. It would be interesting to write a macro that took a maths expression in plain text via Set String with Prompt, and make the calculation using ME commands. Shouldn't be very difficult since + - x(or*) / are easy to separate from numbers. Brackets may be more awkward to handle.
  22. Thanks for the reference. I have written a number of colour conversion macros from other threads, I have no idea about speed. The problem is that ME only reads in decimal BGR so you would have to convert to Hex BGR (RGB is an unnecessary step). The tolerances on the B, G and R would have to be calculated in Hex which takes time in ME. I have no idea how you would do a comparison - it would have to be done on each colour component separately since tolerances on the combined number are meaningless. You could also convert further to decimal format eg 255, 255, 255. The macro I'm starting using AutoIt already has a colour tolerance parameter. I have to look into how that works. I doubt I will bother with tolerance but will write so others could mess with it.
  23. Fast Stone Capture's (donationware?) picker is excellent for setting pixels. Its window is in the remote corner to where the picker is; it magnifies the pick area and the X,Y are for the pick. On mouse click a colour chart appears. You can copy colour in decimal BGR (per ME) to the Clipboard. You have to manually note the X and Y. In all these issues it would help to be able to slow the mouse movement down. ME has no direct ability there. You could use nudge macros. Another project.
  24. Pixel changes are a good point. I had thought about how a webpage can change. I don't see a problem with dialogs etc assuming the page is viewed at the same zoom level - this method has all the problems of Mouse Move. I was more concerned with any graphics that may be resampled differently and things like Clear Type. It's possible that colour ghosting we see on the screen are not there as far as the PC is concerned (it's a monitor distortion). I remember others commenting on how things shift 1 pixel. I presently have 3 pixel spacing. It would be hit and miss if you landed on an aberration. The grid is essentially random when used on the later page. When "Set", the mouse is put in an approximate location. The fact that top left corner is the main search point makes it no different to using any of the others. There could be good reason to line up the "Set" accurately to land later on a particular pixel but that makes it deliberately non-random. It would not be difficult to do voting on the 16 pixel check and or a colour tolerance but that may be missed if the 2 pixel check fails. Colour tolerance on the 1 and 2 pixel searches will slow things down significantly. As it is, the extra checks should not add significantly to the time. The 2 pixel check is allowing the correct pixel to be chosen and the 16 pixel check is only done occasionally. Switching to a 1 then 16 pixel check may add quite a bit of time. Also, there is a lot more logic than a simple search so my AutoIt script modified may not be quick enough. Being able to restrict the search to even 1/4 the screen speeds things up 4x. I just thought of another problem - AutoIt works in decimal RGB not BGR per ME. BGRrrrr! I think I wrote a script for that recently. I modified the macros because the "Search" does not need to knows the X,Y coords of the "Set", it only needs to know the spacing of the grid. Naturally that introduced errors that took forever to find! My limit on this project is likely to be getting the AutoIt working in a practical fashion and leaving custom settings to others. (edit) I wrote the "Search" macro with the 2 and 16 pixel comparisons as separate "Subroutines". That made it so much easier to follow the flow of the program and to jump back from those comparisons to resuming the 1 pixel search. Full marks to ISS for adding the GoTo command.
×
×
  • Create New...