Script Engine
Object Editor
string Text()
SetText(string Text)
InsertText(string Text)
string Selected()
SetSelect(int SelStart; int SelEnd)
SelectAll()
SetSelWord()
string WordAtCursor()
string WordAtMouse()
string GetWordAtRowCol(int X; int Y)
int CountLines()
string GetLine(int Idx)
AddLine(string Text)
InsertLine(int Idx)
int CaretX()
int CaretY()
Caret(int X; int Y)
bool GetWordWrap()
SetWordWrap(bool Value)
Redo()
Undo()
bool IsChange()
PasteFromClipboard()
CopyToClipboard()
CutToClipboard()
TextToClipboard(string Text)
string TextFromClipboard()
SetHighlighter(int Idx)
int GetHighlighter()
SetCharset(int Idx)
int GetCharset()
GotToLine(int Line)
Object Console
Execute(string Command)
SetVisible(bool Value)
string Text()
Object Application
string FileName()
string FileExt()
string Path()
int Version()
bool IsRegistered()
New()
bool Open(string FileName)
bool Save()
bool SaveAs(string FileName)
Print Preview()
Print ()
string InputText(string Caption; string Text; string Default)
int SelectItem(string Caption; string Description; string List)
int Message(string Caption; string Message; int Button)
DIALOG Dialog
( AddItem(string Name; string Value)
DeleteItem(string Name)
string Item(string Name)
SetItem(string Name; string Value)
ClearItems()
string GetItemName(int i)
string GetItemValue(int i)
int CountItems();
boll Show(string Caption; string Description; int Width; int Height)
STORAGE Result
(
AddItem(string Name; string Value)
DeleteItem(string Name)
string Item(string Name)
SetItem(string Name; string Value)
ClearItems()
string GetItemName(int i)
string GetItemValue(int i)
int CountItems();
)
)
int CountWindow()
bool isCurrentWindowHex()
SetWindow(int idx)
Object Shell
bool FileExist(string FileName)
bool DirExist(string DirName)
bool CreateDir(string DirName)
bool CreateFile(string FileName; string Text)
bool DeleteFile(string FileName)
bool RenameFile(string OldName; string NewName)
bool CopyFile(string File1; string File2)
bool DeleteDir(string DirName)
string FileTostring(string FileName)
int Execute(string Operation; string File; string Parameters; string Directory; int ShowCmd)
string ComputerName()
string UserName()
string GetPersonalFolder()
string GetCurrentFolder()
string GetRegisteredCompany()
bool GetNumLockKeyState()
bool GetScrollLockKeyState()
bool GetCapsLockKeyState()
Object Storage
AddItem(string Name; string Value)
DeleteItem(string Name)
string Item(string Name)
SetItem(string Name; string Value)
ClearItems()
string GetItemName(int i)
string GetItemValue(int i)
int CountItems()
Example
Object Editor
string Text()
SetText(string Text)
InsertText(string Text)
string Selected()
SetSelect(int SelStart; int SelEnd)
SelectAll()
SetSelWord()
string WordAtCursor()
string WordAtMouse()
string GetWordAtRowCol(int X; int Y)
int CountLines()
string GetLine(int Idx)
AddLine(string Text)
InsertLine(int Idx)
int CaretX()
int CaretY()
Caret(int X; int Y)
bool GetWordWrap()
SetWordWrap(bool Value)
Redo()
Undo()
bool IsChange()
PasteFromClipboard()
CopyToClipboard()
CutToClipboard()
TextToClipboard(string Text)
string TextFromClipboard()
SetHighlighter(int Idx)
int GetHighlighter()
SetCharset(int Idx)
int GetCharset()
GotToLine(int Line)
Object Console
Execute(string Command)
SetVisible(bool Value)
string Text()
Object Application
string FileName()
string FileExt()
string Path()
int Version()
bool IsRegistered()
New()
bool Open(string FileName)
bool Save()
bool SaveAs(string FileName)
Print Preview()
Print ()
string InputText(string Caption; string Text; string Default)
int SelectItem(string Caption; string Description; string List)
int Message(string Caption; string Message; int Button)
DIALOG Dialog
( AddItem(string Name; string Value)
DeleteItem(string Name)
string Item(string Name)
SetItem(string Name; string Value)
ClearItems()
string GetItemName(int i)
string GetItemValue(int i)
int CountItems();
boll Show(string Caption; string Description; int Width; int Height)
STORAGE Result
(
AddItem(string Name; string Value)
DeleteItem(string Name)
string Item(string Name)
SetItem(string Name; string Value)
ClearItems()
string GetItemName(int i)
string GetItemValue(int i)
int CountItems();
)
)
int CountWindow()
bool isCurrentWindowHex()
SetWindow(int idx)
Object Shell
bool FileExist(string FileName)
bool DirExist(string DirName)
bool CreateDir(string DirName)
bool CreateFile(string FileName; string Text)
bool DeleteFile(string FileName)
bool RenameFile(string OldName; string NewName)
bool CopyFile(string File1; string File2)
bool DeleteDir(string DirName)
string FileTostring(string FileName)
int Execute(string Operation; string File; string Parameters; string Directory; int ShowCmd)
string ComputerName()
string UserName()
string GetPersonalFolder()
string GetCurrentFolder()
string GetRegisteredCompany()
bool GetNumLockKeyState()
bool GetScrollLockKeyState()
bool GetCapsLockKeyState()
Object Storage
AddItem(string Name; string Value)
DeleteItem(string Name)
string Item(string Name)
SetItem(string Name; string Value)
ClearItems()
string GetItemName(int i)
string GetItemValue(int i)
int CountItems()
Example
//
// script for using MSDN as int eractive help
// (c) FryPpy (fryppy@mail.ru) 2006
//
var UseNewMSDN = true;
var OldMSDNReader = "keyHH.exe";
var OldMSDNCol = "C:\\Program Files\\Microsoft Visual Studio\\
MSDN\\2001OCT\\1033\\MSDN130.COL";
var NewMSDNObjectName = "DExplore.AppObj.8.0"; ///< MSDN vs2005
if(!Shell.FileExist(OldMSDNCol) )
UseNewMSDN = true;
var Keyword = Editor.Selected();
if(Keyword == "")
Keyword = Editor.WordAtCursor();
if(UseNewMSDN)
{
var DExplorer = new ActiveXObject(NewMSDNObjectName);
DExplorer.SetCollection(NewMSDNNamespase, 0);
DExplorer.Index();
if(Keyword != "")
{
DExplorer.DisplayTopicFromKeyword(Keyword);
DExplorer.DisplayTopicFromF1Keyword(Keyword);
}
}
else
Shell.Execute("open",OldMSDNReader, "-#klink \"" + Keyword +
"\" \"" + OldMSDNCol + "\"","",1);
var OldMSDNReader = "keyHH.exe";
var OldMSDNCol = "C:\\Program Files\\Microsoft Visual Studio\\
MSDN\\2001OCT\\1033\\MSDN130.COL";
var NewMSDNObjectName = "DExplore.AppObj.8.0"; ///< MSDN vs2005
//var NewMSDNObjectName = "DExplore.AppObj.7"; ///< MSDN vs2003 (2003-2005)
var NewMSDNNamespase = "ms-help://MS.MSDN.v80"; ///< MSDN vs2005//var NewMSDNNamespase = "ms-help://MS.VSCC.2003"; ///< MSDN vs2003 (2003-2005)
if(!Shell.FileExist(OldMSDNCol) )
UseNewMSDN = true;
var Keyword = Editor.Selected();
if(Keyword == "")
Keyword = Editor.WordAtCursor();
if(UseNewMSDN)
{
var DExplorer = new ActiveXObject(NewMSDNObjectName);
DExplorer.SetCollection(NewMSDNNamespase, 0);
DExplorer.Index();
if(Keyword != "")
{
DExplorer.DisplayTopicFromKeyword(Keyword);
DExplorer.DisplayTopicFromF1Keyword(Keyword);
}
}
else
Shell.Execute("open",OldMSDNReader, "-#klink \"" + Keyword +
"\" \"" + OldMSDNCol + "\"","",1);



