我找到了以下
[Quest.PowerGUI.SDK.ScriptEditorFactory]::CurrentInstance.CurrentDocumentWindow.Document.CaretLine
确定PowerGui 2.4脚本编辑器中光标的行。
但我没有找到任何内容。真的不见了吗?
问这样一个问题的最佳地方在哪里?
是的,目前该物业名为CaretCharacter。 但为什么他们称之为CaretCharacter而不是CaretColumn?
答案 0 :(得分:1)
这将给出光标列:
[Quest.PowerGUI.SDK.ScriptEditorFactory]::CurrentInstance.CurrentDocumentWindow.Document.CaretCharacter
答案 1 :(得分:1)
就是这样:
[Quest.PowerGUI.SDK.ScriptEditorFactory]::CurrentInstance.CurrentDocumentWindow.Document.CaretCharacter
你怎么能自己发现?
$a = [Quest.PowerGUI.SDK.ScriptEditorFactory]::CurrentInstance.CurrentDocumentWindow.Document
$a |Get-Member
给出
TypeName: Quest.PowerGUI.SDK.Document
Name MemberType Definition
---- ---------- ----------
Append Method System.Void Append(string text)
EnsureVisible Method System.Void EnsureVisible(int lineNumber)
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
Insert Method System.Void Insert(string text, int lineNumber, int charNumber)
Select Method System.Void Select(int startLine, int startCharacter, int endLine, int endCharacter)
SetCaretPosition Method System.Void SetCaretPosition(int lineNumber, int charNumber)
ToString Method string ToString()
CaretCharacter Property System.Int32 CaretCharacter {get;set;}
CaretLine Property System.Int32 CaretLine {get;set;}
IsSaved Property System.Boolean IsSaved {get;}
Lines Property Quest.PowerGUI.SDK.LineCollection Lines {get;}
Path Property System.String Path {get;}
SelectedText Property System.String SelectedText {get;set;}
Text Property System.String Text {get;set;}