Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; get file name
- $saFile = FileOpenDialog( "Select file with computer names", @WorkingDir & "\", "All (*.*)", 1 )
- If @error Then
- MsgBox( 0, "Error","No file selected" )
- Exit
- EndIf
- ; open file with list of computer names
- $oFile = FileOpen( $saFile, 0 )
- ; Check if file opened for reading OK
- If $oFile = -1 Then
- MsgBox( 0, "Error", "Unable to open specified file" )
- Exit
- EndIf
- ; Read in lines of text until the EOF is reached
- While 1
- $saLine = FileReadLine( $oFile )
- If @error = -1 Then
- ExitLoop
- EndIf
- ; Activate Radmin Viewer window
- WinActivate( "Radmin Viewer" )
- ; send 'Insert' key ( 'Add new connection' ) to Radmin Viewer
- Send( "{INSERT}" )
- ; wait for the 'New Connection' window
- WinWait( "New Connection" );
- ; add computer name / IP address
- ControlSetText( "New Connection", "", "Edit2", $saLine )
- ; send 'Enter' key to add computer
- Send( "{ENTER}" )
- Wend
- ; close file
- FileClose( $ofile )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement