Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
- September 6, 2023 at 10:58 pm #29381hihihloParticipant
below macro output “act=[]” !!
OutputBar.writeln(“act=[” + editor.ActiveDocument + “]”);OS : windows 11 64bit
Version : EmEditor Professional (64-bit) 22.5.2
thanks~September 7, 2023 at 3:56 am #29383Yutaka EmuraKeymasterYou will have to write a property or method for ActiveDocument. For instance,
alert( editor.ActiveDocument.Name );
September 7, 2023 at 8:17 pm #29385hihihloParticipantthank you ! below code can work :
editor.NewFile(); var NewDoc = editor.ActiveDocument; editor.OpenFile(sFullFn, 0, eeOpenDetectAll); //if goal not open : open inplace; if goal open already : switch to goal document if (editor.ActiveDocument.FullName != NewDoc.FullName) //empty NewDoc is leftover if goal open already, so close it NewDoc.close();
but below work in old version (unsure which version)
if (editor.ActiveDocument != NewDoc) ...
so I must modify many code from “doc1 != doc2” to “doc1.FullName != doc2.FullName”it is incompatible with old version
- AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.