Repository navigation
EN API UO OpenIDE
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Home · C# · IDE · UO API · A–Z · Examples · Languages
void UO.OpenIDE();
void UO.OpenIDE(object? filePath);-
filePath— Optional path. Blank/whitespace—open the editor without selecting a file; relative is resolved from _manager.AutoloadPath, absolute is preserved.
void - no value. Call on a separate line; completion does not confirm the server's action.
- Bridge.OpenIDE prepares the requested path, then Invoke calls BadNewbieScriptEditorGump.Open(_world,requested). The script from the file is not run by the OpenIDE command.
- The editor is a graphical window, not an external Launch application. Reading/displaying the file depends on the existence of the path and editor logic.
Each example can be saved as a separate file .csx and run in IDE. The UO object and wait functions provide the host of the current game session. Replace demo serial names, coordinates and addresses with your own.
Run this code as a separate .csx file. Arguments appear directly in the call; replace demonstration names, serials and addresses with your own.
The command is a separate statement. The message before it marks the start of the call; it does not confirm a server action.
UO.Print("Calling UO.OpenIDE");
UO.OpenIDE();Parameters and execution flow:
- Opens the graphic editor C# IDE.
UO.OpenIDE();Parameters and execution flow:
- Bridge.OpenIDE prepares the requested path, then Invoke calls BadNewbieScriptEditorGump.Open(_world,requested). The script from the file is not run by the OpenIDE command.
return RunScenario();
object? RunScenario()
{
UO.OpenIDE("Example.csx");
return null;
}Parameters and execution flow:
- The editor is a graphical window, not an external Launch application. Reading/displaying the file depends on the existence of the path and editor logic.
return new ScriptScenario(UO, WaitAsync, Args, Cancellation, Checkpoint).RunScenario();
class ScriptScenario
{
private readonly global::ClassicUO.CSharp.CSharpGameApi UO;
private readonly Func<int, Task> WaitAsync;
private readonly string[] Args;
private readonly CancellationToken Cancellation;
private readonly Action Checkpoint;
public ScriptScenario(global::ClassicUO.CSharp.CSharpGameApi api, Func<int, Task> wait, string[] args, CancellationToken cancellation, Action checkpoint)
{
UO = api;
WaitAsync = wait;
Args = args;
Cancellation = cancellation;
Checkpoint = checkpoint;
}
public object? RunScenario()
{
var path = "C:\\UO Scripts\\Example.csx";
UO.OpenIDE(path);
return null;
}
}C# is case sensitive. Use the exact UO name. Compare numeric flags with 0; use bool only where the signature returns bool.
Parameters: No parameters.
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.OpenIDE. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.OpenIDE:bridge.OpenIDE(string.Empty).
Internal implementation code; this is not a standalone script.
public void OpenIDE() => bridge.OpenIDE(string.Empty);Parameters: filePath (Any)
Result: void / Unit.
During a call:
-
InjectionScript.Runtime.InjectionApiUO.OpenIDE. -
ClassicUO.Game.Managers.ClassicUOInjectionApiBridge.OpenIDE:bridge.OpenIDE(filePath.ToString()). -
InjectionScript.Runtime.InjectionValue.ToString:filePath.ToString().
Internal implementation code; this is not a standalone script.
public void OpenIDE(InjectionValue filePath) => bridge.OpenIDE(filePath.ToString());ClassicUO — Bad Newbie & C# Scripts IDE