Jump to content

watching if color change in another app?


kemo1987
 Share

Recommended Posts

hi,i tried to watch this program EyeBeam.

if call opened then it show small green icon

and i want check this icon all time if it appear show msgbox

i also added 2 pic's below for that program

i tried this but it's watch all screen so if i maximize anything else it show same msgbox.

app can be always on top

WinWaitActive("[CLASS:SUAWINCLIENTCLASS]")
;PixelChecksum ( left, top, right, bottom [, step [, hwnd [, mode]]] )
$checksum = PixelChecksum(500, 350, 0, 0)
While 1
If PixelChecksum(500, 350, 0, 0) <> $checksum Then
;SoundPlay("alarm.wav", 1)
MsgBox(0, "", "Something in the region has changed!")
ExitLoop
EndIf
Sleep(100)
WEnd

post-68315-0-28153100-1321178809_thumb.j

post-68315-0-12740400-1321178807_thumb.j

Link to comment
Share on other sites

i see another way to get what i want

diagnostics window open by F9 and logs everything

it's look like notepad but not saved in pc so if i can read it to array then search for line (let's say i wanna record every ip + phone with > Call failed. Error code: 486 "Busy Here" <

ip + phone = (l:'sip:5988@193.221.96.1' r:'sip:00110020100435352@193.221.96.1')

and write it to result.txt

post-68315-0-12740400-1321178807_thumb.j

sorry if i confuse but i still dont know what log if call success so we work with any error code till i get it

error msg in diagnostics

00:18:03.4 Call (l:'sip:5988@193.221.96.1' r:'sip:00110020100435352@193.221.96.1') - Call failed. Error code: 486 "Busy Here"

00:17:29.9 Call (l:'sip:5988@193.221.96.1' r:'sip:001100380935188967@193.221.96.1') - Call failed. Error code: 486 "Busy Here"

00:24:02.5 RequestPlaceCall to 'sip:002100380935188967@193.221.96.0' on an inactive proxy!

00:27:37.3 Call (l:'sip:user1@193.22.119.89' r:'sip:900380935188967@193.22.119.89') - Call being terminated. Reasons: "BYE", (code: 0)

00:32:30.4 Call (l:'sip:1050@193.223.98.166' r:'sip:00380935188967@193.223.98.166') - Call failed. Error code: 404 "Not Found"

00:41:33.2 Call (l:'sip:102@188.77.114.250' r:'sip:0002100380935188967@188.77.114.250') - Call failed. Error code: 408 "Request Timeout"

00:44:31.1 Proxy slot #0 () - Failed to register! error-code: 408, msg: 'Request Timeout'. Retry in 40 second(s). AOR: '<sip:100@177.16.246.156>', proxy: '177.16.246.156', firewall-proxy: 'F'.

00:45:39.0 Proxy slot #0 () - Registration failed AOR: '<sip:100@177.16.246.156>', proxy: '177.16.246.156', firewall-proxy: 'F'.

00:47:41.0 RequestPlaceCall to 'sip:001900380935188967@177.17.11.203' on an inactive proxy!

Edited by kemo1987
Link to comment
Share on other sites

Solution to your first Scenerio might be better to use PixelGetColor() rather than a checksum. You could grab the initial color than run a loop that checks for the color not to match your initial check.

Possible solution to your second Scenerio could be ControlGetText().

Edit: Typo

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

forget about first reply :D

logs worked well now i selected all text to $var by ControlGetText()

now i need this:

for each line in $var > if "Error code:" exist

write the whole line to result.txt

sorry i just very new and stringregexp make me confused :oops:

00:18:03.4 Call (l:'sip:5988@193.221.96.1' r:'sip:00110020100775352@193.221.96.1') - Call failed. Error code: 486 "Busy Here"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...