Sign in to follow this  
Followers 0
caramen

Script Help

3 posts in this topic

#1 ·  Posted (edited)

Hi this is caramen

i am beginner and i dunno how to complete this code ... maybe i dont use good pixel command Ty for help before

;Fonction order

Wactive ()  ; I whant this function work 1X
Check ()      ; I whant this function work 1X with 5000 ms sleep

While (1)
    Check2 () ; I whant this function work in while with 5000 ms sleep
    Comparf (); I whant this function compar "Check ()" with "Check2 ()" and stop while and if
              ;       diferent pixel color and send msg box
WEnd

;Func start

Func Wactive (); I whant this Function active windows and move it to 0.0

WinActivate("*Aplication name*")

sleep (500)

winmove("*Aplication name*","",0,0)

EndFunc

Func Check () ;I whant this Function get an origine color to compar with  "Check2 ()"

$checksum = PixelChecksum(0,0, 50,50)

EndFunc

Func Check2 ();I whant if this Function check zone of pixel to compar it in next Function

$checksum2 = PixelChecksum(0,0, 50,50)

EndFunc

Func Comparf ();I whant this function compar "Check ()"  with "Check2 ()" and stop while and if diferent pixel color then while stop

MsgBox(0, "", "Got news message!")

I only whant this script detect any message coming and say me if it is with a msg box Ty all Autoiter :think:

Edited by caramen

Share this post


Link to post
Share on other sites



Hi, Sorry to tell you this, but you have some reading to do :think: Start with the help file and run the examples, we have all done it, and still do alot.

I have fixed your code so it will compile. It wont do what you expect. But it will get you started. If you have not installed the AutoIt Scite version you realy should. It will give you a head start until you have learned a bit more.

;Fonction order
Global $gAppName = "Untitled - Notepad";Modify this to your preferences.
Global $gChecksum
Wactive ()   ; I whant this function work 1X
Check ()     ; I whant this function work 1X with 5000 ms sleep

While (1)
    Check2 (); I whant this function work in while with 5000 ms sleep
    Comparf (); I whant this function compar "Check ()" with "Check2 ()" and stop while and if
             ;        diferent pixel color and send msg box
WEnd

;Func start

Func Wactive (); I whant this Function active windows and move it to 0.0
    WinActivate($gAppName)
    sleep (500)
    winmove($gAppName,"",0,0)
EndFunc

Func Check ();I whant this Function get an origine color to compar with  "Check2 ()"
    $gChecksum = PixelChecksum(0,0, 50,50)
EndFunc

Func Check2 ();I whant if this Function check zone of pixel to compar it in next Function
    Return PixelChecksum(0,0, 50,50)
EndFunc

Func Comparf ();I whant this function compar "Check ()"  with "Check2 ()" and stop while and if diferent pixel color then while stop
    if $gChecksum <> Check2() Then MsgBox(0, "", "Got news message!")
EndFUnc

Share this post


Link to post
Share on other sites

oh man ... u give me great help 1000 Thx yes i am realy beginner and i begin to learn and ave already some GREAT code but sometime n some help :think: like tha :(:)

Share this post


Link to post
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
Sign in to follow this  
Followers 0