Sign in to follow this  
Followers 0
ewjammer

problem automating click-n-ship

1 post in this topic

I'm having a bit of trouble with inconsistent responses.

The script below logs on to the usps web site and runs the click-n-ship procedure.

But when selecting address from the address book, the "space" command, which should activate a radio button, sometimes does not work.

I chose to use tabs, spaces, and enter commands to avoid the danger of mouse clicking on other computers which may have different screen sizes and different mouse coordinates. You know the problem.

The sleeps are a pain and are probably largely unneeded.

I wish there was a way for AutoIt to run in a sort of debug mode where commands could be stepped through one at a time.

Also a slow-down mode would be nice.

Thanks for any suggestions.

;AutoIt script for creating a mailing label

Run("C:\Program Files\Mozilla Firefox\firefox.exe")

WinWaitActive("iGoogle - Mozilla Firefox")

send("^l")

send("https://ecap-ws-prod.usps.com/entreg/loginView.do{ENTER}")

WinWaitActive("USPS - The U.S. Postal Service Sign In Page [build 080804] - Mozilla Firefox")

;login to usps web site

send("autoit_tester")

send("{TAB}")

sleep(1000)

send("Tester001")

send("{enter}")

sleep(1000)

;Destination Selection

WinWaitActive("USPS - Print Shipping Labels - Mozilla Firefox")

send("{TAB 15}")

sleep(1000)

send("{ENTER}")

sleep(1000)

;goto address book for sender

WinWaitActive("USPS - Enter Label Information - Mozilla Firefox")

sleep(1000)

send("+{TAB 19}")

sleep(1000)

send("{ENTER}")

;Addressbook - Return Address

WinWaitActive("USPS - My Address Book - Mozilla Firefox")

sleep(1000)

send("{TAB 8}")

sleep(1000)

send("{SPACE}")

Sleep(1000)

send("{TAB}")

sleep(1000)

send("{ENTER}")

;Print Shipping Label - Shipping From

WinWaitActive("USPS - Enter Label Information - Mozilla Firefox")

sleep(1000)

send("{TAB 24}")

sleep(1000)

send("{SPACE}")

sleep(1000)

send("{TAB 4}")

sleep(1000)

send("{ENTER}")

;Addressbook - To Address

WinWaitActive("USPS - My Address Book - Mozilla Firefox")

sleep(1000)

send("{TAB 7}")

sleep(1000)

send("{SPACE}")

sleep(1000)

send("{TAB}")

sleep(1000)

send("{ENTER}")

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