Shawn00_88 Posted August 25, 2009 Report Share Posted August 25, 2009 If you didn't read my other post I'm new to Macro express but learning pretty quick. Problem is that with my program I'm using ME3 on it usually pops up 4 window's at this certain point in my macro but not always sometimes it is only popping up 3, i figured if i put in a pixel check as follows it should work or am i misunderstanding something Get Pixel Screen Coords: 600, 190 into %N51% If Variable %N51% = 12632256 mouse move screen 30, 220 mouse left click button End if I have tried with and without delays, this is the ONLY time N51 is used however the macro is doing the left click regardless if the 4th window is up or down and the pixel colors are different if only 3 window's pop up clicking 30,220 would open the fourth. 3 window's pixel color is 12632256 when 4 window's open pixel color is 13071630 Quote Link to comment Share on other sites More sharing options...
rberq Posted August 25, 2009 Report Share Posted August 25, 2009 Only thing that jumps out at me here is, you are checking a pixel location relative to the screen as opposed to the window. If the window is full-screen that may not matter. You said you tried it with a delay before checking color, to make sure there was time for the window to open prior to your pixel check??? Some color values will change on a PC running 16-bit vs. 24-bit vs. 32-bit color, so if it works on one PC and fails on another, check that. Quote Link to comment Share on other sites More sharing options...
Shawn00_88 Posted August 25, 2009 Author Report Share Posted August 25, 2009 I fixed it, i believe i had a delay in a wrong spot. When the guy from the company we are doing this for comes back from vacation he's going to be amazed lol Considering when i talked to him the day before he went on vacation i am almost sure i sounded like an Idiot and he wont be back until the 8th of September. Ideally we want this to run without requiring someone to have to check each computer every 5-10 minute's and i think we are getting there. I run the macro on 8 computers and normally if a computer goes 10 accounts without stopping its amazing but today one computer went 35 without stopping and i have exported this patch yet because there's still a thing or two I'm tweaking. Even with the macro on fast it takes 3-5 minutes to run 1 account, if i have to make an account its more like 10-20 =( lol Quote Link to comment Share on other sites More sharing options...
Brain Virus Posted August 25, 2009 Report Share Posted August 25, 2009 you could also check for a window title Quote Link to comment Share on other sites More sharing options...
Shawn00_88 Posted August 25, 2009 Author Report Share Posted August 25, 2009 no clue there, most of what i've done i look at other places in the macro and do 1 step at a time until it works =) My problem came back (only when i run it on Fast) NVM a 5th window is coming up on this account =) Quote Link to comment Share on other sites More sharing options...
rberq Posted August 26, 2009 Report Share Posted August 26, 2009 If it's a timing issue, perhaps your pixel check is happening before the next window has opened. For an uncertain timing like this, I generally use a repeat loop. It's also easier (and more forgiving on different PCs) if you don't code for an exact color. For example, the following logic allows a nominal ten seconds for the new window to open, then does the click if it hasn't opened in that time. It doesn't ALWAYS wait the full ten seconds; the maximum "wasted" wait time is 250ms if the color changes because the new window has loaded. GET PIXEL COLOR INTO N90 (from the original window) REPEAT 40 TIMES GET PIXEL COLOR INTO N91 IF N90 <> N91 REPEAT EXIT (color has changed) END IF DELAY 250 MILLISECONDS REPEAT END IF N90 = N91 (there has been no color change) CLICK TO OPEN WINDOW END IF The repeat loop will be exited either by a color change, or by the expiration of 10 seconds without change. We don't really know which, so that's why the N90 to N91 compare is repeated after exiting the loop. Quote Link to comment Share on other sites More sharing options...
Shawn00_88 Posted August 26, 2009 Author Report Share Posted August 26, 2009 thanks will try that instead =), now i just have to figure out how to copy something that can be in multiple locations and that have the same pixel color as the other account numbers i dont want copied..... example when i search by social for canceled accounts it gives me 0-5 on screen, i have the macro set to go through them on a loop with #, variable location however when it finds one that is in collections i want it to copy that one which until now i have only copied from fixed locations Is this possible? our program is like account #| name | type | status | account #| name | type | status | account #| name | type | status | account #| name | type | status | Also it has to be copied on that window i have yet to find a place once i open the account for it to get the Account # which i would be able to copy it from because i have successfully put in a copy from a window in an open account Did i mention thanks =) 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.