Jump to content

Script Help


Recommended Posts

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
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
Link to comment
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 :(:)

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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...