Thank you for your replies I will checkout Selenium for sure. I am not a very good code writer. I did figure out how to get the information I needed now I need to figure out how to populate the fields after I get all of the information for the router. How do I paste in pertinent back in to the order form. As you can see from this code I've recreated I can get the data in but who to I paste it back into the IDs on the page. This is the code I have so far.
Code: Select all
:o:wodata.::
;comment get work order data from IE. It does work.
;~ SoundSet, 0
;~ FileDelete %A_scriptdir%\ordersave.txt
;~ Clipboardold=%Clipboard%
Clipboard =
gosub clearvars
SetKeyDelay, 30, 30
Gui, +AlwaysOnTop
winset, AlwaysOnTop, On
;var:=pwb.LocationURL ;grab current url
;msgbox,, page url, % var
{
pwb := WBGet()
woout:=pwb.document.getElementByID("arid_WIN_0_600200016").Value ; Work Order Number
;~ MsgBox, % woout
srwout:=pwb.document.getElementByID("arid_WIN_0_536870918").Value ; Service Request Number
;~ MsgBox , % srwout
fnout:=pwb.document.getElementByID("arid_WIN_0_600200003").Value ;Unique ID
;~ MsgBox, % fnout
lnout:=pwb.document.getElementByID("arid_WIN_0_600200006").Value ;Unique ID
;~ Msgbox, % lnout
phoneout:=pwb.document.getElementByID("arid_WIN_0_600200004").Value ;Unique ID
;~ Msgbox, % phoneout
email:=pwb.document.getElementByID("arid_WIN_0_600200640").Value ;Unique ID
;~ Msgbox, % email
vfname:=pwb.document.getElementByID("arid_WIN_0_600200239").Value ;Unique ID
;~ Msgbox, % vfname
vlname:=pwb.document.getElementByID("arid_WIN_0_600200240").Value ;Unique ID
;~ Msgbox, % vlname
vphone:=pwb.document.getElementByID("arid_WIN_0_600200241").Value ;Unique ID
;~ Msgbox, % vphone
vemail:=pwb.document.getElementByID("arid_WIN_0_600200342").Value ;Unique ID
;~ Msgbox, % vemail
wocomout:=pwb.document.getElementByID("arid_WIN_0_600200720").Value ;Unique ID
;~ MsgBox %wocomout%
Clipboard = %wocomout%
ClipWait, 2
uNames := "Telework request:,NOTE:,user requires Finesse and mobility extension as they will be answering calls at home and in-office,DHS,DHS division name:*,where will the contact center agent log in to Finesse to take calls from: Home address, HCEO,DHS Telework request,DHS division name:,division name:,DSD,Create.*, FinDept*,Home address:,Work phone number:,Internet service provider,MNIT ticket WO#: ,If yes, does the Teleworker use Calabrio to monitor and record calls:"
;~ "Teleworker ,NOTE:,user requires Finesse and mobility extension as they will be answering calls at home and in-office,DHS division name: HCEO,DHS Telework request,DHS division name: DSD,Create.*,Home address:,o Home User C.*,If.*,o Telework User instructions for successful set up,MNIT ticket WO#:,o SRW#*,o WO.*,If Teleworker.*,o 911.*,Complete item*,o User Res.*,Complete items*,o Teleworker Name,o Teleworker Division,Complete.*,o 911 Testing.*,s listed in the detail., #,Work phone number:,Internet service provider:,Internet speed:,Work phone number:,Call Center,DHS division name: Member and Provider Services, Agent:,DHS,.*: Appeals,&,division name.*,CVO Project. Replace the CVO router for this site as a part of the CVO upgrade project,&,<,>,o Telework User instructions for successful,Supervisor.* "
sleep 500
Loop, Parse, uNames, `,
clipboard := RegexReplace(clipboard, a_loopfield)
send {tab}
;send woinfo.ini {enter
StringReplace, clipboard, clipboard, *, , All
;~ MsgBox %clipboard%
sleep 500
;~ send ^v
wocomout = %clipboard%
;~ MsgBox %wocomout%
;~ IfExist, %A_scriptdir%\ordersave.txt
;~ {
;~ FileDelete %A_scriptdir%\ordersave.txt
;~ }
;~ else
run, %nppp% %A_scriptdir%\ordersave.txt
sleep 5000
send ^a
send {delete}
#WinActivateForce, ordersave.txt Notepad++ ahk_class Notepad++ ahk_exe notepad++.exe
send ^v
send ^v
;~ MsgBox, % srwout
InputBox, callagent, Is This User A Call Agent,Yes or No,,,,2235,0,,,Yes
;~ MsgBox %callagent%
InputBox, rodout, Enter DHS ROD Number,ROD #,,,,2235,0,,,NA
;~ MsgBox %rodout%
InputBox, devout, Enter Device Name ,Devname,,,,2235,0,,,1111
InputBox, serout, Enter Serial Number,Serial#,,,,2235,0,,,1111
InputBox, assout, Enter Asset Number,Asset#,,,,2235,0,,,1111
;~ MsgBox %assout%
InputBox, lbout, Enter Loopback,Loopback,,,,2235,0,,,1111
;~ MsgBox %lbout%
InputBox, dnout, Enter Data Network,Data Network,,,,2235,0,,,1111
InputBox, vnout, Enter Voice Network,Voice Network,,,,2235,0,,,1111
Inputbox trunkout, Enter Provider and Speed, Details,,,,2235,0,,1111
strout:=pwb.document.getElementByID("arid_WIN_0_600100063").Value ;Unique ID
if InStr(strout, "540 CEDAR ST") or instr(strout, "345 PLATO BLVD ") or instr(strout, "444 LAFAYETTE")
{
;~ ;InputBox, OutputVar [, Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default]
;~ InputBox, OutputVar, Last Name, What Is The Last Name,,,,2235,0,,,Default
InputBox strout, Enter The Real Street Address, Street Address,,,,2235,0,,1111
inputbox ctout, Enter City, Enter City,,,,2235,0,,1111
inputbox state, Enter State, Enter State,,,,2235,0,,1111
inputbox zipout, Enter Zip Code,,,,2235,0,,,1111
addout= %strout%`, %ctout%,` %state% %zipout%
}
else
{
state:=pwb.document.getElementByID("arid_WIN_0_600100057").Value ;Unique ID
MsgBox, % state
zipout:=pwb.document.getElementByID("arid_WIN_0_600100068").Value ;Unique ID
MsgBox, % zipout
}
ClipWait, 1
clipboard := RegexReplace(Clipboard, "\s*(\n|\r\n)", A_Space)
sleep 3000
MsgBox click on notepad
gosub key111
send %devout%=%lbout%|%serout%|%assout%|%woout%|%srwout%|%rodout%|%dnout%|%vnout%|%trunkout%|%strout%{space}%ctout%{space}%state%{space}%zipout%|%strout%|%ctout%|%state%|%zipout%|%fnout%|%lnout%|%phoneout%|%callagent%|%email%|%vfname%|%vlname%||%vphone%|%vemail%|%A_DDD%, %A_MMM% %A_DD%, %A_YYYY%
FileAppend, %devout%=%lbout%|%serout%|%assout%|%woout%|%srwout%|%rodout%|%dnout%|%vnout%|%trunkout%|%strout%{space}%ctout%{space}%state%{space}%zipout%|%strout%|%ctout%|%state%|%zipout%|%fnout%|%lnout%|%phoneout%|%callagent%|%email%|%vfname%|%vlname%||%vphone%|%vemail%|%A_DDD%, %A_MMM% %A_DD%, %A_YYYY%, %A_scriptdir%\ordersave.txt
;~ FileAppend, %devout%=%lbout%|%serout%|%assout%|%woout%|%srwout%|%rodout%|%dnout%|%vnout%|%trunkout%|%addout%|%strout%|%ctout%|%state%|%zipout%|%fnout%|%lnout%|%phoneout%|%callagent%|%wocomout%, %A_scriptdir%\ordersave.txt
;~ FileAppend, %zipout%`n, %A_scriptdir%\ordersave.txt
;~ run, notepad++.exe %A_scriptdir%\ordersave.txt
winset, AlwaysOnTop, Off
}
return
Any help would be greatly appreciated.