Jump to content

Recommended Posts

Posted

Hi everyone.

I've made a script tha retrieves information from a ticket program and tries to send the info via Mail.

#include <Misc.au3>
#include <INet.au3>
#Include <Date.au3>
Sleep (1000)
Dim $i = 0
Dim $ctrlc = MouseClick("left", 340, 282) and Sleep (1000) and MouseClickDrag("left", 340, 282, 370, 282) and send ("^c")
;While 1

            If "0x" & Hex ( PixelGetColor ( 768 , 510 ) , 6) <> "0x404040" Then
            Do
                Send ( "{DOWN}" )
                Sleep (500)
                $i += 1
                ToolTip  ( $i )
            Until "0x" &  Hex ( PixelGetColor ( 768 , 510 ) , 6) = "0x404040"
        If _IsPressed ( "28" ) Then
        $i += 1
        ToolTip ( $i )
        
        EndIf 
    
$Address = "<mail@adress>"
$Subject = "Number of Tickets at " & @MDAY & "/" & @MON & "/" & @YEAR
$Body = "Number of tickets " & $i+1 & " beeing the first " & $ctrlc
 _INetMail($address, $subject, $body)
Sleep (1000)
Send ("!s")  

EndIf

;WEnd

Everything works fine but the result of the body of the mail is

"Number of tickets 10 beeing the first True"

What is going wrong here?

Thanks in advance.

Posted

MouseClick("left", 340, 282) and Sleep (1000) and MouseClickDrag("left", 340, 282, 370, 282) and send ("^c")

That evaluates as a boolean statement. 'and' is a logical operator.

Posted

#include <Misc.au3>
#include <INet.au3>
#Include <Date.au3>
Sleep (1000)
Dim $i = 0
MouseClick("left", 340, 282) 
Sleep (1000)
MouseClickDrag("left", 340, 282, 370, 282) 
send ("^c")
Dim $ctrlc = ClipGet()
;While 1

            If "0x" & Hex ( PixelGetColor ( 768 , 510 ) , 6) <> "0x404040" Then
            Do
                Send ( "{DOWN}" )
                Sleep (500)
                $i += 1
                ToolTip  ( $i )
            Until "0x" &  Hex ( PixelGetColor ( 768 , 510 ) , 6) = "0x404040"
        If _IsPressed ( "28" ) Then
        $i += 1
        ToolTip ( $i )
        
        EndIf 
    
$Address = "<mail@adress>"
$Subject = "Number of Tickets at " & @MDAY & "/" & @MON & "/" & @YEAR
$Body = "Number of tickets " & $i+1 & " beeing the first " & $ctrlc
 _INetMail($address, $subject, $body)
Sleep (1000)
Send ("!s")  

EndIf

;WEnd

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
  • Recently Browsing   0 members

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