We've got some GP tools in an MXD which we publish and then use in the ArcGIS Viewer for Silverlight. When we execute the script it works fine but after having done the processing the dialog box sits there with the "Getting results..." message and doesn't finish, stop or disappear. How do we clear the processing thread\SOC or whatever and have the dialog box work as it should I guess.Also, is there a way of passing messages from a Script to a user in the ArcGIS Viewer using a GP tool? I've tried AddMessage in the script but it doesn't show up. The whole things works fine in the MXD but I'd like to add some user feedback in the Viewer so the user knows it has done what it should have.Thanks in advance.# Import arcpy module import arcpy arcpy.env.Overwriteoutput = True # Local variables: Stoat_Trap_Input = arcpy.GetParameterAsText(0) Stoat_Trap_Records = "Stoat Trap Records" stifl = "in_memory\\stifl" try: arcpy.MakeFeatureLayer_management(Stoat_Trap_Input, stifl, "Trap1 <>'Unchecked' OR Trap2 <>'Unchecked'") featurecount = arcpy.GetCount_management(stifl) print featurecount if not featurecount == 0: arcpy.AddMessage("Input layer " + Stoat_Trap_Input + " has " + str(featurecount) + " new\updated records.") arcpy.AddMessage("Adding " + str(featurecount) + " new\updated records to the main database.") arcpy.Append_management("in_memory\\stifl", Stoat_Trap_Records, "NO_TEST") arcpy.AddMessage(str(featurecount) + " new\updated records successfully added.") arcpy.CalculateField_management(stifl, "Trap1", "\"Unchecked\"", "PYTHON_9.3", "") arcpy.CalculateField_management(stifl, "Trap2", "\"Unchecked\"", "PYTHON_9.3", "") arcpy.RefreshActiveView() else: arcpy.AddMessage("Input layer " + Stoat_Trap_Input + " has no new updates. Records must be added\updated before they require processing.") except: msgs = arcpy.GetMessages(2) arcpy.AddError(msgs) arcpy.AddMessage(msgs) print msgs del arcpy