Jump to content

Create Textbix copy text to certain line of au3


Recommended Posts

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
Link to comment
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.

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