ramirez Posted September 10, 2009 Posted September 10, 2009 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.
omikron48 Posted September 10, 2009 Posted September 10, 2009 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.
jvanegmond Posted September 10, 2009 Posted September 10, 2009 #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 github.com/jvanegmond
ramirez Posted September 10, 2009 Author Posted September 10, 2009 Thanks a lot guys Manadar (you rock) never used the "ClipGet()" function but it was the logical answer Once again thanks
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now