Jump to content

Newbie - Buttons and Edit


JJJAuto
 Share

Recommended Posts

I'm very new to Autoit and the samples are just showing Notepad and Wordpad. 

I'm trying to do some automation and would be grateful if somebody could show me the way. 

I'm trying to use Autoit to automate a software, Basically I need to enter

1. Enter a Start Page NO

2. Enter a end page number

3. Click on DOWNLOAD button,

4. Wait 60 seconds

5.  increment the start number by 10 and then click "DOWNLOAD" again until a specific number, say Page 180. 

THANKS !!

GUI.jpg

Download.jpg

StartNumber.jpg

EndNumber.jpg

Link to comment
Share on other sites

$title = "VitalSource Downloader"
$start = 10
$end = 19

While 1
    If $end > 180 Then ExitLoop
    ControlSetText($title, "", "TEdit3", $start)
    ControlSetText($title, "", "TEdit1", $end)
    ControlClick($title, "", "TButton1")
    Sleep(60000)
    $start += 10
    $end += 10
WEnd

 

Edited by Zedna
Link to comment
Share on other sites

Thanks !! That works great !! 


The sleep was a bit of a hit and miss as I misunderstood how the app timeout works.  It still seems to works even when the button was not seen, so that's a bit surprising. 

I'm assuming that's because the Tbutton has a ClassnameNN of Tbutton2 when it's "Pause" and Tbutton3 when it's Resume, so only when it's download that it's seem as "Tbutton1" ? Does that means that it wouldn't click until it Tbutton appear ? 

Once again, THANKS !! This is very helpful 

REsume2.jpg

pause.jpg

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