Robert Synoradzki
Robert Synoradzki

Reputation: 2046

Write from AutoHotkey to (Build) Output panel in Sublime Text 3

How to configure Sublime Text 3 and/or Autohotkey (2.0 or 1.1) to output strings from 1 to 2? I'm trying to write some strings therein for script debugging purposes.

I've found AHK functions OutputDebug "text" and FileAppend "text",* (star stands for standard output), but the text isn't redirected to the panel - is there perhaps a plugin or Build System configuration to accomplish this?

Problem

Upvotes: 1

Views: 665

Answers (1)

Robert Synoradzki
Robert Synoradzki

Reputation: 2046

Turns out FileAppend text,* (or FileAppend % "text",*) is the answer after all. I tried it before asking this question, alas it didn't work then, because:

  1. I used Unicode chars inside text. This prevented the function from writing the string at all. When I changed text to contain only ASCII chars, it was displayed without problems.
  2. The file was saved with UTF-8 (with BOM) encoding. When I changed encoding to UTF-8, text was printed even if it contained Unicode characters.

Upvotes: 3

Related Questions