Page 1 of 1

Open again in ANSI

Posted: Tue Jun 30, 2020 8:32 am
by sexy96
I have a file: The King 2017.srt, encoded in ANSI.

after opening:
Image

opens in UTF-8
Image

I want this file to open again in ANSI after clicking on the icon in the TaskBar.

This command will reload on ANSI:
"Reload on ANSI CP-1250" Call("Scripts::Main", 1, "EvalCmd.js", `0x1; AkelPad.OpenFile("The King 2017.srt", 0, 1250);`) Icon("")

and this command
"Reload on ANSI CP-1250" Call("Scripts::Main", 1, "EvalCmd.js", `0x1; AkelPad.OpenFile(0, AkelPad.GetEditFile(0), 1250);`) Icon("")
Image

linie 66 w EvalCmd.js: -> eval(pArgLine);

Did not work.
What should the correct command be?
---------------------------------------------------------------------------
I wrote this code:

var sFile = "B:\\TEMP\\info.txt";
var sEditFile = AkelPad.GetEditFile(0)

sEditFile = AkelPad.GetEditFile(0)
AkelPad.WriteFile(sFile, sEditFile, 1250, 0, 0)

pFile = AkelPad.ReadFile("B:\\Temp\\info.txt", 0, 1250)

WScript.Echo(pFile)
Image

How to complete this code to load this path.