Program Linking part 2
Program Linking part 2
- Subject: Program Linking part 2
- From: John MacDonald <email@hidden>
- Date: Wed, 3 Jan 2001 19:04:57 -0400
As I mentioned recently, Program Linking has gotten broken somewhere.
You can't script it very well in Mac OS 9.0.4, at any rate.
'set program linking to false' does nothing
'set program linking to true' toggles the state and, when it turns
linking on, turns on Linking via IP whether you want it or not.
There's also no direct way to turn Linking via IP on or off.
By using the Gestalt codes available in the Finder's 'computer'
command I was able to put something together to make sure Program
Linking via IP gets turned on. The script is a little wordy in order
for me to keep track of what I was doing.
Here's the gist: If Linking via IP is off I have to turn program
linking off and back on again. Three wrongs make a right!
Another note: if you see your url in the File Sharing panel, next to
Program Linking, it means that Linking via IP is *ON* regardless of
the checkbox setting.
-- This script makes sure Program Linking with TCP/IP is on (the best it can)
set gestaltPPCSupportsTCP_IP to 4 -- 0x0004,
set gestaltPPCSupportsIncomingAppleTalk to 16 --0x0010
set gestaltPPCSupportsIncomingTCP_IP to 32 -- 0x0020
tell application "Finder"
set supportsTCP_IP to computer "ppc " has gestaltPPCSupportsTCP_IP
set AppleTalkLinkingEnabled to computer "ppc " has
gestaltPPCSupportsIncomingAppleTalk
set TCP_IPLinkingEnabled to computer "ppc " has
gestaltPPCSupportsIncomingTCP_IP
end tell
if not supportsTCP_IP then
-- some fallback plan (maybe not OS 9)
else
if not TCP_IPLinkingEnabled then -- is it on?
if program linking then set program linking to true
-- turns it off!
set program linking to true --and back on with TCP/IP
end if
end if
--
--
--------------------------------------------------
John MacDonald
Lab Manager & Macintosh Specialist
Academic Computing Services
Dalhousie University
Dentistry Building, Room 2603
(902) 494-2643
mailto:email@hidden
--------------------------------------------------