Jump to content
Macro Express Forums

Yehnfikm8Gq

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by Yehnfikm8Gq

  1. I got a pixel mapping macro working fine. Used the same principles as detailed previously. "Set" macro maps colours of grid of 16 pixels spaced 4x4, 1 or more pixels apart - choose to suit graphic Top left of grid set by mouse position prior to sample Store data in ASCII file "Search" macro: Reads ASCII file for all data including pixel spacing Searches for first occurrence of top left pixel matching pixel on the "new" graphic/webpage If top left pixel correct checks bottom right pixel If bottom right pixel incorrect resumes top left pixel search If bottom right pixel correct checks all 16 pixels If all 16 pixels don't match resumes top left pixel search If all 16 pixels match returns top left coordinates In order to test a failure on the 16 pixel match and find another I had to make a special graphic. On normal graphics it was always correct (ie the two pixel match found the correct rectangle). Webpages with more uniform colours may be more tricky and need the full 16 match to be sure. It should be easy to piggyback a second rectangle for difficult images. Work in progress. The search is very slow using ME as rberg predicted (no prizes!) although can be considerably sped up with reduced search area or larger grid. I may try and modify my AutoIt-assisted ME Pixel Search macro to do this function.
  2. (edit) Problem solved, I picked an area with many similar pixels. The macro is jumping back as it is supposed to do. I've been looking at a pixel mapping script. I have it working on 2 pixel comparisons (full 16 pixel match still to be done). Amazingly it worked the first time I ran it. There is a problem though. When there is success, the macro should stop. Instead it jumps way back up the macro, goes the success route and this time the macro stops. I can only think it is related to some overlapping GoTo commands. Below is the order of commands (with logic in between). Goto:DoneTopLeft // pixel found :BottomRightReadFail // returning from pixel not found :DoneTopLeft Goto:BottomRightReadFail // resume original pixel search if no failure macro stops At the macro stop position (which is directly after that final GoTo) it seems to be jumping above "Goto:DoneTopLeft". Has anyone else had this sort of problem?
  3. Mxe are simpler to make shortcuts in the normal Windows environment. No typing. It depends what you are doing.
  4. A pixel map is simply a set of colours at coordinates. There are at least two ways of using one. I would use a moving map. Assumed a rectangular map say 4x4, 16 points, spaced 1 or more pixels. I would take the top left pixel, search for that, if found check the bottom right. If not correct continue search with top left pixel. Repeat until bottom right is correct. Then check entire grid of 16. Experience will show if checking with top right pixel is preferred (and moving on) before doing full check of 16 points. Experience may also require two 4x4 grids. As was pointed out in another thread, pixel searching is slow with ME. The script I did with AutoIt and my old PC scans my screen in 2 secs. A map is going to take a bit longer.
  5. Try Scheduled Activation - set when creating the Macro or via Properties of the macro
  6. Isn't the pixel mapping that has been mentioned numerous times in the forum the same thing? All those image recognition algorithms will work in a similar way I'm sure. Look for a basic pattern first and then see if the total fits. For those that have their own pixel mapping, I can't see any advantage. I don't know if there are any mathematical methods of finding pixels quickly. The mouse outline could be simulated by allowing multiple entries of pixel mapping (say for diagonal features). You would map one area and then another area say diagonal down/right. Repeat ad infinitum if desired! Ditto for any other part of the image whether connected or not. If the dialogs are based on a grid starting at the mouse location it should be easy to map an area or two. You could even click the mouse at multiple points, gathering info using a fixed grid at each point. All you are really doing with the image map is increasing the chance you have the right place. A decent grid should be reliable too. To answer the question, No! (edit) If you are looking for resampled image recognition you could probably do that with a pixel map and something like AutoIt's pixel search which has a pixel "range of agreement". You would need a lot more pixels though. Looking at forms with uniform colour entry boxes should be easier to handle.
  7. Large font for your eyes. You could also try the built-in Help. There are chm to html decoders - you could try decompiling the Help file and then read with larger text in a browser. (edit) I tried CHM Decoder which is freeware. Decompiles chm easily, MEPro into 675 files with menu. If you zoom in with your browser, the text is larger but not so sharp. Which version of ME are you referring to? The current versions are ME Pro 4.1.5.1 and ME 3.8 Variable Set String/Set Value from Clipboard Variable Modify String/Save to Clipboard These should be obvious without explanation - take a look at the dialogs. Otherwise Clipboard or Variables in Help. For copying and pasting you can use Clipboard Copy or Paste or Ctrl+C Ctrl+V I have not run mxe files inputting from other progs. I'll leave that to others who have. The Pro version can run AutoIt, VBScript, JScript, HTA/HTML scripts using the Macro Control/External Script command.
  8. I experimented with one text file by reducing the number of lines. At some point it transitioned from text with format characters to plain text. You may well have been correct in the case of some files that had been generated by software - something to bear in mind for the future. In light of your comments I re-checked. With an ANSI text file it's occurring between 3700 and 4400 lines averaging about 12 characters per line.
  9. I've haven't even thought about hooks since ME was just ME. You seem to have so much trouble with "common" stuff. The obvious culprit outside of ME would be interactions with other software but I'm sure you've looked into that. My PC used to run with less than 30 processes. Now it's in the 50s. Every prog wants 2 or 3. I have a few older progs that now conflict - could be direct or indirect due to updates in system files. After recent posts about hooks I trolled around. I had never realized that Opus uses hooks. I don't use any non-Windows shortcuts for it but it made me more aware of unseen conflicts.
  10. Looks like we must thank terrypin for his excessive use of hotkeys for this revelation! Thanks to Chris for digging out the info. I have no idea if I can attribute any problems to this. It makes you want to stay away from short partials until the update. Any explanations should go into the Help too.
  11. I have to echo terrypin's comment about Hidden windows. We all work on the assumption that normally, things only happen with Visible windows. If you set scope for a Hidden window using the Hidden list that's a different matter.
  12. I was loading some text files into Text Box Display by setting a string to the file content. The files had a non-txt extension and the default application takes a long time to start. I found that the Text Box Display formatting information appeared in some instances (like you see in the Direct Editor). It seems to be related either to the number of lines or total number of characters. I did not find the exact transition but 2500 lines seemed OK, 4500 lines did not. It may also be related to size of text string, although there are no limits specified in the Help.
  13. I don't have any real need - multi-input dialogs would do me fine. A neat and professional-looking interface would increase the appeal of ME. I assume that every PC that used forms would have to have a copy of the add-in. That may put a few cheapskates off - they would make do with the basics. If you were considering "bang for the buck" I would stick to less than half the price of MEPro. Relative cost of automating a task compared to making it look pretty is an issue. An office situation where there is a lot of data entry may be willing to pay more. Being able to enter all the data in one place and review it all before entering is efficient and less-prone to error. Price-wise you will get more feedback from commercial customers. Don't forget the output as well as input. Adding graphics for logos, selection, corporate themes etc to forms would be a great asset too.
  14. This is quite a difficult problem. You can usually navigate down a list if each item starts with a unique character. Type "C" and you will get the first item starting with "C". If there is are more than one item it is of limited value. If the list is fixed, you can then arrow down a number of times to get to another "C" item. With a varying list it is not much help, other than the fact you can get part of the way down the list. The only method I can think of would be as follows: Use the "6" to get to the start of that section of items. A small time delay may be necessary for the list to appear. You may have to type "6" and down arrow. You may have to type "Enter", "Esc" or another character to select the item without opening the selection. You could also try typing the full set "6.4.2" to see if that gets you any closer and may save extracting the "6" **. Copy the item text to a Text Variable See if the Text Variable contains the string you are looking for Arrow Down, repeat the copy and comparison until you find the item, then proceed. This will be slowish, depending on text length and number of similar items. **I tried that with Firefox's Save dialog and it even found multi-letter strings directly that were not visible on the list, perhaps 100 items further down. That could be a good or bad thing and may be application-specific. For everyone's benefit, could you post your experience with this so we can learn too?
  15. I get that all the time. I find that any activity such as security scans, long searches, registry cleanouts seem to have the same effect or better than F5. It could also be that the macro is being cached. Providing you re-use within a certain period of time, it is quicker to access and run.
  16. Next batch of ideas. Are you trying to do anything other than logins? Logins should be easy to handle because they are always Input or Combo boxes so you can Tab to them and Tab between username and password. Don't forget that many sites can remember logins so that may be a possibility too. I use a combination of methods for all my logins: 1. Remembering logins with the site or browser is often the easiest. Fine for single user per PC with Windows login protection. 2. For predictable pages a macro loads the URL, Tabs to the username box then use Text Type for the username, Tab to the password and either, hit Enter or Tab to the OK button (depends on layout and default). 3. For more variable pages I (the user) manually click on the username box and hit a hotkey macro. The macro contains all the logins for this method. It reads the page title and chooses the appropriate text to type. Part list: If Window "mythievingbanksite" is focused //Bank Text Type (Simulate Keystrokes):mremptywallet Text Type (Simulate Keystrokes): <TAB> Text Type (Simulate Keystrokes): 7yenhUIE Text Type (Simulate Keystrokes): <ENTER> End If ** If Window "prompt" is focused //Auto Repair Shop Or If Window "authentication required" is focused Text Type (Simulate Keystrokes): guywithnowheels etc etc ** At the end of each section you can add Macro Stop, or alternatively use "Else" instead of "End If" with a bunch of "End If" at the bottom of the list A few time delays may be sprinkled in there depending on site. Something you have to bear in mind is the reaction of the users to any dubious methods. It may not be worth your reputation, "Who's this idiot?", "You cannot be serious!". I suppose if you want to hide passwords from users there may be no choice. Method 3 is quite effortless and universally applicable to all logins I've met.
  17. You will find numerous mentions in the forum that Mouse Move is not a good method. It's fine for fixed web pages, fixed screen display. Once you start varying things it simply does not work. You only have to have someone change the text size and you are out of luck. To account for every possibility would be ridiculously complicated. Even if you try and fix the window size, the toolbars and text etc are going to throw things off. The most predictable navigation method is to use (Text Type) Tab or Shift+Tab and arrows. If you can navigate close to where you need to be you may be able to (Text Type) Tab from there. Finding text then Tabbing is one method. There are javascript methods that could load the web page into a new fixed size window with limited or no toolbars etc. Although I've done it myself I'm no expert and certainly have not tried to pick information off such a setup. Below is an example of html link using an image to click - could just as easily be a text link. <a href="java script:void(window.open('Your.htm', 'Javatest', 'width=600, height=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=no'))"><img src="yourlinkpic.jpg" alt="to your htm" border="0" height="20" width="164"></a> I have not tried this out of ME. Typically the above code would be an html link on a web page. My original was resizable but I changed the code for your need. You may need to lose the scrollbars too. You may have to add other parameters to cope with text size etc. I've never had the need to be so specific. I mention the method more to indicate as a possibility. Forum members that work with multi-users may be more helpful than me. That's all I have for now. You should get plenty of other suggestions on this one!
  18. Aren't we almost back to my original question? With mathematics, unless you truly understand the order of operation, you put things in brackets to ensure they follow your rules. My example would be the familiar 5*(T1-32)/9. In ME this is not an issue. Maths is very cumbersome, one operation at a time with an effective "=" each line. You can evaluate top downwards, albeit rather tediously. Your 2x3+4 will be 10 if programmed in that order T1*T2=T3 T3+T4=T5. OK, I know you would use T1*T2=T2 T2+T3=T3 !! So would I if I did not have to re-use them. In logic, the order of comparisons in consecutive ORs does not matter. The order of ANDed comparisons doesn't matter either providing they are still together. In ME, since it is working top to bottom, you can figure out how it will be evaluated - "Truth as You Go". Any "brackets" are either mental or per my output "run1" at the end of a section of logic. In my logic, the setting of "run1", which is intended to indicate a separation of logic blocks, appears twice in your code thus diluting its purpose.
  19. From my experience when somebody compresses code, for example using arrays and repeat loops, it's a great solution providing some documentation is provided to explain how it is set up. In the case of Paul's compressed logic, some simple added comments on the purpose of the logic block help no end. The same applies to my original logic, except that my logic is more in line with normal thought (as both Cory and I gave examples of) and would generally be easier to follow. I've forgotten the logic myself already but it's something like "Around midnight 01.00 is later than 23.00 even though 1 < 23". Way back I pushed for a "Comment" icon to be added to the Editor (not sure if one appeared because of that) to make it easier to document the purpose of sections of commands. To me it's the hallmark of consideration for subsequent users of the macro, including yourself six months from now.
  20. I agree with Cory to an extent about OCR. From printed page I've spent more time correcting than it would take to type. In commercial situations, I've advised people to get a Temp who will type correctly for not a lot of money. Only practical for large amounts of text. I'd be interested in Paul's experience with SnagIt. It may depend on what is on the screen. If it's an HQ image I guess moderate chance, LQ very marginal; digital PCTV or PCHDTV moderate chance; interlaced PCTV poor chance (we may have gone digital but cable boxes and satellite receivers may still be connected via analog video). Web pages can usually be copied directly or if not from the Page Source; jpeg scans of text documents, moderate to poor. Did I leave anything out? In images and TV picture, text is likely to be at an angle or in perspective which will make OCR ineffective. Low quality jpeg images will have artifacts like edge halo and "mosquitoes" that will throw off recognition.
  21. Thanks for the links guys. That looks quite handy. I think everyone is agreed that it is surprising that even the most basic bulk information input methods are unavailable. I'm sure ISS take more notice of feedback from their larger customers so what have those guys (the customers) been doing? Sleep at the wheel? I took a look at inputting via Excel. The standard Data Form is geared to Excel (not necessarily a problem but it's another hindrance).
  22. I had a look on the Net for logic diagrams but the information seems overly technical, by introducing too many gates styles, truth tables and other logic representations. Wiki is so-so. As far as ME goes we are mostly interested in AND and OR. Many companies use the standard symbols but others simplify. A gate is a vertical line and midway vertical on the right is a small touching circle containing AND, OR etc. Some would have a square for an AND and a circle for an OR. This style uses less space and is easier to have many inputs. The logic flow is left to right although signals can loop back. When going from one page to another, the signal description ("at least one entry switch activated") and destination are indicated ("to audible alarm"). You don't show power like electrical logic. Logic simply has values of 0 or 1. Any "1" input on an OR gate will set the output to "1". For an AND gate every input has to be "1". You can substitute TRUE and FALSE if that is easier to understand. If the physical inputs were switches, they would usually give a "1" when closed (but that could be a maintained "1" like a light switch or a momentary "1" like a pushbutton). Using your alarm system, if you had 10 window switches you want the alarm to go off if any one of them activates. So you have an OR gate with 10 inputs. However, you want the alarm to stay on if the window closes. So what you do is loop the output back to the (11th) input. Once the output is on, "1", the gate will stay on permanently. In practice you would have some logic to break the feedback to turn it off. That would translate to logic: IF %switch1% = 1 OR IF %switch2% = 1 OR IF %switch[n]% = 1 OR If %output% = 1 - once output is on it holds itself in (AND IF %reset switch% = 0 - pressing the reset breaks the logic) END IF Variable Set %output% = 1 For non-discrete logic >= GT, EQ etc you can have boxes with the symbol in it. I could not find a good reference anywhere. (edit) This link has a few examples that are too small to read well. For the sort of things we've been talking about you probably would not do more than a rough sketch on paper or think it out in your head. For normal tasks we make decisions every day, "If the price is between these two values and it's after pay day and if any one of the 4 stores is selling it" For the flow charts style see this link this link or this. This may be a better method for the average person as it has far more common usage.
  23. There are a few applications that will do it. Google "screenshot OCR" or some combo like that.
  24. I'm not sure what you mean there. If you have macros that have Activation as "None", they will still run if called to run by another macro. If the first macro does not run neither will the called macros. It sounds as though Sirius should do the trick but when you set the Scope, are you sure you got the pop-up/player and not the browser window (that should be clear in the list of open windows when you set Scope)? Until you get it working with Global Scope, it's not worth bothering about more specific Scope or anything else. Enabling the macro from disabled works fine for getting the timing right - the scheduled time starts from there. That method is more flexible than using the schedule setting. Remember that the first activation does not immediately happen, it is when the first time period ends. In MEPro you can actually set the first start time. It does not sound as though you've tried the 20sec tests I mentioned. That would help a lot in determining where the problem lies. Something else that may help is to Activate the window and add small time delays before your Mouse Move and Mouse Left Click to ensure the commands are ready as the macro starts. I would also add an audible (Set Sound) after the mouse click so you are sure the macro ran - delete after testing.
  25. The link doesn't let me proceed. I don't know the magic handshake! No matter. That's one method I had not thought of, thanks. I know that you can create forms elsewhere although it's generally a painful business. I've created my own web forms and I can get by with the methods I have within ME. I don't care too much what it looks like. I was trying to find out what forms other users employ. I guess you must have used the HTA mentioned so that's one down. I've flogged the more professional appearance and customization aspects in other posts. I'm sure that a neater product would help sales and ultimately help us all - not that we don't appreciate the recent improvements. I'll make this the 3rd Request for Feature today.
×
×
  • Create New...