PCDJ
asked on
Creating Batch File
Using: Win2000 IE6. Want to create a batch file that open IE and then CTRL + O - anyone can help? Thanks.
Hi
I had the same idea, but I don't like the
"sendkeys" (depends to much on System's speed. What happens if your window is not active?)
what do you want to do exactly? Open Files or navigate to URL's?
assuming you want your user to input an URL and then browse-to:¨
'-------------sample script-------------
Set oIE = CreateObject("internetexpl orer.appli cation")
pageToGo = inputbox("Enter URL","vbscript sample")
oIe.visible = true
oIe.navigate pageToGo
'------------------------- ---------- ----
greets
bonzai
I had the same idea, but I don't like the
"sendkeys" (depends to much on System's speed. What happens if your window is not active?)
what do you want to do exactly? Open Files or navigate to URL's?
assuming you want your user to input an URL and then browse-to:¨
'-------------sample script-------------
Set oIE = CreateObject("internetexpl
pageToGo = inputbox("Enter URL","vbscript sample")
oIe.visible = true
oIe.navigate pageToGo
'-------------------------
greets
bonzai
ASKER
I created a new text doc, pasted makerp's code, changed to .vbs - did not work. Used Bonzai's code - sweet ! Thank You Both!
-Ron
-Ron
ASKER
OK, that code Bonzai supplied, who can add to it?
If I run that, I'm prompted for a URL. If I click the X or Cancel, the web browser opens and says Cannot Find Server.
What can I add to the code so that doesn't happen, or browser closes, or goes to a default URL specified in the code. Prefer the browser just closed though.
Thank You
If I run that, I'm prompted for a URL. If I click the X or Cancel, the web browser opens and says Cannot Find Server.
What can I add to the code so that doesn't happen, or browser closes, or goes to a default URL specified in the code. Prefer the browser just closed though.
Thank You
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
SWEET!!!!
Thank U- a thousand times!
I removed the www.google.com and it worked just as fine.
Nice how the pre-determined url is 'selected', ready for typing!
-Ron
Thank U- a thousand times!
I removed the www.google.com and it worked just as fine.
Nice how the pre-determined url is 'selected', ready for typing!
-Ron
This question is still open and getting old. If any of the comment(s) above helped you please accept it as an answer or split the points who ever helped you in this question. Your attention in finalising this question is very much appreciated. Thanks in advance,
****** PLEASE DO NOT ACCEPT THIS AS AN ANSWER ********
- If you would like to close this question and have your points refunded, please post a question in community support area on https://www.experts-exchange.com/Community_Support/ giving the address of this question. Thank you
Pasha
Cleanup Volunteer
****** PLEASE DO NOT ACCEPT THIS AS AN ANSWER ********
- If you would like to close this question and have your points refunded, please post a question in community support area on https://www.experts-exchange.com/Community_Support/ giving the address of this question. Thank you
Pasha
Cleanup Volunteer
Set WshShell = Wscript.CreateObject("Wscr
WshShell.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
WshShell.SendKeys("^o")