| |||||||
| المدوّنات | البحث | مشاركات اليوم | اجعل كافة المشاركات مقروءة |
|
| | LinkBack | أدوات الموضوع |
| |||||
| هل يمكن تحويل هذا الملف لكى يعمل على الويب :) اتمنى مساعدة الخبراء الكود : كود: var Wnd;
function OnGetScriptMenu(Location)
{
var ScriptMenu = "<ScriptMenu>";
ScriptMenu += "<MenuEntry Id=\"MnuStart\">Edit Name</MenuEntry>";
ScriptMenu += "</ScriptMenu>";
return ScriptMenu;
}
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd)
{
if(MenuItemId == "MnuStart")
{
Wnd = MsgPlus.CreateWnd("NameEditor.xml", "WndMain");
Wnd.SetControlText("NameEdit", Messenger.MyName);
Wnd.SetControlText("NameEditPreview", Messenger.MyName);
Wnd.SendControlMessage('NameEdit', 0xC5, 129, 0);
Wnd.Combo_AddItem("NamePm", "Name");
Wnd.Combo_AddItem("NamePm", "Personal Message");
Wnd.Combo_SetCurSel("NamePm", 0);
//Wnd.ImageElmt_SetImageFile("emoticon", "WLM_1");
var len = Wnd.GetControlText("NameEdit").length;
var EM_SETSEL = 0xB1;
Interop.Call("user32","SetFocus", Wnd.GetControlHandle("NameEdit"));
Interop.Call("user32","SendMessageW", Wnd.GetControlHandle("NameEdit"), EM_SETSEL, len, len);
}
}
function OnWndMainEvent_ComboSelChanged()
{
if(Wnd.Combo_GetCurSel("NamePm") == 0)
Wnd.SetControlText("NameEdit", Messenger.MyName);
else
Wnd.SetControlText("NameEdit", Messenger.MyPersonalMessage);
}
function OnEvent_Uninitialize(MessengerExit)
{
Wnd.Close();
}
function OnWndMainEvent_CtrlClicked(Wnd, ControlId)
{
// Two Win32 Messages that we will need to send later
var EM_GETSEL = 0xB0;
var EM_SETSEL = 0xB1;
// Allocate some memory for the cursor index
var Start = Interop.Allocate(4);
// Number of characters to move the cursor on by later
var numCharsAdded = 1;
// Get where the cursor is in the input box
Interop.Call("user32", "SendMessageW", Wnd.GetControlHandle("NameEdit"), EM_GETSEL, Start, 0);
// Split the string into two parts on either side of the cursor so we can insert characters in the middle
var text = Wnd.GetControlText("NameEdit");
var firstHalf = text.substring(0, Start.ReadDWORD(0));
var secondHalf = text.substring(Start.ReadDWORD(0), text.length);
// Insert format codes when the format buttons are pressed
if(ControlId == "BtnBold")
{
Wnd.SetControlText("NameEdit", firstHalf + "·#" + secondHalf);
numCharsAdded = 2;
}
if(ControlId == "BtnUnderline")
{
Wnd.SetControlText("NameEdit", firstHalf + "·@" + secondHalf);
numCharsAdded = 2;
}
if(ControlId == "BtnItalic")
{
Wnd.SetControlText("NameEdit", firstHalf + "·&" + secondHalf);
numCharsAdded = 2;
}
if(ControlId == "BtnStrikethrough")
{
Wnd.SetControlText("NameEdit", firstHalf + "·'" + secondHalf);
numCharsAdded = 2;
}
if(ControlId == "BtnColour")
{
var CHOOSECOLOR = Interop.Allocate(36);
CHOOSECOLOR.WriteDWORD(0, 36); //DWORD lStructSize
CHOOSECOLOR.WriteDWORD(4, 0); //HWND hwndOwner
CHOOSECOLOR.WriteDWORD(8, 0); //HWND hInstance
CHOOSECOLOR.WriteDWORD(12, 0x000000FF); //COLORREF rgbResult (COLORREF = 0x00bbggrr)
var CustColors = Interop.Allocate(64); //Create an array of 16 COLORREFs for CustColors
CHOOSECOLOR.WriteDWORD(16, CustColors.DataPtr); //COLORREF *lpCustColors (pointer to our array)
CHOOSECOLOR.WriteDWORD(20, 3); //DWORD Flags (3 = 2 (CC_FULLOPEN) + 1 (CC_RGBINIT) )
CHOOSECOLOR.WriteDWORD(24, 0); //LPARAM lCustData
CHOOSECOLOR.WriteDWORD(28, 0); //LPCCHOOKPROC lpfnHook
CHOOSECOLOR.WriteDWORD(32, 0); //LPCTSTR lpTemplateName
//Open the dialog box
var result = Interop.Call('comdlg32.dll', 'ChooseColorA', CHOOSECOLOR);
//If the user pressed ok convert it to hex
if(result == 1)
{
//Get decimal values
var r = CHOOSECOLOR.ReadDWORD(12) & 0xFF;
var g = (CHOOSECOLOR.ReadDWORD(12) / 0x100) & 0xFF;
var b = (CHOOSECOLOR.ReadDWORD(12) / 0x10000) & 0xFF;
//Get hex values
var hexchars="0123456789ABCDEF";
var r = hexchars.charAt((r >> 4) & 0xf) + hexchars.charAt(r & 0xF);
var g = hexchars.charAt((g >> 4) & 0xf) + hexchars.charAt(g & 0xF);
var b = hexchars.charAt((b >> 4) & 0xf) + hexchars.charAt(b & 0xF);
Wnd.SetControlText("NameEdit", firstHalf + "·$#" + r + g + b + secondHalf);
numCharsAdded = 9;
} else {
Wnd.SetControlText("NameEdit", firstHalf + "·$" + secondHalf);
numCharsAdded = 2;
}
}
if(ControlId == "BtnBlack")
{
Wnd.SetControlText("NameEdit", firstHalf + "·$1" + secondHalf);
numCharsAdded = 3;
}
// Insert special characters when their buttons are pressed
if(ControlId == "BtnA")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnE")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnH")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnI")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnN")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnNN")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnNNN")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnO")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnP")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnR")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnT")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnU")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnW")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnY")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnYY")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnTm")
Wnd.SetControlText("NameEdit", firstHalf + "™" + secondHalf);
if(ControlId == "BtnCross")
Wnd.SetControlText("NameEdit", firstHalf + "†" + secondHalf);
if(ControlId == "BtnRArrow")
Wnd.SetControlText("NameEdit", firstHalf + "»" + secondHalf);
if(ControlId == "BtnLArrow")
Wnd.SetControlText("NameEdit", firstHalf + "«" + secondHalf);
if(ControlId == "BtnB")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnK")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
if(ControlId == "BtnM")
Wnd.SetControlText("NameEdit", firstHalf + "?" + secondHalf);
// Set focus back to the edit box and then move the cursor back to where it was
Interop.Call("user32","SetFocus", Wnd.GetControlHandle("NameEdit"));
Interop.Call("user32","SendMessageW", Wnd.GetControlHandle("NameEdit"), EM_SETSEL, Start.ReadDWORD(0) + numCharsAdded, Start.ReadDWORD(0) + numCharsAdded);
// The save and the close button
if(ControlId == "BtnClose")
Wnd.Visible = false;
if(ControlId == "BtnSet")
{
if(Wnd.Combo_GetCurSel("NamePm") == 0)
Messenger.MyName = Wnd.GetControlText("NameEdit");
else
Messenger.MyPersonalMessage = Wnd.GetControlText("NameEdit");
}
}
function OnWndMainEvent_EditTextChanged(Wnd, ControlId)
{
if(ControlId == "NameEdit")
Wnd.SetControlText("NameEditPreview", Wnd.GetControlText("NameEdit"));
} ال xml : كود: <Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd"> <GlobalColors> <GlobalColor Id="bg"> <BaseColor> <Saturation>2</Saturation> <Brightness>0.6</Brightness> <Transparency>82</Transparency> </BaseColor> </GlobalColor> <GlobalColor Id="titleText"> <BaseColor> <Saturation>2.5</Saturation> <Brightness>0.8</Brightness> <Transparency>200</Transparency> </BaseColor> </GlobalColor> </GlobalColors> <Window Id="WndMain" Version="1"> <Attributes> <Caption>NameEditor</Caption> </Attributes> <TitleBar> <Title> <Prefix>Image</Prefix> <Text>Name Editor</Text> </Title> </TitleBar> <Position Width="400" Height="256"/> <DialogTmpl> <BottomBar Style="Plain"> <LeftControls> <Control xsi:type="ComboBoxControl" Id="NamePm"> <Position Top="0" Width="100" Left="0"/> </Control> </LeftControls> <RightControls> <Control xsi:type="ButtonControl" Id="BtnClose"> <Position Top="0" Width="60" Left="0"/> <Caption>&Close</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnSet"> <Position Top="0" Width="60" Left="0"/> <Caption>&Save</Caption> </Control> </RightControls> </BottomBar> </DialogTmpl> <Elements> <Element xsi:type="LineElement" Id="FigLineVersion"> <Position Top="25" Left="10" Height="0" Width="370"/> <Color><GlobalColor>bg</GlobalColor></Color> </Element> </Elements> <Controls> <Control xsi:type="StaticControl" Id="LblPluginName"> <Position Top="8" Width="255" Left="8" Height="20"/> <Color><GlobalColor>titleText</GlobalColor></Color> <Caption>Name Editor</Caption> <Font> <Size>14</Size> <Bold>true</Bold> </Font> </Control> <Control xsi:type="ButtonControl" Id="BtnBold"> <Position Top="45" Width="60" Left="10"/> <Caption>&Bold</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnUnderline"> <Position Top="45" Width="60" Left="70"/> <Caption>&Underline</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnItalic"> <Position Top="45" Width="60" Left="130"/> <Caption>&Italic</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnStrikethrough"> <Position Top="45" Width="60" Left="190"/> <Caption>&Strikethrough</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnColour"> <Position Top="45" Width="60" Left="250"/> <Caption>&Colour</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnBlack"> <Position Top="45" Width="60" Left="310"/> <Caption>&Black</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnA"> <Position Top="60" Width="20" Left="10"/> <Caption>&α</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnB"> <Position Top="60" Width="20" Left="30"/> <Caption>&в</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnE"> <Position Top="60" Width="20" Left="50"/> <Caption>&ε</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnH"> <Position Top="60" Width="20" Left="70"/> <Caption>&н</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnI"> <Position Top="60" Width="20" Left="90"/> <Caption>&ι</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnK"> <Position Top="60" Width="20" Left="110"/> <Caption>&к</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnM"> <Position Top="60" Width="20" Left="130"/> <Caption>&м</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnN"> <Position Top="60" Width="20" Left="150"/> <Caption>&ŋ</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnNN"> <Position Top="60" Width="20" Left="170"/> <Caption>&и</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnNNN"> <Position Top="60" Width="20" Left="190"/> <Caption>&И</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnO"> <Position Top="60" Width="20" Left="210"/> <Caption>&σ</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnP"> <Position Top="60" Width="20" Left="230"/> <Caption>&ρ</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnR"> <Position Top="60" Width="20" Left="250"/> <Caption>&я</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnT"> <Position Top="60" Width="20" Left="270"/> <Caption>&т</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnU"> <Position Top="60" Width="20" Left="290"/> <Caption>&υ</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnW"> <Position Top="60" Width="20" Left="310"/> <Caption>&ω</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnY"> <Position Top="60" Width="20" Left="330"/> <Caption>&ч</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnYY"> <Position Top="60" Width="20" Left="350"/> <Caption>&Ч</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnCross"> <Position Top="75" Width="20" Left="10"/> <Caption>&†</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnTm"> <Position Top="75" Width="20" Left="30"/> <Caption>&™</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnLArrow"> <Position Top="75" Width="20" Left="50"/> <Caption>&«</Caption> </Control> <Control xsi:type="ButtonControl" Id="BtnRArrow"> <Position Top="75" Width="20" Left="70"/> <Caption>&»</Caption> </Control> <Control xsi:type="EditControl" Id="NameEdit"> <Position Top="30" Width="370" Left="10" Height="12"/> </Control> <Control xsi:type="RichStaticControl" Id="NameEditPreview"> <Position Top="190" Width="370" Left="10" Height="12"/> </Control> <Control xsi:type="RichStaticControl" Id="Colours1"> <Position Top="160" Width="370" Left="10" Height="10"/> <Caption>·#Colours: ·$1 1 ·$2 2 ·$3 3 ·$4 4 ·$5 5 ·$7 7 ·$8 8 ·$9 9 ·$10 10 ·$11 11 ·$12 12 ·$13 13 ·$14 14 ·$15 15 ·$16 16 ·$17 17 ·$18 18 ·$19 19 ·$20 20 ·$21 21 ·$22 22 ·$23 23 ·$24 24 ·$25 25 ·$26 26 ·$27 27 ·$28 28 ·$29 29</Caption> </Control> <Control xsi:type="RichStaticControl" Id="Colours"> <Position Top="170" Width="370" Left="42" Height="20"/> <Caption> ·#·$30 30 ·$31 31 ·$32 32 ·$33 33 ·$34 34 ·$35 35 ·$36 36 ·$37 37 ·$38 38 ·$1 - ·@This selection is limited, try other numbers to find more.·@ </Caption> </Control> <Control xsi:type="RichStaticControl" Id="Help"> <Attributes> <WrapText>true</WrapText> <Bold>true</Bold> </Attributes> <Position Top="90" Width="370" Left="10" Height="60"/> <Caption>·#1)·# Set whether you are editing your 'Name' or 'Personal Message' by using the drop down box at the bottom.\n·#2)·# Use the buttons above to set the style of the font. You can also choose stylish letters from the selection above.\n·#3)·# When picking colours press the colour button then pick a colour or cancel it and type the number of a colour shown below.\n\n·#Note:·# If you apply colours or formatting to your PSM you will not be able to see them, but your contacts will... just use the preview at the bottom to get a good idea what it will look like to your contacts </Caption> </Control> </Controls> </Window> </Interfaces> الملفات مرفقة فى المرفقات .. تحياتى : عمرو محمد
__________________
| |||||
|
| |||||
|
مرحبا استاذ زيزوار .. انة سكربت ملحق لبرنامج ماسنجر بلس .. فى المانسجر هوتميل ..
__________________
| |||||
|
| |||||
|
هذا النص البرمجي مكتوب بلغة جافاسكربت ولكنه لن يعمل في الصفحات لعدة أسباب أهمها هو أن الدوال المستخدمة غير مفهومة للمتصفح ولكن المسنجر يفهمها. علماً بأن الملف يجب أن يتواجد في مجلد scripts في مسار برنامج المسنجر لتعطي إضافة معينة له. فعلى الرغم من كونها مكتوبة بالجافاسكربت إلا أن لها اسلوباً ودوال خاصة للتفاعل مع المسنجر. بإمكانك الرجوع للرابط التالي لمعرفة المزيد Messenger Plus! Live Script Developer Resource - Scripting Documentation - Getting Started - What's a Messenger Plus! Script? هي كالإضافات (الهاكات) للمنتدى أو الووردبريس أو برامج إدارة المحتوى، فلا يمكن استخدام إضافة(plugin) للمنتدى كي تعمل في الووردبريس مثلاً. وفقك الله | |||||
|
![]() |
| أدوات الموضوع | |
| |
المواضيع المتشابهه | ||||
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
| [ 1 ][فلاش] مقدمه : ما هي لغة الاكشن سكريبت وماهو الفلاش | MohDesign | تطوير الويب | 25 | 21-08-2008 06:50 AM |
| 85 شركة اعلانات بديل غوغل ادسينس أختر ماتشاء | دليل عز | تطوير الويب | 19 | 05-04-2008 11:19 AM |
| [مقالة] نظرة شاملة على الويب 2.0 | ايمن جوجل | تطوير الويب | 3 | 12-08-2007 12:26 PM |
| نظرة شاملة على الويب 2.0 | kassab | تطوير الويب | 2 | 05-04-2006 05:42 AM |
| برنامج ICQ ...... | صامتة | قسم برامج الكمبيوتر | 19 | 07-01-2000 04:05 AM |