Jump to content

Reading Mouse Coords From Input - Please Help


TokeySmurf
 Share

Recommended Posts

it Goes off Screen and Gets Caught no matter what cords I put in. here's the script

Func input()
    $inputwindow = Guicreate("Mouse Coords Input", 200, 200, 100)
    GUISetState (@SW_SHOW)
    $Startq = GuiCtrlCreateButton("Start", 80, 150, 40, 40)
    GUICtrlSetOnEvent($startq, "autoq")
    Global $Que = GUICtrlCreateInput("", 40, 40, 100, 20)
    Global $Que2 = GuiCtrlCreateInput("", 60, 60, 100, 20)
    GUISetOnEvent($GUI_EVENT_CLOSE, "WindowClose")
EndFunc
    
    Func autoq()
    GUICtrlRead($Que)
    Guictrlread($Que2)
    MouseMove( $Que, $Que2, 100)
EndFunc

Any help appreciated

Thanks

-Tokey

Link to comment
Share on other sites

#include <GUIConstants.au3>
    $inputwindow = Guicreate("Mouse Coords Input", 200, 200, 100)
    $Startq = GuiCtrlCreateButton("Start", 80, 150, 40, 40)
    $Que = GUICtrlCreateInput("", 40, 40, 100, 20)
    $Que2 = GuiCtrlCreateInput("", 60, 60, 100, 20)
    GUISetState (@SW_SHOW)
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $Startq
            If GUICtrlRead($Que) = "" or GUICtrlRead($Que2) = "" Then
                MsgBox(0,"Error","Please Fill in Coords")
            Else
            Autoq(GUICtrlRead($Que),GUICtrlRead($Que2))
            EndIf
    Case $msg = $GUI_EVENT_CLOSE 
        Exit
EndSelect
    WEnd
    
Func Autoq($Que,$Que2)
    MouseMove($Que,$Que2,1)
EndFunc

Link to comment
Share on other sites

#include <GUIConstants.au3>
    $inputwindow = Guicreate("Mouse Coords Input", 200, 200, 100)
    $Startq = GuiCtrlCreateButton("Start", 80, 150, 40, 40)
    $Que = GUICtrlCreateInput("", 40, 40, 100, 20)
    $Que2 = GuiCtrlCreateInput("", 60, 60, 100, 20)
    GUISetState (@SW_SHOW)
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $Startq
            If GUICtrlRead($Que) = "" or GUICtrlRead($Que2) = "" Then
                MsgBox(0,"Error","Please Fill in Coords")
            Else
            Autoq(GUICtrlRead($Que),GUICtrlRead($Que2))
            EndIf
    Case $msg = $GUI_EVENT_CLOSE 
        Exit
EndSelect
    WEnd
    
Func Autoq($Que,$Que2)
    MouseMove($Que,$Que2,1)
EndFunc
oÝ÷ Ûú®¢×ßÙ¬¢ºònëHßÛÞj¢·¦V²x0Øm+¢¶°)^Ò7ö÷­®'÷°v'ß­éí¶§Æîµ8b³¥z-Âävºw-ì¹ÈZ²lºw-ȧn¦Ø^­ánÂ'¦ëHßÙ§¢Û.­ì!Èý½ëkç^اØ^"­~éÜv¢êeyØ~·§ßÛi§±©Ý±ëmxr©ëax,¶%¡¶¥¶kÉ©Ýض+m¢·v+Aº×¯z{aztá{§v0¢{jwm秶*Þ±Êâ¦ÖÞr±¹hêÞßÛØ«zÇ+VØp«r¢ë!£è^­â-¢,¢g­)ಭ)¶¦r+v)Úµëjë#f²Ø¯x)®åzk0Øm«@j,¶Ø^²)¢&«¦ºéßÙ¡jø§­Øb²­¶)àÛhÂä{"uëayû§rب«­¢+Ø((¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì()=ÁÐ ÅÕ½ÐíU%=¹Ù¹Ñ5½ÅÕ½Ðì°Ä¤)=ÁÐ ÅÕ½ÐíU%
½½É5½ÅÕ½Ðì°Ä¤)=ÁÐ ÅÕ½Ðí]¥¹Q¥Ñ±5Ñ¡5½ÅÕ½Ðì°Ð¤(()±½°ÀÌØíM¡½ÜôÀ)±½°ÀÌØí¡¹±ô]¥¹Ñ!¹± ÅÕ½Ðí±Í͹µõá]¥¹½Ý
±ÍÍÍÅÕ½Ðì¤)%ÉɽÈQ¡¸(U%
ÑɱMÑÑ ÀÌØí¡MÑÑÕÌ°ÅÕ½ÐíMÑÑÕÌèA±ÍMÑÉР ±¹­ÜѼ    ¥¸ÌÌìÅÕ½Ðì¤)¹%((ÀÌØíµ¥¹Ý¥¹½ÜôU%
ÉÑ ÅÕ½Ðí ±¹¬ÅÕ½Ðì°ÈÀÀ°ÄÔÀ¤((ÀÌØí½ÁÑ¥½¹Í´ôÕ¥Ñɱ
ÉÑ5¹Ô ÅÕ½Ðí=ÁÑ¥½¹ÌÅÕ½Ðì¤(ÀÌØíÉÍѽɴôU%
Ñɱ
ÉÑ5¹Õ¥Ñ´ ÅÕ½ÐíIÍѽÉÅÕ½Ðì°ÀÌØí½ÁÑ¥½¹Í´¤)U%
ÑɱMÑ=¹Ù¹Ð ÀÌØíÉÍѽɴ°ÅÕ½ÐíIÍѽÉÅÕ½Ðì¤(ÀÌØí¡¥´ôU%
Ñɱ
ÉÑ5¹Õ¥Ñ´ ÅÕ½Ðí!¥ÅÕ½Ðì°ÀÌØí½ÁÑ¥½¹Í´¤)U%
ÑɱMÑ=¹Ù¹Ð ÀÌØí¡¥´°ÅÕ½Ðí!¥ÅÕ½Ðì¤(ÀÌØíÕѽ ôU%
Ñɱ
ÉÑ5¹Ô ÅÕ½ÐíÕѼ  ÅÕ½Ðì¤(ÀÌØíµ½ÕÍ´ôU%
Ñɱ
ÉÑ5¹Õ¥Ñ´ ÅÕ½Ðí5½ÕÍ
½½ÉÌÅÕ½Ðì°ÀÌØíÕѽ  ¤)U%
ÑɱMÑ=¹Ù¹Ð ÀÌØíµ½ÕÍ´°ÅÕ½Ðíµ½½ÉÅÕ½Ðì¤(ÀÌØí¥¹ÁÕÑ´ôU%
Ñɱ
ÉÑ5¹Õ¥Ñ´ ÅÕ½Ðí
½½É%¹ÁÕÐÅÕ½Ðì°ÀÌØíÕѽ   ¤)U%
ÑɱMÑ=¹Ù¹Ð ÀÌØí¥¹ÁÕÑ´°ÅÕ½Ðí¥¹ÁÕÐÅÕ½Ðì¤(((ÀÌØíÍÑÉÑôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíMÑÉÐÅÕ½Ðì°ÈÔ°ÔÀ°ÜÀ°ÈÔ¤)U%
ÑɱMÑ=¹Ù¹Ð ÀÌØíÍÑÉÑ°ÅÕ½ÐíMÑÉÐÅÕ½Ðì¤(ÀÌØíMѽÁôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíMѽÀÅÕ½Ðì°ÄÀÀ°ÔÀ°ÜÀ°ÈÔ¤)U%
ÑɱMÑ=¹Ù¹Ð ÀÌØíMѽÁ°ÅÕ½ÐíMѽÀÅÕ½Ðì¤(ÀÌØí¡MÑÑÕÌôU%
Ñɱ
ÉÑ1° ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÈÔ°ÈÀÀ°ÈÀ¤(ÀÌØí¡¥ôU%
Ñɱ
ÉÑ
¡­½à ÅÕ½Ðí!¥½U¹¡¥µ½¸MÑÉÐÅÕ½Ðì°ÄÀ°àÀ°ÈÀÀ°ÈÀ¤)U%MÑMÑÑ¡M]}M!=¤)U%MÑ=¹Ù¹Ð ÀÌØíU%}Y9Q}
1=M°ÅÕ½Ðí
1=M
±¥­ÅÕ½Ðì¤)]¥¹MÑ=¹Q½À ÀÌØíµ¥¹Ý¥¹½Ü°ÅÕ½ÐìÅÕ½Ðì°Ä¤)U%
ÑɱMÑÑ ÀÌØí¡MÑÑÕÌ°ÅÕ½ÐíMÑÑÕÌè
±¥¬MÑÉÐѼ   ¥¸ÌÌìÅÕ½Ðì¤()]¡¥±Ä(M±À ÈÀ¤(%%ÀÌØíM¡½ÜôÄQ¡¸($%U%
ÑɱMÑÑ ÀÌØí¡MÑÑÕÌ°ÅÕ½ÐíMÑÑÕÌè  ±¹¬MÑÉÑÅÕ½Ðì¤(
½¹Ñɽ±M¹ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐííiôÅÕ½Ðì¤(ͱÀ ÄÀÀÀÀ¤(¹%)]¹(()Õ¹MÑÉÐ ¤(ÀÌØíM¡½ÜôÄ(%ÉɽÈQ¡¸(5Í ½à À°ÅÕ½Ðí ±¹¬ÅÕ½Ðì°ÅÕ½Ðí    ±¹­Ü9½Ð½Õ¹ÅÕ½Ðì°¤(¹%($($ÀÌØí¥¹¼ôU%
ÑɱI ÀÌØí¡¥¤íÉÑ¡¡­½à(¥ ÀÌØí¥¹¼ôÀÌØíU%}
!
-¤Q¡¸í¡¬¥¥ÑÌ¡­(]¥¹MÑMÑÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°M]}5%9%5%i¤íÍÐÑ¡Ý¥¹½ÜÍÑÑ($%]¥¹MÑMÑÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤(ÀÌØíM¡½ÜôÄ(%¹%)¹Õ¹ìôôÐíMÑÉÐ(((Õ¹MѽÀ ¤(%%ÀÌØíM¡½ÜôÄQ¡¸ìÀÌØíMѽÀôÀQ¡¸(]¥¹MÑMÑÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°M]}M!=¤ìììM¡½Õ±$ÕÍ¥¹ÀÌØí¡¹±¡É¹±½Üü¸¸¸¹eL(]¥¹MÑMÑÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°M]}IMQ=I¤(]¥¹Ñ¥ÙÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì¤(U%
ÑɱMÑÑ ÀÌØí¡MÑÑÕÌ°ÅÕ½ÐíMÑÑÕÌè  ±¹¬!±ÑÅÕ½Ðì¤(ÀÌØíM¡½ÜôÀ(%±Í($%U%
ÑɱMÑÑ ÀÌØí¡MÑÑÕÌ°ÅÕ½ÐíMÑÑÕÌèÌäíII=HÌäì  ±¹¬9½ÐIÕ¹¹¥¹ÅÕ½Ðì¤(ÀÌØíM¡½ÜôÀ(%¹%)¹Õ¹()Õ¹IÍÑ½É ¤)]¥¹MÑMÑÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°M]}M!=¤)]¥¹MÑMÑÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°M]}IMQ=I¤)¹Õ¹()Õ¹!¥ ¤(%]¥¹MÑMÑÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°M]}5%9%5%i¤íÍÐÑ¡Ý¥¹½ÜÍÑÑ($$]¥¹MÑMÑÑ ÀÌØí¡¹±°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤($$($¹Õ¹($)Õ¹µ½½É ¤)ͱÀ ÈÀ¤)¹Õ¹()Õ¹¥¹ÁÕÐ ¤($ì$ÑÉ¥ÍÑÑ¥¹Í½µ½Ñ¡ÍѼ±½°¹¡ÙÁ±¹Õ¹¥É¹ÐÁ±ÌÝ¡¥±ÑÉ她¥É¹ÐÑ¡¥¹Ì¸($ÀÌØí¥¹ÁÕÑÝ¥¹½ÜôÕ¥ÉÑ ÅÕ½Ðí5½ÕÍ
½½ÉÌ%¹ÁÕÐÅÕ½Ðì°ÈÀÀ°ÈÀÀ°ÄÀÀ¤(ÀÌØíMÑÉÑÄôÕ¥
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíMÑÉÐÅÕ½Ðì°àÀ°ÄÔÀ°ÐÀ°ÐÀ¤(ÀÌØíEÕôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÐÀ°ÐÀ°ÄÀÀ°ÈÀ¤(ÀÌØíEÕÈôÕ¥
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ØÀ°ØÀ°ÄÀÀ°ÈÀ¤(U%MÑMÑÑ¡M]}M!=¤(]¡¥±È(ÀÌØíµÍôU%Ñ5Í ¤(M±Ð(
ÍÀÌØíµÍôÀÌØíMÑÉÑÄ(%U%
ÑɱI ÀÌØíEÕ¤ôÅÕ½ÐìÅÕ½Ðì½ÈU%
ÑɱI ÀÌØíEÕȤôÅÕ½ÐìÅÕ½ÐìQ¡¸(5Í  ½à À°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½ÐíA±Í¥±°¥¸
½½ÉÌÅÕ½Ðì¤(±Í(ÕѽġU%
ÑɱI ÀÌØíEÕ¤±U%
ÑɱI ÀÌØíEÕȤ¤(¹%(
ÍÀÌØíµÍôÀÌØíU%}Y9Q}
1=M(á¥Ð)¹M±Ð(]¹(¹Õ¹()Õ¹ÕÑ½Ä ÀÌØíEÕ°ÀÌØíEÕȤ(5½ÕÍ5½Ù ÀÌØíEÕ°ÀÌØíEÕȰĤ)¹Õ¹(()Õ¹]¥¹½Ý
±½Í ¤(%U%MÑMÑÑ¡M]}!¥¤(%¹Õ¹($()Õ¹
1=M
±¥­ ¤(U%
ÑɱMÑÑ ÀÌØí¡MÑÑÕÌ°ÅÕ½ÐíMÑÑÕÌè
±½Í¥¹¸¸!Ù¹¥äÌÌìÅÕ½Ðì¤(á¥Ð)¹Õ¹ìôôÐí
1=M
±¥­(

Thanks for help

-Tokey

Edited by TokeySmurf
Link to comment
Share on other sites

#include <GUIConstants.au3>
    $inputwindow = Guicreate("Mouse Coords Input", 200, 200, 100)
    $Startq = GuiCtrlCreateButton("Start", 80, 150, 40, 40)
    $Que = GUICtrlCreateInput("", 40, 40, 100, 20)
    $Que2 = GuiCtrlCreateInput("", 60, 60, 100, 20)
    GUISetState (@SW_SHOW)
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $Startq
            If GUICtrlRead($Que) = "" or GUICtrlRead($Que2) = "" Then
                MsgBox(0,"Error","Please Fill in Coords")
            Else
            Autoq(GUICtrlRead($Que),GUICtrlRead($Que2))
            EndIf
    Case $msg = $GUI_EVENT_CLOSE 
        Exit
EndSelect
    WEnd
    
Func Autoq($Que,$Que2)
    MouseMove($Que,$Que2,1)
EndFunc
This code works perfectly fine for me...

??

Link to comment
Share on other sites

yes that code does work, but it does not work within the

Func Input()

Why?.. Try my code then you'll see heh..

^Bump

Giving up on the pixel function its just not going to work as intended, Help here would be great as tHat code is still not working within Func Input()

Yes the code does work by itself, thats my problem, Understanding why it doesn't work inside my function

Link to comment
Share on other sites

  • Moderators

You can't use GUIOnEvenMode and GUIGetMsg in the same script unless you disable one first.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...