Skip to content

Instantly share code, notes, and snippets.

@PrateekKumarSingh
Created September 7, 2017 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PrateekKumarSingh/2be6594ab3b4e9b0e11277614f2d56c0 to your computer and use it in GitHub Desktop.
Save PrateekKumarSingh/2be6594ab3b4e9b0e11277614f2d56c0 to your computer and use it in GitHub Desktop.
$InternetExplorer = New-Object -ComObject InternetExplorer.Application -property @{
Navigate = 'http://www.twitter.com/following'
Visible = $true
}
# Wait unitl IE is busy
While($InternetExplorer.busy){ Write-Verbose "Internet Explorer is Busy, waiting for few seconds";Start-Sleep -Seconds 5 }
$start = Get-Date;$VerticalScroll = 0
Write-Host "Scrolling the WebPage to auto-populate all profiles for next 60 Secs" -ForegroundColor Yellow
# 60 Secs to Infinitely scroll webpage, So that all items are populated that only come when you scroll down
While((Get-Date) -lt $($start + [timespan]::new(0,0,60))) {
$InternetExplorer.Document.parentWindow.scrollTo(0,$VerticalScroll)
$VerticalScroll = $VerticalScroll + 100
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment