Jump to content

Scripting Integer input


Recommended Posts

So I'm pretty new at Autoit. here's what I'm trying to do.

First I need a Variable, which I'll call "Number" for simplicity.

What I want it to do is input that Variable at Location 234, 461, then internally Increment this by one, up to a cap that can be set.

Just as an example If Number > 150 Number = 10 else number+1

Then I want it to left click location 567,216

Then left click Location 682, 524

Then left click Location 346, 438

Then left click Location 409, 292

then I want it to loop Back to inputting "Number" to 234,461 and incrementing the number by 1.

I would also like to be able to start this loop by pressing the Home key, and End it by pressing the End key.

Could someone write a simple script to do this to help me learn AutoIT? I'd appreciate it a lot. I'm trying to Automate some work stuff and this example will help me code the tool I would like to make to make my boring desk job more boring ;)

Link to comment
Share on other sites

Firstly, it is probably not the way to go, with mouse clicks. when automating software.

You should only use that, if all else fails really.

Secondly, It's unlikely someone is going to write code for you, it is more likely you will

get help with any failed code you write, or problems you are having with it.

All Functions in the help file have examples you can learn from, these are some of those

you ought to be studying and learning from.

WinActivate()

ControlSetText()

ControlGetText()

HotKeySet()

Loops (While...WEnd)

Conditions (If...Else...EndIf)

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

If you wish to send clicks to a control (a button for example), I suggest reading about ControlClick in help file (and using it...). Rest, adher to JohnOne's suggestions as well.

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Link to comment
Share on other sites

Okay. thanks for the initial input.

i've got some of it written now,

But im stuck at the moment on Resetting the number once it hits the preditermined cap.

heres my code For that so far.

if ($Number < 150) Then $Number=$Number+1 else
$Number = 10

and I am now reading the help file, who knew it was so........ HELPFUL?

maybe i should have looked there first.

Edited by Silph
Link to comment
Share on other sites

and I am now reading the help file, who knew it was so........ HELPFUL?

maybe i should have looked there first.

There are lots of helpful information on www.autoitscript.com besides the online documentation. Please check out the links in my signature.

If $Number <= 150 Then
   $Number += 1
Else
   $Number = 10
EndIf
Spoiler

censored.jpg

 

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