Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Let's say my account # is: 123456
Let's say my password is: abcde
How to use "Sendkey" in a script and assign the script to the hotkey Ctrl/a.
When I put the cursor in the first box and press Ctrl/a, the computer will type 123456 (acc #) and tab to the 2nd box and type in abcde (password).
This is extremely useful to me because I have many accounts, and they all have different account numbers and passwords.
Thank you very much for your help.
Or here's the basic script using MSIE/OLE...
; what you can do is go to the entry page and save it to your ; harddisk by hand (FILE/SAVEAS WEBPAGE ONLY), then examine ; it in WinStudio. more help below... ; Winbatch 2004F and MSIE 6... #DefineSubRoutine startMSIE(url) Browser = ObjectOpen("InternetExplorer.Application") Browser.addressbar = @FALSE Browser.statusbar = @FALSE Browser.menubar = @FALSE Browser.toolbar = @FALSE browser.visible = @TRUE browser.navigate(url) ; wait until page loads... WaitForPageLoad() ; setup the document object... browserDoc = Browser.Document all = browserdoc.all Return(browser) #EndSubRoutine #DefineSubroutine WaitForPageLoad() ; assume Browser While browser.busy || browser.readystate == 1 TimeDelay(0.5) EndWhile While browser.Document.ReadyState != "complete" TimeDelay(0.5) EndWhile return #EndSubroutine startURL = "http://grd.fedex.com/cgi-bin/rtt2010.exe?link=2&func=entry" br = startMSIE(startURL) ; if you save the entry page to a file, then inspect it you'll see ; where the "OriginZip" and "DestZip" came from. oz = all.OriginZip dz = all.DestZip outfile = "c:\test\stan\fedex3.html" ; <--- adjust path to file... ; loop here ------------------------------------------------- oz.value = "92374" ;<-- assign the values we want... dz.value = "90610" TimeDelay(3) ;<-- give the user a few seconds to see... inputlist = browserdoc.GetElementsByTagName("INPUT") For x = 0 To inputlist.length-1 thisinput = inputlist.item(x) If thisinput.value == "Get Transit Time" ;<-- this button isn't named, but it does have a value ; so when we find the button with the correct value ; we click it... thisinput.click ObjectClose(thisinput) Break EndIf ObjectClose(thisinput) Next ObjectClose(inputlist) While Browser.busy || Browser.readystate <> 4 TimeDelay(0.5) EndWhile body = browserdoc.body tablelist = browserdoc.GetElementsByTagName("TABLE") For x = 0 To tablelist.length-1 thistable = tablelist.item(x) If StrIndexNC(thistable.innerText, "scheduled service days", 1, @FWDSCAN) FilePut(outfile, thistable.outerHTML) EndIf ObjectClose(thistable) Next ObjectClose(tablelist) ObjectClose(body) ; loop here ------------------------------------------------- ShellExecute(outfile, "", "C:\", @NORMAL, "")
Article ID: W16130
File Created: 2014:07:18:09:51:38
Last Updated: 2014:07:18:09:51:38