| Оглавление |
|
function.js/Все функции
|
|
Функции работы с адресами, макросами
|
|
Учетные записи, Inspector, WordEditor
|
|
Перенос текста, квотирование
|
|
Параметры шаблона, xml
|
|
Конвертирование, HTML, rule
|
|
Форматирование, вложения
|
|
Инициализация пользователя, регистрация
|
|
Hidden message, xml параметры
|
Страница 1 из 9 //JScript
//JScript
// Positic Potolook Plug-in
// ========================
// http://www.potolook.com
// (c) Copyright Positic Software, All Rights Reserved.
// functions
var Macros_ = [
[0, '', 'g', ''],
[0, 'o_cmess', 'g', ''],
[0, '', 'g', ''],
[0, 'OSUBJ', 'g', '<%=SourceMessagePart(mpSubject)%>'],
[0, 'OTEXTCONDENSED', 'g', '<%=SourceMessagePart(mpBodyPlainCondensed)%>'],
[0, 'OTEXTORIGINAL', 'g', "<%=SourceMessagePart(mpBodyPlainOriginal)%>"],
[0, 'OTEXT', 'g', "<%=SourceMessagePart(mpBodyPlain)%>"],
[0, 'OHTMLTEXT', 'g', '<%=SourceMessagePart(mpBodyHTML)%>'],
[0, '', 'g', ''],
[0, 'OQUOTESOUTLOOK', 'g', '<%=SourceMessagePart(mpBodyPlainQuoteOutl)%>'],
[0, 'OQUOTESORIGINAL', 'g', '<%=SourceMessagePart(mpBodyPlainQuoteOriginal)%>'],
[0, 'OQUOTESSELECTOR', 'g', '<%=SourceMessagePart(mpBodyPlainQuoteSelectOR)%>'],
[0, 'OQUOTESSELECT', 'g', '<%=SourceMessagePart(mpBodyPlainQuoteSelect)%>'],
[0, 'OQUOTES', 'g', '<%=SourceMessagePart(mpBodyPlainQuote)%>'],
[0, 'OHTMLQUOTES', 'g', '<%=SourceMessagePart(mpBodyHTMLQuote)%>'],
[0, 'ODATE', 'g', '<%=SourceMessagePart(mpDate)%>'],
[0, 'OFROMNAME', 'g', '<%=SourceMessagePart(mpFromName)%>'],
[0, 'OFROMFNAME', 'g', '<%=SourceMessagePart(mpFromFName)%>'],
[0, 'OFROMLNAME', 'g', '<%=SourceMessagePart(mpFromLName)%>'],
[0, 'OFROMADDR', 'g', '<%=SourceMessagePart(mpFromAddr)%>'],
[0, 'OFROM', 'g', '<%=SourceMessagePart(mpFrom)%>'],
[0, 'OHEADERS', 'g', '<%=SourceMessagePart(mpHeaders)%>'],
[0, 'OSENTONBEHALFOFNAME', 'g', '<%=SourceMessagePart(mpBehalfName)%>'],
[0, 'OSENTON', 'g', '<%=SourceMessagePart(mpSentOn)%>'],
[0, 'ORECEIVEDBYNAME', 'g', '<%=SourceMessagePart(mpRecievedByName)%>'],
[0, 'ORECEIVEDONBEHALFOFNAME', 'g', '<%=SourceMessagePart(mpRecievedBehalfByName)%>'],
[0, 'OCREATIONTIME', 'g', '<%=SourceMessagePart(mpCreationTime)%>'],
[0, 'ORECEIVEDTIME', 'g', '<%=SourceMessagePart(mpRecievedTime)%>'],
[0, 'OSIZE', 'g', '<% if(om)write(om.Size); %>'],
[0, '', 'g', ''],
[0, 'glob_field', 'g', ''],
[0, '', 'g', ''],
[0, 'USERNAME', 'g', '<% try{write(RecipientName(
func.Application.GetNameSpace("MAPI").CurrentUser))}catch(e){};%>'],
[0, 'USERADDRESS', 'g', '<% try{write(RecipientAddress(
func.Application.GetNameSpace("MAPI").CurrentUser));}catch(e){};%>'],
[0, '', 'g', ''],
[0, 'DATENOW', 'g', '<%=FormatDate(new Date())%>'],
[0, 'TIMENOW', 'g', '<%=(new Date()).toLocaleTimeString()%>'],
[0, 'OUTLOOKVER', 'g', '<%=func.Application.Version%>'],
[0, 'POTOLOOKVER', 'g', '<% write("Potolook v."+func.VersionDLL);%>'],
[0, '', 'g', ''],
[0, 'SCR_MOVERECIPIENTS', 'g', ' if(om.Class==olMail){AssignRecipients(nm, om)};'],
[0, 'SCR_REMOVEADV', 'g', ' glob("REMOVEADV")=1;'],
[0, 'CURSORPLACE', 'g', CursorStr],
[0, 'CLIPBOARDDATA', 'g', '<%=ClipboardData()%>'],
[0, '', 'g', ''],
[5, 's_mess', 'gi', ""],
[2, '', 'gi', ''],
[2, 's_ATT','gi', '.Attachments'],
[2, 's_BCC','gi', '.BCC'],
[2, 's_Body','gi', '.Body'],
[2, 's_BodyFormat','gi', '.BodyFormat'],
[2, 's_CC','gi', '.CC'],
[2, 's_Class','gi', '.Class'],
[2, 's_CreationTime','gi', '.CreationTime'],
[2, 's_EntryID','gi', '.EntryID'],
[2, 's_HTMLBody','gi', '.HTMLBody'],
[2, 's_InternetCodepage','gi', '.InternetCodepage'],
[2, 's_Recipients','gi', '.Recipients'],
[2, 's_ReplyRecipients','gi', '.ReplyRecipients'],
[2, 's_SenderName','gi', '.SafeSenderName'],
[2, 's_Sent','gi', '.Sent'],
[2, 's_Size','gi', '.Size'],
[2, 's_Subject','gi', '.Subject'],
[2, 's_To','gi', '.To'],
[2, 's_UnRead','gi', '.UnRead'],
[2, 's_UserProperties','gi', '.UserProperties'],
[2, '', 'gi', ''],
[3, 's_Close', 'gi', '.Close()'],
[3, 's_Delete', 'gi', '.Delete()'],
[3, 's_Copy','gi', '.Copy()'],
[3, 's_Display','gi', '.Display()'],
[3, 's_Forward','gi', '.Forward()'],
[3, 's_Move','gi', '.Move(Folder)'],
[3, 's_PrintOut','gi', '.PrintOut()'],
[3, 's_Reply','gi', '.Reply()'],
[3, 's_ReplyAll','gi', '.ReplyAll()'],
[3, 's_Save','gi', '.Save()'],
[3, 's_SaveAs','gi', '.SaveAs(Path, Type)'],
[3, 's_Send','gi', '.Send()'],
[5, '','gi', ''],
[5, 's_safes', 'gi', ""],
[5, '','gi', ''],
[5, 's_safesMail', 'gi', ""],
[2, 's_safes_SafeRecipients', 'gi', '.SafeRecipients'],
[2, 's_safes_SafeSenderName', 'gi', '.SafeSenderName'],
[2, 's_safes_SafeSenderAddress', 'gi', '.SafeSenderAddress'],
[3, 's_safes_SafeSend', 'gi', '.SafeSend()'],
[5, '','gi', ''],
[5, 's_safesRecs', 'gi', ""],
[2, 's_safes_item', 'gi', '.SafeRecipients'],
[3, 's_safesRecsAdd', 'gi', '.Add(Name, Type, Resolve)'],
[3, 's_safesRecsRemove', 'gi', '.Remove(index)'],
[3, 's_safesResolveAll', 'gi', '.ResolveAll()'],
[5, '','gi', ''],
[5, 's_safesRec', 'gi', ""],
[2, 's_safesRecAddress', 'gi', '.Address'],
[2, 's_safesRecName', 'gi', '.Name'],
[2, 's_safesRecType_', 'gi', '.Type_'],
[5, '','gi', ''],
[5, 's_safesall', 'gi', ""],
[2, 's_safes_item', 'gi', '.Item'],
[2, 's_safes_fields', 'gi', ".Fields(CdoPR_SUBJECT)"],
[3, 's_safes_GetID', 'gi', ".GetIDsFromNames(GUID, ID)"],
[1, '','gi', ''],
[5, 's_lists', 'gi', ""],
[1, '','gi', ''],
[3, 's_l_add', 'gi', '.Add()'],
[3, 's_l_item', 'gi', ".Item('')"],
[3, 's_l_remove', 'gi', ".Remove('')"],
[1, '','gi', ''],
[5, 's_all', 'gi', ""],
[1, '', 'gi', ''],
[1, 's_ECHO', 'gi', "alert('');"],
[1, 'BodyFormat', 'gi', 'BodyFormat = olFormatHTML /* olFormatPlain*/'],
[1, 'nmInternetCodepage','gi', 'nmInternetCodepage = CodePageWin /*CodePageKOI8r, CodePageISO88591*/;'],
[1, 'Account','gi', 'Account = "My Account"'],
[1, 's_AfterCommands', 'gi', "AfterCommands +=
'SendKeys(\"{F10}{RIGHT 3}{ENTER 2}\");'; // Insert attach from user interface"],
[1, 'SetStationery','gi', 'SetStationery("Nature")'],
[1, 'useSkin','gi', "glob('SKIN') = 'dark';"],
[1, 'DateFormat','gi', "glob('DateFormat') = '<dd> <mml> <yyyy> <hh>:<nn>:<ss>:<zz>'"],
[1, 's_OpenFile', 'gi', "var FileName = func.SelectFile('*.tpl', 'c:\\');"],
[1, 's_QueryString', 'gi', 'var str = func.QueryString(Caption, Prompt, Value);'],
[1, 's_Quest', 'gi', 'if(Quest(Text)){}'],
[1, 's_Path', 'gi', 'var PathInstall = func.Path;'],
[1, 's_EditTemplate', 'gi', 'var result = func.EditTemplate(Text, FileName);'],
[1, 's_Version', 'gi', 'var ver = func.VersionDLL;'],
[1, 's_GlobalProp', 'gi', 'func.GlobalProp();'],
[1, 's_SendKeys', 'gi', "SendKeys('^{HOME}{DOWN 2}{RIGHT 3}');"],
[1, 's_MyPrefix', 'gi', "ReplyPrefixValue = 'YOU';"],
[1, 's_GetFolderByPath','gi', "var MyFolder = GetFolderByPath('Inbox/MyFolder')"],
[1, 's_ReplyWithTemplate','gi', "DoAction(bt_reply
/*bt_new,bt_forward,etc*/,
SourceMessage, SourceFolder, TemplateFile, TemplateBody, NoUserInterface).nm.Send();"],
[1, 's_SetReplyTo','gi',
"SetReplyTo(nm, 'support@positic.com', 'Reply Address');"],
[1, 's_SetSentFolder','gi',
"nm.SaveSentMessageFolder = GetFolderByPath('Inbox/MySentFolder');"],
[1, 's_LoadFile','gi',
'var FileContent = LoadFromFile("c:\\\\Program Files\\\\Positic\\\\Potolook\\\\license.txt");'],
[1, 's_GetWinHttp','gi',
'var HttpRequest = WinHttpRequest(); HttpRequest.Open("GET", "http://www.potolook.com", false);'],
[1, 's_AddHeader','gi', 'AddHeader(nm, "X-MyHeader", "ValueMyHeader");'],
[1, 's_GetKeyState','gi', 'if(GetKeyState(VK_SHIFT /*VK_CONTROL, VK_MENU (Alt)*/)){ ... };'],
[1, 's_GetTempDir','gi', 'var TempDir = GetTempDir();'],
[1, 's_GotoURL','gi', 'GotoURL("http://www.potolook.com");']
];
function SafeMailItem(OutlookMailItem){
try{
var Result = func.CreateObject('Potolook.SafeMailItem');
Result.Item = OutlookMailItem;
}catch(e){return(OutlookMailItem)}
return(Result);
}
function SafeFolder(OutlookFolder){
try{
var Result = func.CreateObject('Potolook.SafeFolder');
Result.Item = OutlookFolder;
}catch(e){return(OutlookFolder)}
return(Result);
}
function SafeRecipient(OutlookRecipient){
try{
var Result = func.CreateObject('Potolook.SafeRecipient');
Result.Item = OutlookRecipient;
}catch(e){return(OutlookRecipient)}
return(Result);
}
function SafeRecipientByEntryID(OutlookRecipientEntryID){
try{
var Result = func.CreateObject('Potolook.SafeRecipient');
Result.ItemByID(func.Application.Session, OutlookRecipientEntryID);
}catch(e){return}
return(Result);
}
function SafeAttach(OutlookAttach){
try{
var Result = func.CreateObject('Potolook.SafeAttachment');
Result.Item = OutlookAttach;
}catch(e){return(OutlookAttach)}
return(Result);
}
|