polok Posted June 17, 2009 Share Posted June 17, 2009 Hi, I'm doing my first steps with AutoIT so please be tolerance I would like to create POP3 account automatically. I create a solution with GUI manipulation (I know that this is not good solution but for now it works expandcollapse popupIf WinActivate("Microsoft Outlook","") Then MsgBox(4096, "Outlook Configurator", "Program is now configuring your Mailbox!!!",2) $input=inputbox("Outlook Configurator","Enter your name") If @error=1 Then Exit EndIf $input2=inputbox("Outlook Configurator","Enter your surname") If @error=1 Then Exit EndIf Sleep(500) Send("!{t}") Sleep(500) Send("{a}") Sleep(500) Send("!{V}") Sleep(500) Send("{n}") Sleep(500) Send("!{a}") Sleep(500) Send("{p}") Sleep(500) Send("{ENTER}") Sleep(500) Send($input2&", "&$input) Sleep(500) Send("{TAB}") Sleep(500) Send($input&"."&$input2&"@MAIL.com") Sleep(500) Send("{TAB}") Sleep(500) Send("10.XX.XX.XX") Sleep(500) Send("{TAB}") Sleep(500) Send("110.XX.XX.XX") Sleep(500) Send("{TAB}") Sleep(500) Send("login") Sleep(500) Send("{TAB}") Sleep(500) Send("password") Sleep(500) Send("!{M}") Sleep(500) Send("mailbox name") Sleep(500) Send("^{TAB}") Sleep(500) Send("{Space}") Sleep(500) Send("{TAB}") Sleep(500) Send("{DOWN}") Sleep(500) Send("{TAB}") Sleep(500) Send("USER SMTP") Sleep(500) Send("{TAB}") Sleep(500) Send("PASSWOERD SMTP") Sleep(500) Send("^{TAB}") Sleep(500) Send("^{TAB}") Sleep(500) Send("{TAB}") Sleep(500) Send("{TAB}") Sleep(500) Send("{ENTER}") Sleep(500) Send("{ENTER}") Sleep(500) MsgBox(4096, "Outlook Configurator", "Your Mailbox is now configured!!!",2) ENDIF Exit How can I upgrade this code? I would like to find a solution and don't manipulate gui Thanks a lot Regards Mateusz Link to comment Share on other sites More sharing options...
KenNichols Posted June 18, 2009 Share Posted June 18, 2009 Take a look at ControlClick and ControlSend in the help file and use "AutoIt v3 Window Info" to figure the rest out. CODEe.g. Send text to the 1st Edit control in the Notepad window ControlSend("Untitled - Notepad", "", "[CLASS:Edit; INSTANCE:1]", "This is some text") or ControlSend("Untitled - Notepad", "", "[CLASSNN:Edit1]", "This is some text") or ControlSend("Untitled - Notepad", "", "Edit1", "This is some text") e.g. Click on control ID 254 in "My Window" ControlClick("My Window", "", "[iD:254]") or ControlClick("My Window", "", 254) e.g. Click the 2nd instance of a "Button" control containing the text "Finish" ControlClick("My Window", "", "[CLASS:Button; TEXT:Finish; INSTANCE:2]") [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now