• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Login script problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Login script problem


  • Subject: Login script problem
  • From: keith rowley <email@hidden>
  • Date: Wed, 15 Nov 2000 10:14:52 -0600

Hello

Having problem with my login AppleScript on Blue & White and beige G3 towers
running OS 9.04 under MacAdministrator's forced authentication.

It is running as a MacAdmin Agent, scheduled to run at login, along with
Configure Protection and another AppleScript of mine "Set Monitor",
which checks the name of the monitor and sets bit depth & resolution
accordingly.

The script checks to see what lab the computer is in, then tells the
proper setup script to run. I'm having trouble with the "ci211" one.
What's happening is the user logs in just fine, the login Agents run,
the Room Login script (this one) runs, the proper setup script runs and
_ends_, I'm pretty sure (it straightens out the Desktop icons), but then
THIS script locks up _completely_ (it is still showing in the
Application menu when the machine freezes). Hard restart is only
solution.


Here is the script:

--get MacAdmin Client Info
--set macName to "ci211" (for troubleshooting this problem)
set macName to machine assigned name of (MacAdmin Client Info)
--display dialog macName (for troubleshooting this problem)
set theUserName to user name of (MacAdmin Client Info)
set runMakePrinter to "no"


if macName contains "amst" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:AMST SS
2000 r-o"

if macName contains "cch207" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:207 G4
SS.app"

if macName contains "backup iMac indigo" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:backup
iMac SS.app"

if macName contains "cch209" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:209
SS.app"

if macName contains "cch210" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:210
SS.app"

if macName contains "cch230 6100" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:230 SS
2000.app"

if macName contains "cch230 4400" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:230 4400
SS.app"

if macName contains "cch231" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:231
SS.app"

if macName contains "cch232" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:232 SS
2000.app"

if macName contains "ci211" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:PALS
ss.app"

if macName is "LMC MacG3-01 Vid" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:LMCVid
SS 2000"

if macName is "LMC MacG3-02" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:LMCn SS
2000"

if macName is "LMC MacG3-03" then ,
run script "Macintosh HD: :System Folder:Scripts:Login Scripts:LMCn SS
2000"




It's like this script doesn't know it's supposed to _end_ or
something...


Here is the setup script for that lab (which is called up by the Login
script):

set theUserName to user name of (MacAdmin Client Info)
set runMakePrinter to "no"

tell application "Finder"
activate
--repeat while true
--with timeout of 60 seconds
try

try
set position of file "Documents" to {770, 79}
end try
try
set position of folder "CI-211 DJ 890CM" to {68, 549}
end try
try
set position of startup disk to {773, 30}
end try
try
set position of trash to {773, 558}
end try
clean up desktop

-- if MacAdmin ain't around, download it!
try
if not (exists file "Configure Protection" of folder "MacAdmin
Agents" of folder ,
"MacAdmin Folder" of folder "System Folder" of folder " " of startup
disk) then
open file "Macintosh HD: :System Folder:!MacAdmin Maintainer"
end if
end try

-- if LaserWriter 8 isn't in the Extensions folder, put it there!
try
if not (exists file "startup disk: :System
Folder:Extensions:LaserWriter 8") then
duplicate file "startup disk: :System Folder:Extensions
(Disabled):LaserWriter 8" to extensions folder
end if
end try


--exit repeat
on error errorString number errorNumber
if errorNumber is not -1712 then
-- error handling
exit repeat
end if
end try
--end timeout
--end repeat

end tell

tell application "Finder"

if theUserName is "newuser" then ,
open file "NewUser" of folder "Internet" of startup disk
if theUserName is "administrator" then ,
display dialog "Hello, G*d! I luv the Biology Lab!" giving up after 1

--if theUserName is "newuser" then ,
-- tell application "Macintosh HD: :Internet:Netscape Communicator
Folder:Netscape Communicator"
-- activate
-- end tell
select startup disk

end tell
-- this is the end of the PALS Lab Startup Script


Any ideas???

Thanks for any help!

Keith Rowley
Network Manager - Macintosh
Texas A&M University-Corpus Christi
(361) 825-6038


  • Prev by Date: Re: Can a script receive AppleEvents?
  • Next by Date: Date of next Thursday
  • Previous by thread: Re: applescript-users digest, Vol 2 #41 - 15 msgs
  • Next by thread: Date of next Thursday
  • Index(es):
    • Date
    • Thread