PowerKeys Scripting API
    Preparing search index...

    Interface ConsoleAPI

    interface ConsoleAPI {
        Log(message: string): void;
        Warn(message: string): void;
        Error(message: string): void;
    }
    Index
    • Logs an informational message to the script output panel.

      Parameters

      • message: string

        The message to log.

      Returns void

      const value = 42;
      Console.Log("step 1 complete");
      Console.Log("value: " + value);
    • Logs a warning message to the script output panel.

      Parameters

      • message: string

        The warning text.

      Returns void

      const attempt = 2;
      Console.Warn("retrying: " + attempt);
    • Logs an error message to the script output panel.

      Parameters

      • message: string

        The error text.

      Returns void

      Console.Error("window not found");