atnextc Posted August 13, 2007 Share Posted August 13, 2007 (edited) I need this script that I have written before it runs to prompt a textbox, and then copy what is entered and paste it into line 20 of the script is this possible? Thanks for any help in this matter. ;Auto Login in and Have cursor ready to enter Phone Number #include <IE.au3> $url = "hxxps://wholesale.erepair.bellsouth.com/apps/erepair/Login/" $oIE = _IECreate($url, 1) WinWaitActive("AT&T - eRepair - Login - Microsoft Internet Explorer") $oFormLogin = _IEFormGetCollection($oIE, 0) WinWaitActive("AT&T - eRepair - Login - Microsoft Internet Explorer") Send('{TAB 4}') Send("username") Send ("{TAB}") $oQueryPass = _IEFormElementGetObjByName($oFormLogin, 'password') _IEFormElementSetValue($oQueryPass, 'pass') Send ("{TAB}") Send ("{ENTER}") WinWaitActive("AT&T - eRepair - Welcome to eRepair - Microsoft Internet Explorer") ShellExecute("hxxs://wholesale.erepair.bellsouth.com/apps/erepair/Find/GetCreateTicketSearchPage") WinWaitActive("AT&T - eRepair - Enter Trouble Ticket - Microsoft Internet Explorer") Send('{TAB 22}') Send("5551234567") Send ("{ENTER}") WinWaitActive("AT&T - eRepair - Create a Trouble Ticket - Microsoft Internet Explorer") Sleep(2000) Send('{TAB 22}') Send("{DOWN 2}") Send('{TAB 8}') Send ("{ENTER}") Edited August 13, 2007 by atnextc Link to comment Share on other sites More sharing options...
gamerman2360 Posted August 13, 2007 Share Posted August 13, 2007 You could do that but it would be much easier if you just had it Send input from an input box.;Auto Login in and Have cursor ready to enter Phone Number #include <IE.au3> $number = InputBox("Number", "Enter a/the number", "5551234567") $url = "hxxps://wholesale.erepair.bellsouth.com/apps/erepair/Login/" $oIE = _IECreate($url, 1) WinWaitActive("AT&T - eRepair - Login - Microsoft Internet Explorer") $oFormLogin = _IEFormGetCollection($oIE, 0) WinWaitActive("AT&T - eRepair - Login - Microsoft Internet Explorer") Send('{TAB 4}') Send("username") Send ("{TAB}") $oQueryPass = _IEFormElementGetObjByName($oFormLogin, 'password') _IEFormElementSetValue($oQueryPass, 'pass') Send ("{TAB}") Send ("{ENTER}") WinWaitActive("AT&T - eRepair - Welcome to eRepair - Microsoft Internet Explorer") ShellExecute("hxxs://wholesale.erepair.bellsouth.com/apps/erepair/Find/GetCreateTicketSearchPage") WinWaitActive("AT&T - eRepair - Enter Trouble Ticket - Microsoft Internet Explorer") Send('{TAB 22}') Send($number) Send ("{ENTER}") WinWaitActive("AT&T - eRepair - Create a Trouble Ticket - Microsoft Internet Explorer") Sleep(2000) Send('{TAB 22}') Send("{DOWN 2}") Send('{TAB 8}') Send ("{ENTER}")I think all of that tabbing and entering could be done using $oIE to click directly on the element. Link to comment Share on other sites More sharing options...
atnextc Posted August 13, 2007 Author Share Posted August 13, 2007 Thanks for the quick reply. I just learned how to use this program yesterday so I'm pretty impressed that it works as is. This new code should work fine? Link to comment Share on other sites More sharing options...
atnextc Posted August 13, 2007 Author Share Posted August 13, 2007 Thank you so much that worked just perfectly! Also I have one that I use to auto login to a RDP connection, but then the rest of the script just dies. Is there anyhting that i can do to fix this? 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