tellme Posted January 7, 2014 Share Posted January 7, 2014 This is my vb6 function's some part, and its working but its only sending key once time and pixelsearch working once time to then just stopping, İ'm trying to do, if checkbox checked then all time look for the pixelsearch and if pixelsearch true then alltime send key. Sorry for my english. Thanks for all help and have a nice forum... Private Sub Check5_Click() If Check5.Value = 1 Then Call example End If End Sub Function example() asd = autoit.PixelSearch(12, 21, 12, 21, &H0) If IsArray(asd) = True Then Sleep 2000 SendKeys ("0") Else End If End Function Link to comment Share on other sites More sharing options...
Sori Posted January 18, 2014 Share Posted January 18, 2014 (edited) If I'm understanding correctly, you would want to do While IsArray(asd) = True Sleep 2000 SendKeys("0") Wend That way it will continue to check the pixel, instead of just checking one time. Depending on how the pixel search works, try... asd = autoit.PixelSearch(12, 21, 12, 21, &H0) While IsArray(asd) = True Sleep 2000 SendKeys("0") asd = autoit.PixelSearch(12, 21, 12, 21, &H0) Wend This will lead into the while loop, and inside the loop it will re-check. Edited January 18, 2014 by Sori If you need help with your stuff, feel free to get me on my Skype. I often get bored and enjoy helping with projects. 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