Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Loop looking for a dialog window to accept
function SendEnter{
[void] [System.Reflection.Assembly]::LoadWithPartialName("'Microsoft.VisualBasic")
[Microsoft.VisualBasic.Interaction]::AppActivate("Confirm disconnection")
[void] [System.Reflection.Assembly]::LoadWithPartialName("'System.Windows.Forms")
start-sleep 1
# Send the Enter Key to the Window
# Give me a chance to start the delete CS Script
start-sleep 15
do {
write-host $i
} until ($i -eq 1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.