Can't make data into expected type error
Can't make data into expected type error
- Subject: Can't make data into expected type error
- From: email@hidden
- Date: Tue, 15 Oct 2002 22:35:18 EDT
Thanks to so many helpful folks on this listserve for aiding my efforts to
script the "Network Setup Scripting" panel. I've had 2 missions with
Applescript:
1) Set the user's network settings to DHCP (mission accomplished)
2) Retrieve the user's "router address" that comes back after DHCP is set.
(close, but no cigar)
My problem is this error message:
"Error: Network Setup Scripting got an error: Can't make some data into the
expected type. -1700"
when I run this script:
tell application "Network Setup Scripting"
try
with timeout of 30 seconds
open database
set tcpConfig to name of item 1 of every TCPIP v4 configuration
whose active is true
set routerAddress to router address of TCPIP v4 configuration
tcpConfig
return "router address = " & routerAddress
close database
quit
end timeout
on error errMsg number errNum
close database
beep
return "Error: " & errMsg & " " & errNum
end try
end tell
I did some tests by commenting out lines, and deduced that the problem is
with this line:
set routerAddress to router address of TCPIP v4 configuration tcpConfig
which is where I get the "Error: Network Setup Scripting got an error: Can't
make some data into the expected type. -1700" message.
What I'm having great difficulty figuring out is:
1) Is this a problem with one of my network settings that is incompatible
with the variable type that I'm trying to put it into?
2) Is this a problem with syntax?
Any help is greatly appreciated. Note that this script is designed to run in
Mac OS 9.
- Rob
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.