Anyone know how to set to use DHCP with Revolution?
Ken Ray
kray at sonsothunder.com
Tue Oct 1 17:11:00 EDT 2002
Well,
I don't know how to set the DHCP, but here's some AppleScript code that will
*get* the configuration method using the Network Setup scripting addition...
perhaps you can use this as a start:
----------------------
set configMethod to ""
set configName to ""
set cfg to ""
tell application "Network Setup Scripting"
open database
set config to current configuration set
repeat with i from 1 to count of configuration of config
if (class of configuration i of config) is (TCPIP v4 configuration) then
set cfg to configuration i of config
set configName to name of config -- so you can check the name to see
if it's the right one
exit repeat
end if
end repeat
set configMethod to configuration method of cfg
close database
-- Now, show it in the results window
get "Config name: " & configName & ", Method: " & configMethod
end tell
------------------------
When I ran this on my Mac, I got:
Config name: My Network Settings, Method: manual
(which is all correct, BTW).
Note that this stops as soon as it hits a TCPIP configuration method (and
you may have many defined in the TCP/IP control panel), so you may need to
check "configName" to see if it is the right one before going on. Also, keep
in mind that configurations can be locked (I don't know how to get around
that at the moment)...
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: <RGould8 at aol.com>
To: <use-revolution at lists.runrev.com>
Sent: Tuesday, October 01, 2002 3:35 PM
Subject: Anyone know how to set to use DHCP with Revolution?
If I drag the Network Scripting file in Mac OS 9 to the Script Editor, I get
a whole Applescript dictionary of commands to control the user's Networking
preferences. What I'd like to do is somehow get Revolution to talk to
Applescript to then set the user's Network control panel to use DHCP.
Perhaps there's a way to get Revolution to access this directly?
I've found the Network Scripting dictionary to be very confusing. Is there
a Networking guru on this list who can tell me what the secret commands are
within that dictionary to set the user's network control panel to DHCP?
Here's the vast array of commands:
Class TCPIP v4 configuration: A TCP/IP v4 configuration
Plural form:
TCPIP v4 configurations
Elements:
router address by numeric index, as a range of elements
name server address by numeric index, as a range of elements
search domain by numeric index, as a range of elements
Properties:
<Inheritance> configuration -- See the class “configuration” for
more properties
connecting via Ethernet/MacIP/PPP -- the port or connection method
of
this configuration...
connecting via string -- ...or a port name (may be locked)
configuration method BootP/DHCP/MacIP manual/MacIP
server/manual/RARP/PPP server -- the configuration method of this
configuration (may be locked)
IP address string -- the IP address of this configuration (may be
locked)
subnet mask string -- the IP subnet mask of this configuration (may
be locked)
implicit search start string -- the implicit starting search domain
of this configuration (may be locked)
implicit search end string -- the implicit ending search domain of
this configuration (may be locked)
DHCP client ID string -- applies only if the configuration method is
DHCP (may be locked)
MacIP server zone string -- only applies if ‘connecting via’ is
MacIP (may be locked)
uses IEEE8023 boolean -- Does this configuration use the 802.3
protocol? (may be locked)
protocol TCPIP v4 [r/o] -- the protocol of this configuration (the
constant ‘TCPIP v4’)
administration password string -- the password of this configuration
(write only)
user mode basic/advanced/administration -- the user mode of this
configuration
More information about the use-livecode
mailing list