I am trying something I know should be relatively simple when I try to run the following script i get the following errors
global compname
tell application "Finder"
launch application "Remote Desktop"
end tell
tell application "Remote Desktop"
set theListofcomps to DNS name of every computer --get all exsisting computers in list
set compname to choose from list theListofcomps with title ¬
"Computers" with prompt "Pick the computer you want to send a message to and control"
--lets tech pick from full list of machines.
display dialog " What comment would you like to send " & compname default answer "I will be taking control of your computer"
--Get Answer & Return Comment
set texttouser to (text returned of result) as list
display dialog "you will send- " & texttouser & " -to machine " & compname
add compname to computer list "messaging"
set sendmessage to make new send message task with properties {message:texttouser}
execute sendmessage on computer list "messaging"
end tell
when it gets to the add compname to computer list "messaging" it breaks with error
error "Remote Desktop got an error: AppleEvent handler failed." number -10000
I have tried variations on this line and I have tried name to replace DNS name in the beginning.
add (computer whose name is compname) to computer list "messaging"
generates this error:
error "Can’t get computer whose name = {\"svr-XXX-XXX\"}." number -1728
What I have found is if I have the client type the machine name into the compname variable lowercase via a dialog box this script works. if I use dns name which is lower case this same issue occurs
Any thoughts on this would be helpful
Maus