Archive for August 6, 2008

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")

Leave a Comment