Sign in to follow this  
Followers 0
atnextc

Create Textbix copy text to certain line of au3

4 posts in this topic

#1 ·  Posted (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 by atnextc

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

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