Search Results |
Subject |
Author |
Forum |
Time |
RE: Getting the Xth word of a sentence [code=js]var s = 'Hi, I\'m John'; var sArray = s.split(' '); Debug.Trace(sArray[1]); /* sArray: 0 = Hi, 1 = I'm 2 = John */[/code] | matty | Scripting | 05-10-2010 at 03:51 PM |
RE: Getting all my contacts You don't need to use the join method on the array as tracing it will output a comma separated list of values... [code=js] var contacts = new Array(); for (var enum = new Enumerator(Messenger.MyContacts); !enum.atEnd(); enum.moveNext()){ contact... | Spunky | Scripting | 05-09-2010 at 07:13 PM |
RE: Getting all my contacts You need to enumerate the contact list like this. [code=js]var enum = new Enumerator(Messenger.MyContacts); var contacts = new Array(); for (; !enum.atEnd(); enum.moveNext()) { contacts.push(enum.item().Email); } Debug.Trace(contacts.join(", ")... | whiz | Scripting | 05-09-2010 at 06:48 PM |
RE: [SOLVED] Global variable not changing value Ok, thanks for the fast reply :) Ill give it a try | DELmE | Scripting | 05-06-2010 at 12:50 PM |
RE: [SOLVED] Global variable not changing value I can't test at the moment, but try replacing var admin = String(""); with var admin = ""; and place after each case statement: [code=js] case ".login": admin = MsgPlus.RemoveFormatCodes(Origin); ChatWnd.SendMessage(... | foaly | Scripting | 05-06-2010 at 12:49 PM |
RE: Help ME [code=js]var objChatWnd = {}; function OnEvent_ChatWndSendMessage (pChatWnd, sMessage) { var m; if ((m = /^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage)) ) { switch (m[1].toLowerCase()) { case 'setuser' : objChatWnd[pChatWnd.Handle] = m... | matty | Scripting | 05-04-2010 at 02:04 AM |
RE: A few questions. Indeed, you need a subclass window to receive those notifications, but I believe this can be done using a simple Plus! window created solely for that purpose. In Screenshot Sender 5, we use the following interface: [code=xml]<Window Id="Subclass" ... | Matti | Scripting | 05-03-2010 at 04:02 PM |
RE: Little help with MATLAB Nevermind. I defined: [code=MATLAB][DX, DY] = gradient(m) %m is the matrix. streamslice(DX, DY);[/code] [img]http://shoutbox.menthix.net/attachment.php?pi d=993328[/img] | Chancer | Tech Talk | 04-30-2010 at 12:00 AM |
RE: [?] Tree-view controls and item images Well, first of all you'll need to put some images in the tree view's image list. In order to prevent Plus! from messing up the image indexes, I always prefix the image ID with the image position. [code=xml]<Control xsi:type="TreeViewControl" Id=... | Matti | Scripting | 04-29-2010 at 06:12 PM |
RE: [?] WM_MOUSEMOVE doesn't work Good news... bad news... Good news is I managed to get it to work with the Plus! Window. Unfortunately I can't see how it will work with controls. [code=js]var WM_MOUSEMOVE = 0x200; var WM_MOUSEHOVER = 0x02A1; var TME_HOVER = 1; var wndSubclass; fu... | matty | Scripting | 04-22-2010 at 12:27 AM |
RE: [?] WM_MOUSEMOVE doesn't work Add this. All will be good :) [code=xml] <Attributes> <LockOnClick>False</LockOnClick> </Attributes>[/code] | matty | Scripting | 04-20-2010 at 09:26 PM |
RE: [?] WM_MOUSEMOVE doesn't work That has to be something in your code then. Attachment is untested as I am at work but let me know. Not sure if it will work because I think the x and y coordiniates are in relation to the window not the screen. If this is the case then change the s... | matty | Scripting | 04-20-2010 at 05:19 PM |
RE: [?] WM_MOUSEMOVE doesn't work This example is from here: http://www.codeguru.com/forum/showthread.php?t=290 195 [code=c++]//////////// Globals //////////// // HWND hWndBtn1 = NULL; // HWND hWndBtn2 = NULL; // WNDPROC wpOrigButtonProc = NULL; // HBITMAP hBmpNormal = NULL; // HBITMA... | matty | Scripting | 04-20-2010 at 04:41 PM |
RE: [?] WM_MOUSEMOVE doesn't work [code=JScript]// Windows.js; objPlusWnd.RegisterMessageNotification(WM_MOUSEHOV ER,true); var TRACKMOUSEEVENT = Interop.Allocate(16); with(TRACKMOUSEEVENT) { writeDWORD(0,Size); writeDWORD(4,TME_HOVER); writeDWORD(8,objPlusWnd.GetControlHandle("Bt... | SmokingCookie | Scripting | 04-20-2010 at 04:08 PM |
RE: [?] WM_MOUSEMOVE doesn't work We used WM_MOUSEMOVE in Screenshot Sender. http://beta.screenshotsender.com/code/WindowHandle rs/SelectArea_handler.js Tried something like this? [code=js]/* Create your window*/ pPlusWnd.RegisterMessageNotification(0x02A1 /* WM_MOUSEHOVER */) var TRA... | matty | Scripting | 04-20-2010 at 02:52 PM |
RE: automatic initiate boss protection Well, that ain't working at all. Should be like this: [code=JScript]function OnEvent_MyStatusChange (nStatus) { if (nStatus === STATUS_IDLE) { Messenger.LockMessenger(true); } }[/code] | SmokingCookie | Scripting | 04-12-2010 at 07:32 PM |
RE: Check whether control is focused GetFocus() [u]returns[/u] the handle of the currently focused control, so you need to compare that return value to the handle of the control you want to react upon. [code=js]// Get the handle of the focused control var hFocused = Interop.Call('user3... | Matti | Scripting | 04-11-2010 at 12:42 PM |
RE: [Request] Disable/Enable. [code=js] if(Enabled == 1) { Enabled = 0; } if(Enabled == 0) { Enabled = 1; }[/code] You need to use an Else (or what Spunky said), otherwise it will always be 1. | Volv | Scripting | 04-09-2010 at 11:18 PM |
RE: [Request] Disable/Enable. [code=js] if(Enabled == 1) { Enabled = 0; } if(Enabled == 0) { Enabled = 1; }[/code] Could just be:[code=js]Enabled = !Enabled;[/code] Also, the ChatWndSendMessage event appears to be in an if statement... No experience with th... | Spunky | Scripting | 04-09-2010 at 11:03 PM |
RE: [Request] Disable/Enable. I suggest posting all of your code not just snippets. And use the following tags: [noparse][code=js][/code][/noparse] | matty | Scripting | 04-09-2010 at 09:45 PM |
RE: [Request] Disable/Enable. [code=js]var Enabled = 1; function OnGetScriptMenu() { var Menu = "<ScriptMenu>"; Menu += " <MenuEntry Id=\"ToggleEnable\">" + (Enabled ? "En" : "Dis") + "able...</MenuEntry>"; return Menu + "</ScriptMenu>"; } function OnEvent_Menu... | whiz | Scripting | 04-09-2010 at 08:15 PM |
RE: JIT - Debug popups You need to provide the ExitCode parameter as well: [code=JScript]function OnEvent_Uninitialize(MessengerExit) { Wnd.Close(0 /* numeric value */); }[/code] | SmokingCookie | Scripting | 04-07-2010 at 02:53 PM |
RE: invisible message !!! well that depends, you could hide the message for example: [code=js] function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){ if (Message.charAt(0) == '#'){ Debug.Trace("make invis" + Message); return ""; } }[/code] The ... | foaly | Scripting | 04-06-2010 at 01:05 PM |
RE: experimenting with Wscipt.shell Such a batch file is not needed. It is making things way too limited and too complicated. If you take the "[i]redirecting the command line[/i]" approach (which is already a complicated thing if you want to do it right), 'all' you need to do is to... | CookieRevised | Scripting | 04-02-2010 at 11:04 PM |
RE: experimenting with Wscipt.shell You'll need to output some stuff that is known to your script; things it'll be looking for. An example: [code=Batch]ECHO !BEGINBATCH! >> Output.txt @ECHO OFF ECHO !ENDCOMMAND! >> Output.txt ipconfig /all >> Output.txt ECHO !ENDCOMMAND! >> Output.tx... | SmokingCookie | Scripting | 04-02-2010 at 06:42 PM |