tellme Posted December 19, 2013 Share Posted December 19, 2013 Func 1() $example = PixelSearch(548,450, 548,450, 0x5A3C32) If IsArray($example) = True Then Send("Hello") EndIf EndFunc ---------------------------------------- This is the true function for autoit but when comes VisualBasic 6 or 2010; Dim autoit As New AutoItX3Lib.AutoItX3 'autoit.PixelSerch(nLeft As Long, nTop As Long, nRight As Long, nBottom As Long, nCol As Long, [nVar As Long], [nStep As Long = 1]) 'in VisuaiBasic PixelSearch need to be like that, if i write like autoit: --------------------------------------- autoit.PixelSerch(548,450, 548,450, 0x5A3C32) 'The color always wrong. İf anyone can help about that, I would be grateful... Thanks for all and sorry for my english. Link to comment Share on other sites More sharing options...
JohnOne Posted December 19, 2013 Share Posted December 19, 2013 Show all your code, including how you test it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
tellme Posted December 19, 2013 Author Share Posted December 19, 2013 Dim autoit As New AutoItX3Lib.AutoItX3 Dim x As Integer Private Sub Check1_Click() If Check1.Value = 1 Thenx = autoit.PixelSearch(548,450,548,450,0x5A3C32) autoit.Run (notepad.exe) autoit.Sleep (1000) autoit.Send ("hello") End If End Sub -------------------- i dont know even this script is true on VisualBasic, but this is what i want to do and red place is wrong, the error is " Compile error: Expected: list sperator or ) " Link to comment Share on other sites More sharing options...
JohnOne Posted December 19, 2013 Share Posted December 19, 2013 What about the color, where does it say it's wrong? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
tellme Posted December 19, 2013 Author Share Posted December 19, 2013 (edited) Syntax error from " x = autoit.PixelSearch(548,450,548,450,0x5A3C32) " this line. Probably color is wrong, my opinion vb is not supporting this color and i tryed to write color like HEX: VB,RGB, i dont know it was true or not but just tryed. Thaks a lot for trying to help. Edited December 19, 2013 by tellme Link to comment Share on other sites More sharing options...
Solution tellme Posted December 19, 2013 Author Solution Share Posted December 19, 2013 (edited) Dim autoit As New AutoItX3Lib.AutoItX3Dim x As Variant Private Sub Check1_Click() If Check1.Value = 1 Then x = autoit.PixelSearch(100, 588, 100, 588, &H0) If IsArray (x) = True Then autoit.Run ("notepad.exe") autoit.Sleep (1000) autoit.Send ("hello") End If End If End Sub İ Solved it. Dim x need to be variant and color need to be write with " &H " sign. Thanks for all. Edited December 19, 2013 by tellme Link to comment Share on other sites More sharing options...
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