It is not possible to show a MessageBox with a Scripting Connector or Scripting Gateway in Diafaan SMS Server because the script runs as part of the Diafaan SMS Server service and Windows does not allow showing a MessageBox or other window from a service. For error messages or other alerts, you can post an event with the 'PostEventLog' script method that shows up in the event log of Diafaan SMS Server.
You can add assembly references to the script in the comment section at the top of the script. If you look at the script, you can find the line:
// AddReference System.dll
You can add references to other assembly DLL's after this line. For instance you can add:
// AddReference System.Windows.Forms.dll
to add the reference to the 'System.Windows.Forms' assembly.
If the assembly DLL is not in the search path of Windows, it can be specified with the full path name, e.g.:
// AddReference C:\temp\MyAssembly.dll
is there anyway to use MessageBox in C# script?
I'm trying to add "using System.Windows.Form;" But i got an error "The type or namespace name "Windows" does not exist in the namespace "System".
Do you know how to overcome this problem?
is it even possible to import another native dll into the script?
Most Users Ever Online: 494
Currently Browsing this Page:
Guest Posters: 515
Newest Members:, Henk Helmantel
Administrators: Henk Helmantel: 988