Jump to content

please help me with a super easy script!


yoloswag
 Share

Recommended Posts

hey guys. i need to create a very simple script, but after reading tutorials and trying for hours i can't figure this stuff out. i'm sure to anyone who knows a bit about autoit, it will be a 5 minute walk in the park.

basically i need a script that when ran, does the following upon me pressing the "R" key:

detect current mouse position, and store it in a variable

move the mouse pointer to coordinates (364,49)

perform a left click

and move the mouse back to the stored position

that's it. 

i would be infinitely grateful! thanks in advance for any help, or maybe even the bit of code needed.

much love <3

:)

Link to comment
Share on other sites

i'm a professional concept artist and needed a photoshop plugin to press a single button (that sadly cant be asigned to any key) that has an important feature for my workflow. i failed in my attempts to learn to code photoshop plugins and was awared on autoit!

thank you so much! :) works like a charm

wish all ya'll the best in your future endeavours!

Link to comment
Share on other sites

HotKeySet("r", "Start")

While 1
    SLeep(100)
WEnd

Func Start()
    $aMousePos = MouseGetPos()
    MouseClick("Left", 364, 49, 1, 0)
    MouseMove($aMousePos[0], $aMousePos[1])
EndFunc

The above script will do the job, but maybe a better way to go is get an ID on the control so you can activate the control without the mouse clicking on it. That would be much more stable. In the AutoIt suite of tools you installed is a tool called AutoIt Info Tool.. Run that and use it to get the ID of the control. Post the ID and we can quickly see if we can script a simple script that will do what you need.

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