Sign in to follow this  
Followers 0
Hello Me You

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

15 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



I guess you could use the Control functions too click an set data of the inputs


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
Share on other sites

Actually, first can someone explain how to open the program using an autoit script? Because without the first step i cannot test any of the suggestions :)

rambo: Reading up on that now, thanks


Random

Share this post


Link to post
Share on other sites

Run("Your proigram.exe")

This will run a exe file like run("C:\Windows\system32\calc.exe")

Will lauch your calculator


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
Share on other sites

Isn't there an AU3Recorder as one of the options in the editor pulldown menu?

Share this post


Link to post
Share on other sites

But the Control functions are safer, No?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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]

Share this post


Link to post
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

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
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}"

Share this post


Link to post
Share on other sites

so...

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

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


Random

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Yep i've got it to {DOWN} twice then {ENTER} :) Thanks!

up to the last part now, i'd like it to loop 12 times but the While and Loop parts of the index are completely confusing to me :P

Thanks for all the help so far guys, really appreciate it :D


Random

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  
Followers 0