Jump to content

Making something simple, couldn't find it in help file!


Recommended Posts

Hello autoit pro's :P

I downloaded autoit this afternoon and i've spent an hour searching through the examples and help file to try and find the things I need to make my simple script. But to no avail...

Basically, I want autoit (using v3) to:

1. Open up a program

2. Enter a 6-7 digits in a specified field

3. (Optional) Click one of two radio buttons

4. Select from drop down box

5. Click 5 buttons in descending height order

6. Select another option from the drop down box

7. Repeat 5

8. Continue 6-7 until until all options in the drop down are completed.

Edit: Here's a screenshot of the buttons I would like it to press and the fields for it to fill in.

Posted Image

Hope someone can help!

Is this possible? The program is done in visual basic and is just a shabby home brew type thing for filling out forms. Despite it's shabbiness, I'd very much like to make an autoit script for it!

I'm not asking for any handouts, or for anyone to tailor a script to your needs but if you give pointers or point me in the right direction for any articles/tutorials then it would be extremely appreciated!

Thanks! :)

Edited by Hello Me You
Random
Link to comment
Share on other sites

But the Control functions are safer, No?

Agreed. It is much more reliable and if he just wanted to record somthing and play it back macro maker is much more simple, but that wouldnt allow him to have options to click radio buttions or change what is typed,

Look at

-run

-controlsend

-controlclick

-while(might want it to loop)

in the help file should get you going.

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

Thanks alot guys, i've been using AU3Recorder and it's treating me well. I think after I use that for the basics i'll go back to the tutorial and clean it up a bit.

But another question: Once I start the script how do I pause it? It controls the mouse so I can't get to the tray a click the autoit icon.

Also, is it possible to have a dialogue box where one can insert different digits? Like for the ID field I have Send("09843") - can I get an autoit box to pop up and ask for what number to put in there? Hope it makes sense :S

Random
Link to comment
Share on other sites

Taken from helpfile for pause

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage")  ;Shift-Alt-d

;;;; Body of program would go here ;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc

as for aialogue box make a variable and have the input box change the varable and then later in the script the variable is called?

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

vivvic: Thanks! And yep, that's what I want. I'll look through the help file again

edit: Okay i'm using control click and it's working well but I can't select from the drop down box :) Does anyone know how to make it just go down the drop down box and select them?

Edited by Hello Me You
Random
Link to comment
Share on other sites

vivvic: Thanks! And yep, that's what I want. I'll look through the help file again

edit: Okay i'm using control click and it's working well but I can't select from the drop down box :) Does anyone know how to make it just go down the drop down box and select them?

Use ControlSend() as text use Alt+Down: "!{DOWN}"

Link to comment
Share on other sites

so...

ControlSend ( "title", "Alt+Down: "!{DOWN}"", controlID, "string" [, flag] ) ?

Shouldn't it be in the string/flag section?

Of course yes (string parameter). I did some small kick of to you for right direction.

You must see in HelpFile and make it exactly.

ControlSend ( "title of window", "", "Combo classname", "!{DOWN}")

here you must fill your title of window and your classname of combo.

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