Error type -1753 Sometimes... Please Help
Error type -1753 Sometimes... Please Help
- Subject: Error type -1753 Sometimes... Please Help
- From: Xandra Lee <email@hidden>
- Date: Mon, 3 Dec 2001 10:12:31 -0500
I have a script which forces TCP to active state (by setting to inactive,
then active again). It always works fine on my maching (G4 Quicksilver,
AS1.6, OS9.2) but on my iMac (OS9.1, AS1.6) generrally fails the first
time it's run, but then works when it run again.
I'm also curious if NSS itself can display Dialog Boxes?
The prob SEEMS to be with the first line (which follows the Network Setup
Scripting part)
-----RELEVANT?? PART-------???
tell application (path to frontmost application as text)
if gFailMsg is not "" then
display dialog gOKMsg buttons {"OK"} default button 1 giving up after 60
else
display dialog gOKMsg buttons {"OK"} default button 1 giving up after 60
end if
end tell
HERE"S THE ERR MESSAGE:
Error type -1753
Scripting system reported that constant <<ascrtend>> does not understand
the <<earsffdr>> message
translation:
event ascrtend (path to frontmost app)
but here's the odd part.
earsffdr (path to Apple Menu Items)???
Thanks in Advance,
xandra
----FULL SCRIPT FOLLOWS-----------------------------------------
--Make TCP/IP inactive then active again, for those times when your
connection's gone blooey.
--REQUIRES: Network Setup Scripting (in Scripting Additions folder)
--OS9??? AS 1.6??? or later
--TESTED: OS9.2, AppleScript 1.6
global gOptions
global gOpts2
global gFailMsg
global gOKMsg
set gFailMsg to ""
set gOKMsg to ""
tell application "Network Setup Scripting"
--First make TCP inactive:
try
open database
set the transaction_ID to begin transaction
set gOptions to TCPIP active of TCPIP v4 options --> {true}
if gOptions is {true} then
set TCPIP active of TCPIP v4 options to {false}
set gOKMsg to "TCP was made inactive..."
end if
end transaction
close database
on error errMsg
set gFailMsg to errMsg
try
-- abort the transaction
if the transaction_ID is not "" then
abort transaction
end if
-- close the database if it was left open
close database
end try
end try
-- now turn it back on again:
try
open database
set trans2 to begin transaction
set gOpts2 to TCPIP active of TCPIP v4 options
if gOpts2 is {false} then
set TCPIP active of TCPIP v4 options to {true}
set gOKMsg to gOKMsg & ("& then it was made active again.")
end if
end transaction
close database
--make damned sure db is closed:
on error errMsg
set gFailMsg to errMsg
try
-- abort the transaction
if the trans2 is not "" then
abort transaction
end if
-- close the database if it was left open
close database
end try
end try
end tell
-->USER FEEDBACK:
tell application (path to frontmost application as text)
if gFailMsg is not "" then
display dialog gFailMsg buttons {"OK"} ,
default button 1 giving up after 60 with icon caution
else
display dialog gOKMsg buttons {"OK"} ,
default button 1 giving up after 60 with icon note
end if
end tell
Alixandra Leigh
AceDesign
email@hidden
------------------------------------------
Furniture:
><
http://home.rochester.rr.com/alexleighs/furniture/furniture.htm>
Renderings:
><
http://home.rochester.rr.com/alexleighs/interiors/interiors.htm>