Jump to content

X and Y axis


Recommended Posts

i got this and i want to put 9 as X and 169 as Y how do i add it on? im new to this and i sorta cut and pasted

#include <Misc.au3>

HotKeySet("{esc}", "_exit")
HotKeySet("{f5}", "start")
HotKeySet("{f6}", "stop")


Global $color
Global $ON = False




While 1

    If $ON = True Then
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf


$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf

        If IsArray($coord) = 1 Then
            MouseClick("left",$coord[0],$coord[1])
        EndIf
    EndIf
WEnd





Func chosecolor()

    $color = _ChooseColor(2, 0xFE0000, 2, "")
    MsgBox(0,'',$color)
EndFunc   



Func _exit()

Exit
EndFunc   


Func start()

$ON = True
EndFunc   


Func stop()

$ON = False
EndFunc
Edited by myth146
Link to comment
Share on other sites

i got this and i want to put 9 as X and 169 as Y how do i add it on? im new to this and i sorta cut and pasted

#include <Misc.au3>

HotKeySet("{esc}", "_exit")
HotKeySet("{f5}", "start")
HotKeySet("{f6}", "stop")


Global $color
Global $ON = False




While 1

    If $ON = True Then
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf


$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000, 10 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf

        If IsArray($coord) = 1 Then
            MouseClick("left",$coord[0],$coord[1])
        EndIf
    EndIf
WEnd





Func chosecolor()

    $color = _ChooseColor(2, 0xFE0000, 2, "")
    MsgBox(0,'',$color)
EndFunc   



Func _exit()

Exit
EndFunc   


Func start()

$ON = True
EndFunc   


Func stop()

$ON = False
EndFunc

I don't see any variables in your code, not sure what you're trying to change. The only X and Y are the ones in MsgBox, so just change them to the number 9 and 169.

Edited by Qousio
Link to comment
Share on other sites

#include <Misc.au3>

HotKeySet("{esc}", "_exit")
HotKeySet("{f5}", "start")
HotKeySet("{f6}", "stop")


Global $color
Global $ON = False
Global $x = 0, $y = 0
$x = InputBox("Coord input", "Please input your X Coord", 0)
$y = InputBox("Coord input", "Please input your Y Coord", 0)

While 1
    If $ON = True Then
        $coord = PixelSearch($x, $y, 20, 300, 0xFF0000)
        If Not @error Then
            MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
        EndIf


        $coord = PixelSearch($x, $y, 20, 300, 0xFF0000, 10)
        If Not @error Then
            MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
        EndIf
        
        If IsArray($coord) = 1 Then
            MouseClick("left", $coord[0], $coord[1])
        EndIf
    EndIf
    sleep(50)
WEnd





Func chosecolor()

    $color = _ChooseColor(2, 0xFE0000, 2, "")
    MsgBox(0, '', $color)
EndFunc ;==>chosecolor



Func _exit()

    Exit
EndFunc ;==>_exit


Func start()

    $ON = True
EndFunc ;==>start


Func stop()

    $ON = False
EndFunc ;==>stop

is this what you wanted ?

Edited by JackDinn

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
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
 Share

  • Recently Browsing   0 members

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