| 1. |
Solve : Starting Internet Explorer using a DOS Batch file? |
|
Answer» Hi, I've tried the usual superstitious advice people offer From superstitious to slick. No too bad for a mornings work. Code: [Select]@echo off start "" "c:\program files\internet explorer\iexplore.exe" "http://www.facebook.com/photo.php?pid=848358&o=all&op=1&view=all&subj=10193807237&aid=-1&id=530366140&oid=10193807237#pid=848358&id=530366140" How much is a quid worth in USD?hmm, about 1.9 something dollars but it's less and less as the day goes on!one other thing, they have a login screen on the website i'm trying to automate -- any idea how i can get the batch file to shove the login and password in there as it goes through into the explorer? this project is bringing awkward new problems every time i get one thing solved..You can't with batch code. You've crossed over the line into WINDOWS Scripting. Code: [Select]Set objIE = CreateObject("InternetExplorer.Application") objIE.Navigate "http://www.facebook.com/photo.php?pid=848358&o=all&op=1&view=all&subj=10193807237&aid=-1&id=530366140&oid=10193807237" Do WScript.Sleep 250 Loop Until Not objIE.Busy objIE.Visible = True Set theForm = objIE.Document.Forms(0) With theForm .email.Value = "[emailprotected]" .pass.Value = "password" .submit End With Change the email address and password. Save the script with a vbs extension. Run from the command prompt as cscript scriptname.vbs PS. Please give all the information in your first REQUEST. It saves having these threads turn into marathons. PSS. Every website is different. The code snippet is specific to facebook.That is very helpful, thanks. The reason I didn't mention those problems at first is because before, when the user was logged in, the new instances of ie took advantage of that. In this usage, they don't! So, new problem, and thanks for the answer. This scripting seems very useful -- can you suggest any good books or webites which will help me develop it further? for example, to pull in XML as it's fed back from a site, that sort of thing? Very grateful for this support! A good site for learning script is The Scripting Guys Check out the links on the page. It offers everything for beginners to experts including free downloads and the ever popular Scriptomatic. You can also search for a help file on your system: script56.chm It's more of a reference than a primer but can be helpful for syntax. Good luck. |
|