Jump to content
Sign in to follow this  
computergroove

How do I store a value and add a number to it?

Recommended Posts

computergroove

I am making a program that will auto fill a form. I am confused on a couple of things. I need it to go something like this:

$variable1 = 1000

While 1
    Call ("start")
WEnd
Func start()
    MouseClick ("left"); I want this to click on a x,y coordinate - not sure of the code but I do have the coordinates
        Send ("variable1")
        Send ("{TAB}")
        Send ("variable1")
        Send ("{ENTER}")
        variable1 = variable1 + 1; I am guessing that this is also coded wrong but I want the 1000 to become 1001
    Sleep (3000)
    Send ("{BACKSPACE}")
    Sleep (3000)
    call("start")
EndFunc

I have most of this down. I was not able to understand the variable tutorial. Any help is appreciated. Thanks


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

Share this post


Link to post
Share on other sites
Pain

this one will click on the upper left corner

MouseClick ("left",0,0)

to increase the number use

Send ($variable1 + 1)

Edited by Pain

Share this post


Link to post
Share on other sites
martin

I am making a program that will auto fill a form. I am confused on a couple of things. I need it to go something like this:

$variable1 = 1000

While 1
    Call ("start")
WEnd
Func start()
    MouseClick ("left"); I want this to click on a x,y coordinate - not sure of the code but I do have the coordinates
        Send ("variable1")
        Send ("{TAB}")
        Send ("variable1")
        Send ("{ENTER}")
        variable1 = variable1 + 1; I am guessing that this is also coded wrong but I want the 1000 to become 1001
    Sleep (3000)
    Send ("{BACKSPACE}")
    Sleep (3000)
    call("start")
EndFunc

Welcome to the AutoIt forums!

Perhaps this will do it.

$variable1 = 1000

While 1
    Start();using Call is not needed
WEnd
Func start()
Local $xpos = 345, $ypos = 776;put your coordinates here
    MouseClick ("left",$xpos, $ypos); I want this to click on a x,y coordinate - not sure of the code but I do have the coordinates
        Send ($variable1);use the variable name itself
        Send ("{TAB}")
        Send ($variable1)
        Send ("{ENTER}")
        $variable1 = $variable1 + 1; I am guessing that this is also coded wrong but I want the 1000 to become 1001
    Sleep (3000)
    Send ("{BACKSPACE}")
    Sleep (3000)
  ; call("start");don't call the function again or you will get a problem
EndFunc

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
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
Sign in to follow this  

×