Jump to content

User-defined Variables via MouseClick


 Share

Recommended Posts

Hi all,

I searched for this, but I couldn't really find it, plus I don't know if it has a name or whatever. But what I want to do, is put out a universal script which prompts the user to click a location on the screen, and once clicked, it logs the coords of the click and inputs it in a variable location in the script. And once the variables are finished being inputed, the script will run and loop accordingly.

I'd also like to see if variables can be defined via text entry through a popup text box.

Can anyone help me with this?

Link to comment
Share on other sites

Wow, event EVE online starts to use Bots XD

Nice I dea with those Logings of Cords.. but I'm not sure how to make it work..

GL waiting for help here.. sometimes here are ppl who just feel a must to write code for fun ^^;

As i don't have much time, and have no idea yet.. cant help realy..

Did you tryed to make Script by your own?

Link to comment
Share on other sites

Wow, event EVE online starts to use Bots XD

Nice I dea with those Logings of Cords.. but I'm not sure how to make it work..

GL waiting for help here.. sometimes here are ppl who just feel a must to write code for fun ^^;

As i don't have much time, and have no idea yet.. cant help realy..

Did you tryed to make Script by your own?

lol yeah man, but all the EVE scripts are faulty every now and then. I have mine set up but it'll only work for my coords, but yes it DOES work. I went home to check on it during my lunch break, and I made over 600k in money :lmao: So I'm definitely pleased. And this is just with a level 1 mining ship, not a huge mining monster that you'll sometimes see :ph34r:

Link to comment
Share on other sites

Well, Because im nice, Ill do it for you =O, But next time, Have a try first.

#include <Misc.au3>

MsgBox(0, "", "Click to set your coordinates")
Do
$Loop = 1
    If _IsPressed("01") Then
        $Pos = MouseGetPos()
        $x = $Pos[0]
        $y = $Pos[1]
        $Loop = 0
    EndIf
Until $Loop = 0
MsgBox(0, "", "You clicked at: " & $x & ", " & $y)
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

Well, Because im nice, Ill do it for you =O, But next time, Have a try first.

#include <Misc.au3>

MsgBox(0, "", "Click to set your coordinates")
Do
$Loop = 1
    If _IsPressed("01") Then
        $Pos = MouseGetPos()
        $x = $Pos[0]
        $y = $Pos[1]
        $Loop = 0
    EndIf
Until $Loop = 0
MsgBox(0, "", "You clicked at: " & $x & ", " & $y)
Ok I been working on this all day at work, and have been having success at it because of your help, but I'm stuck again. I used the Dim command to assign each coord set to its own variable, and now I want to send them to a new file, such as a config file, to fill in the blanks. Is there a way to do this?

ALSO, I need an IF ELSE statement, but I'm not sure if that works in AutoIt like it does in PHP. For example, this is for the game EVE online where one of the activities is mining for minerals and stuff. Well, people have more then 1 mining laser, sometimes more then 5! So I need a command that will keep looking for additional coord sets until the user clicks "NO" when asked if they have additional lasers. Is there a way to do this?

Link to comment
Share on other sites

Ok I been working on this all day at work, and have been having success at it because of your help, but I'm stuck again. I used the Dim command to assign each coord set to its own variable, and now I want to send them to a new file, such as a config file, to fill in the blanks. Is there a way to do this?

ALSO, I need an IF ELSE statement, but I'm not sure if that works in AutoIt like it does in PHP. For example, this is for the game EVE online where one of the activities is mining for minerals and stuff. Well, people have more then 1 mining laser, sometimes more then 5! So I need a command that will keep looking for additional coord sets until the user clicks "NO" when asked if they have additional lasers. Is there a way to do this?

Well, to answer the first question, You could have something like,

#include <Misc.au3>

MsgBox(0, "", "Click to set your coordinates")
While 1
    If _IsPressed("01") Then
        $Pos = MouseGetPos()
        IniWrite("Settings.ini", "CoOrds", "x", $Pos[0])
    IniWrite("Settings.ini", "CoOrds", "y", $Pos[1])
        $x = IniRead("Settings.ini", "CoOrds", "x", "")
        $y = IniRead("Settings.ini", "CoOrds", "y", "")
        ExitLoop
    EndIf
WEnd
MsgBox(0, "", "You clicked at: " & $x & ", " & $y)

And, I changed the Do...Until, to a While...WEnd, Makes the code alittle shorter.

That should, When they click, it should write to a .ini file called Settings.ini, it will write the x and y, then $x and $y will read from the file :lmao:

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
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...