Link to home
Start Free TrialLog in
Avatar of GeorgeAF
GeorgeAF

asked on

VBScript to launch a website and login

Hi, How do i create a VBScript to open http://apps.facebook.com/texas_holdem/ and login with my credentials for 20 seconds then shutdown?
I was able to figure the script I have attached
SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GeorgeAF
GeorgeAF

ASKER

Rob, The script is opening two windows one is the application the second is a blank page, Its not login me in automatically. Im also getting the error message =
Script: c:\users\george\desktop\test.vbs
Line: 9
Char: 1
Error: the remote server machine does not exist or is unavailable
'objIE.readyState'
Code: 800A01CE
Source: Microsoft VBScript runtime error

Can it be scheduled for 30 seconds to close?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yeah, this is the direct link to the app http://apps.facebook.com/texas_holdem/ , I am using vista
Hey Rob, I added facebook as Trusted Site. now it looks better but with no success. Its opening 3 defferent windows and one of them with two tabs. Do you think we can direct it to open from cmd ? If you want to test it I will allow you to take controll of my computer.

George
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Rob, that one worked but its not scheduled to close the browser after 30 seconds. Any ideas??
Rob, YOU ROCK :)
I was able to figure how to shedule IE to close :)

Thank you....
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Rob,
There is no need to logout. But im having problems with IE sometimes I get the page cannot be displayed because of a cookie or network glitch.
Is there a code to refresh the page in case of that happens, and If refreshing, does not solve it, to restart IE, and in case of restarting IE  to reread the previous command (not the next one)?
One more thing at the end of the script, to make sure IE load completely before moving to the next comand instead of a timer?
Please advise
George.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Everything is working just perfect accept the page cannot be displayed, its not refreshing the page. Its closing the page and jumping to the next command. Can we have it to refresh the page?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No, it didnt refresh but its waiting 30 sec then closed.
 I have attached the IE error that might help to code
IE-error.txt
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It doing the samething :(
I it is not refreshing the page
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This message is coming after it login in
Screenshot is attached
Attach is here
Error.jpg
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I replaced all, still not refreshing nor restarting however I tried disabling my wireless to see if the page refresh or restart. No success, it sits there till the timer command to quit.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No errors are coming up. I did command out. samething it sits there till it quit
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey Rob, the first error is coming up at the beganing, when I close it, takes me to the application, I tiried the same steps but with no internet, and the 2nd error cameup
error.jpg
error2.jpg
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Rob,

In the attachment the vbs that works just like I wanted, I see that its refreshing or reloading IE when it gives page cannot be displayed at the beggening. But there is one missing thing missing, its after it logs in sometime when its login in or when its loading the second page after the login, it gives page cannot be displayed. Is there a way to make it refresh incase of the page dont fully load?
In other words to have the same code as the one before the login in command ?
Works.txt
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That one keeps reloading the page even if it logs in without an error. It loads after 2 sec it close the new window promp.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yupe it did it. YOUR THE MAN :)

Thank you. All the tests went through successfully.
That is PERFECT :))))

George
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am very satisfied with the accuracy and professionalism. Rob YOU ROCK. Thank you a million.
 I am very glad that I found EE website. I will certainly refer your website to others colleagues and friends.

George
That's great George. Thanks for the grade.

>> I am very glad that I found EE website.

That's what a lot of people say!  And certainly is what I said after I subscribed.  It really is an awesome resource, and since I've been contributing myself, I've learnt so much more!

They do say the best way to learn is to get your hands dirty!

Regards,

Rob.