Jump to content

A box script


LuckyT
 Share

Recommended Posts

Hey, I want to make a script. It's a coord. finder.

It writes the coords in a txt file like that "MouseMove(x ,y)"

But I want to write something like "MouseMove(x, y) ; Example"

I dont want to be confused when i am reading the txt..

So i want a script that show a box where you can type words that will be showed in txt (If i take the coords from "X" Button I want to write  "MouseMove(coords) ; X Button")

 (Sorry... i am not good at english)

Link to comment
Share on other sites

  • Developers

Welcome,

Is there a question in your post or are you telling us upfront what script you are going to code?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=Working Exe's\pixelgetcolorandhexParksModified.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GuiConstants.au3>
#include <date.au3>

Opt("GUIOnEventMode", 1)
Opt("WinTitleMatchMode", 4) ; set title matchmode to advanced

Global $xoffset = 37
Global $yoffset = 23
Global $wposx, $wposy, $DT, $cWIN, $xcalcL, $xcalcR, $ycalc, $cpos, $pos, $tpos, $hexV, $pcolor
Global $title = "Your Title Here"

HotKeySet("{ESC}", "Terminate") ; a way out of this

$pGUI = GUICreate($title, 300, 13, -1, -1, $WS_POPUP);Make a GUI next to mouse
$startLAB = GUICtrlCreateLabel(" X: 0000, Y: 0000", 0, 0, 300, 13);Fill GUI with coords
GUICtrlSetBkColor($startLAB, 0xCCFFFF);Background color of GUI window

WinSetOnTop($pGUI, "", 1);Make GUI topmost

GUISetState(@SW_SHOW)

While 1
    _nMGP()
WEnd

Func _nMGP()
    Local $_cpos = MouseGetPos()
    Sleep(0010)
    $pcolor = PixelGetColor($_cpos[0],$_cpos[1])
    $pos = MouseGetPos()
    GUICtrlSetData($startLAB, ' X: ' & $pos[0] & ', Y: ' & $pos[1] & ' HEX: ' & HEX($pcolor,6) & ' DEC: ' & $pcolor)
    If $DT = 1 Then
        $xcalcR = .95 * @DesktopWidth
        $xcalcL = .05 * @DesktopWidth
        $ycalc = .90 * @DesktopHeight
        If $pos[1] > $ycalc Then
            $wposy = $pos[1] - $yoffset * 2 ; If too close to bottom of screen position above mouse pointer
        Else
            $wposy = $pos[1] + $yoffset ; Position label beneath the mouse pointer
        EndIf
        If $pos[0] > $xcalcR Then ; If too close to right side of screen move it
            $wposx = $pos[0] - $xoffset * 3
        ElseIf $pos[0] < $xcalcL Then ; If too close to left side of screen move it
            $wposx = $pos[0] + 10
        Else
            $wposx = $pos[0] - $xoffset ; Use normal offsets for positioning label
        EndIf
    Else
        _clientmouse()
    EndIf
    WinMove($title, "", $wposx, $wposy) ; Move the label appropriate to follow the mouse
EndFunc   ;==>_nMGP

Func _clientmouse()
    Opt("MouseCoordMode", 1)
    $tpos = MouseGetPos()
    $cpos = WinGetPos($cWIN)
    $xcalcR = .95 * $cpos[2]
    $xcalcL = .05 * $cpos[2]
    $ycalc = .90 * $cpos[3]
    If $tpos[1] > $ycalc Then
        $wposy = $tpos[1] - $yoffset * 2 ; If too close to bottom of screen position above mouse pointer
    Else
        $wposy = $tpos[1] + $yoffset ; Position label beneath the mouse pointer
    EndIf
    If $tpos[0] > $xcalcR Then ; If too close to right side of screen move it
        $wposx = $tpos[0] - $xoffset * 3
    ElseIf $tpos[0] < $xcalcL Then ; If too close to left side of screen move it
        $wposx = $tpos[0] + 10
    Else
        $wposx = $tpos[0] - $xoffset ; Use normal offsets for positioning label
    EndIf
EndFunc   ;==>_clientmouse

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

It wont write to a file but it will get you started.

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Link to comment
Share on other sites

Sounds like a type of keylogger to me.  :/

Also ... why reinvent the wheel?

 

It looks like a program that is for getting x and y coords and writing them down with a click. I would guess game automation but it could be for anything.

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Link to comment
Share on other sites

It looks like a program that is for getting x and y coords and writing them down with a click. I would guess game automation but it could be for anything.

True ... but look at my second comment before judging.  I said "Why reinvent the wheel" 

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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