Hi John,
Many thanks for your reply and help!!
The script you have modified is unfortunately only giving me the IP/Connection Name depending which is first in the spreadsheet.
Is there any way for the script (below) to do the following:
Open New Connection, Copy Cell A1, Paste into Radmin THEN Alt-Tab, Copy Cell B1, then paste into Radmin, then save connection.
Then repeat for A2/B2 so on and so forth.
The script currently does up until the Alt-Tab stage.
; 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}")
; Split string
$aID_IP = StringSplit($saLine, ",", 2)
If Not IsArray($aID_IP) Then
MsgBox(0, "Error", "Splitting line")
Exit
EndIf
; wait for the 'New Connection' window
WinWait("New Connection");
; add computer name
ControlSetText("New Connection", "", "Edit2", $aID_IP[0])
; add computer IP address
ControlSetText("New Connection", "", "whatever the control is.", $aID_IP[1])
; send 'Enter' key to add computer
Send("{ENTER}")
WEnd
; close file
FileClose($oFile)
Any help appreciated
Thanks!!