Automate WebLogin…

Copy the following script and paste it in a notepad, make changes to uname and upass variable as your userid and your password… Now, save the notepad as Login_Wordpress.vbs and then when you double click on the document saved in a folder, you will see your login is done by vbscript automatically.
-Selva V Pasupathy, HSBC Global Resourcing, Hyderabad

Dim navURL, uName, uPass 
Dim ie 

'Change following couple of lines with you ID & Password
    uName = "MyUserName"
    uPass = "myPassWord"

'This sets the url of the page, in this case
'rediff login page
    navURL = "https://socko.wordpress.com/wp-login.php"

'Create internetexplorer and provide url
    Set ie = CreateObject("InternetExplorer.Application")
    ie.navigate navURL

'set visibility as true
    ie.Visible = True

'wait until IE is done loading page.
    While ie.Busy
      'DoEvents:
    Wend

'Enter userid and password in respective textboxes
    ie.document.all("log").Value = uName
    ie.document.all("pwd").Value = uPass
   
'click go button
    ie.document.all("wp-submit").Click    'Clicks the GO button on the page

'wait until IE is done loading page.
    While ie.Busy
      'DoEvents  'wait until IE is done loading page.
    Wend

    msgbox ("Done")

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: