Anyway my problem is that for a certain piece of software that runs very long tests i want to be able to send an email once the test has finished. The main window of the software has the title and attributes
Size: X: 0 Y: 0 W: 1280 H: 996
once the test is complete a small windo pops up and displays "Data collected" however the active window info tool doesn't detect the text in the window, it does however change the attributes too.
Size: X: 512 Y: 460 W: 120 H: 55 ; not correct x y h d values
I tried to use WaitActive("") to wait for the untitled window but this would cause the loop to break sporadically.(perhaps due to background processes ?? ) Also the program displays other pop-ups all untitled..
So basically as a quick fix I made my code detect a change in a pixel colour (the pop up window has an icon in the corner), but although this works perfectly for this machine putting the software on any other machine it doesn't really work, because the window changes size/position due to different screen res's, different languages/text etc etc
So basically I was hoping for some help in making my code a bit more generic, but this is the thing the software is very cpu intensive so I cannot do high intensity cpu operations and I need to be as simple as possible. (The software is very bad and will miss data etc if interrupted too much.. so much for multitasking!)
here is my code that works for machines running in 1280x1024
sleep(600000) ; wait 10 minutes until you check again (saves cpu)
until PixelGetColor(558,461) = 16776960 ;if the pixel x,y changes to the right color test has ended so break loop
Run("c:\mailme.bat") ;calls c:\mailme.bat which has the mapisend command in it (for easy editing of the email address(es))
I'd perfer it if you just pointed me in the right direction instead of doing the coding for me, I am trying to learn
Edited by AbyssUK, 14 December 2006 - 09:33 AM.