fireburn Posted January 24, 2007 Report Share Posted January 24, 2007 Hello all, I'm just learning more detailed ways of using ME and I'm stuck on how to make a macro based on text on the window. I want a macro to check a field for text that might read "buy" or "buy stack" but can't seem to get it to work. the items would be in a random list on the window so I need it to check for "text" and if it's there left click, but if it is not, mouse move to new pos and check again. If you can help me with this plz post. Quote Link to comment Share on other sites More sharing options...
jason Posted January 24, 2007 Report Share Posted January 24, 2007 Is there a way in the program to search the field, such as Control+F? If so, you could program Macro Express to use this feature and then use the Move To Text Cursor Position under the mouse move command. Quote Link to comment Share on other sites More sharing options...
fireburn Posted January 24, 2007 Author Report Share Posted January 24, 2007 Is there a way in the program to search the field, such as Control+F? If so, you could program Macro Express to use this feature and then use the Move To Text Cursor Position under the mouse move command. sadly no, I could use a "get color" check instead of text tho. example mouse move X:585 Y:245 if color = white macro run: 2 if color = black loop (till color = white) something like this either with colors or text would be helpful to me, but no ideal how to program that in ME 3.5 Quote Link to comment Share on other sites More sharing options...
kevin Posted January 24, 2007 Report Share Posted January 24, 2007 Use the Get Pixel Color command to check the color. Quote Link to comment Share on other sites More sharing options...
fireburn Posted January 25, 2007 Author Report Share Posted January 25, 2007 Use the Get Pixel Color command to check the color. ok how can I set up a macro to loop untill the pixel changes to a certen color? Quote Link to comment Share on other sites More sharing options...
jason Posted January 25, 2007 Report Share Posted January 25, 2007 Variable Set Integer %N1% to 1 Repeat Until %N1% = 0 Get Pixel: Under Mouse into %N1% Repeat End This code will set the variable N1 to 1 and then will continue to check the pixel color under the mouse cursor until N1 = 0, which is black. Quote Link to comment Share on other sites More sharing options...
terrypin Posted January 29, 2007 Report Share Posted January 29, 2007 Jason: I'd like to learn more about using loops myself, so thought I'd try your example. But is there no way to simply 'paste' it in please? Or do I have to re-enter those lines individually by hand? -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
jason Posted January 30, 2007 Report Share Posted January 30, 2007 (edited) If the information that you are trying to copy into Macro Express is scripting code, then it will be able to read it as a macro script. However, if it is like the code that I posted, it will not be able to read it and it will need to be entered manually. The reason that we show the script like we do is for readability. The actual script looks like this. <IVAR2:09:01:25><REM2:><SPKEY:%N9%><DVAR2:01:01:.15><DVAR2:02:01:.75> However, the code that we post uses the names of the commands as listed in the Commands list in the Scripting and Direct Editors. Edited January 30, 2007 by jason Quote Link to comment Share on other sites More sharing options...
terrypin Posted January 31, 2007 Report Share Posted January 31, 2007 OK, thanks Jason, understood. How did you actually post the boxed command line extract that you showed earlier under 'CODE' please? If I copy from Scripting Editor to clipboard and then paste elsewhere (e.g. into a forum post), it reverts to 'raw' format. -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
jason Posted January 31, 2007 Report Share Posted January 31, 2007 To show the code in a more readable format: Highlight the text that you wish to copy, right click on the code and select Copy Command Text. Then paste it into the forums as you normally do. Quote Link to comment Share on other sites More sharing options...
terrypin Posted January 31, 2007 Report Share Posted January 31, 2007 Thanks - I should have spotted that! -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.