Sign in to follow this  
Followers 0
anyways

ERROR :(:(:(

5 posts in this topic

#1 ·  Posted (edited)

like i kinda understand my error here but i dont have any idea how i can fix it :/

$notepad13 = WinGetText("click.txt - Notepad")
$lines13 = StringSplit($notepad13,@crlf,1)
$randomline13 = Random(1, $lines13[0], 1)
clipput($lines13[$randomline13])

Do
    $color = PixelGetColor(clipget())
Until $color = 0xF1F1EF 
       MouseClick("left", clipget(),1,5)
sleep(500)
Do
     $color15 = PixelGetColor(687, 962)
Until $color15 = 0xF7D610
        mouseclick("left",687,962,1,5)

the error is obviously in the PixelGetColor(clipget())

however the file "click.txt" contains mouse position like this:

481,276
481,301
481,326
481,351
481,376
481,401
481,426
481,476
481,501
481,526
481,551
481,576
481,601
481,626
481,651
481,676
481,701
481,726
481,751
481,776
481,801
481,826
481,851
481,876
481,901
903,601
903,626
903,651
903,701
903,726
903,751
903,776
903,801
903,826
903,851
903,876
903,901

so shouldnt it work :/?

I kinda understand that autoit is trying to do the pixelgetcolor function before the clipget() function, how can i tell them to make the clipget then do the pixelgetcolor with the resulting mouse position

Edited by anyways

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

lost why you use the Clipboard, but the real problem is that you need 2 parameters separated by a comma and not One parameter that contains a comma.

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Your version:

$notepad13 = WinGetText("click.txt - Notepad")
$lines13 = StringSplit($notepad13,@crlf,1)
$randomline13 = Random(1, $lines13[0], 1)
clipput($lines13[$randomline13])

Do
    $split2 = StringSplit(clipget(), ",")
    $color = PixelGetColor($split2[1], $split2[2])
Until $color = 0xF1F1EF
       MouseClick("left", $split2[1], $split2[2],1,5)
sleep(500)
Do
     $color15 = PixelGetColor(687, 962)
Until $color15 = 0xF7D610
        mouseclick("left",687,962,1,5)

My version:

$text = FileRead("click.txt")
$lines = StringSplit($text, @crlf)
$random = Random(1, $lines[0], 1)
$line_random = $lines[$random]
Do
    $split = StringSplit($line_random, ",")
    $color = PixelGetColor($split[1], $split[2])
Until $color = 0xF1F1EF
MouseClick("left", $split[1], $split[2], 1, 5)
sleep(500)
Do
     $color15 = PixelGetColor(687, 962)
Until $color15 = 0xF7D610
mouseclick("left",687,962,1,5)

I don't really know if it works, I don't have time to test it.

Share this post


Link to post
Share on other sites

another approach

#include <file.au3>
Dim $Lines

If Not _FileReadToArray("Click.txt", $Lines) Then
    MsgBox(4096, "Error", " Error reading log to Array     error:" & @error)
    Exit
EndIf

$Random = Random(1, $Lines[0], 1)
$split = StringSplit($Lines[$Random], ",")

Do
    $color = PixelGetColor($split[1], $split[2])
Until $color = 0xF1F1EF
MouseClick("left", $split[1], $split[2], 1, 5)
Sleep(500)

Do
    $color15 = PixelGetColor(687, 962)
Until $color15 = 0xF7D610
MouseClick("left", 687, 962, 1, 5)

not tested

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

wow, wtf poisonkiller, it worked :whistle:

thnx bro

i think i shoulda just separate the clicks in 2 txt file, instead of putting the mouse position in the same txt file, that was dumb from my part

edit: thx valuater too, yours shoudl also work since its almsot the same thing that wat poisonkiller said

Edited by anyways

Share this post


Link to post
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
Sign in to follow this  
Followers 0