Shoutbox

oChatWnds[ChatWnd.Handle] - Shorcut? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: oChatWnds[ChatWnd.Handle] - Shorcut? (/showthread.php?tid=89080)

oChatWnds[ChatWnd.Handle] - Shorcut? by Master Jake on 02-09-2009 at 10:44 PM

Typing this shit at the beginning of every unique variable gets kinda tedious and confusing. I know I could do something like:

var blah = oChatWnds[ChatWnd.Handle];

then do blah.variable but thats still annoying.

Is there anyway to write some kind of shortcut that just tells the program to always use oChatWnds[ChatWnd.Handle] at the beginning over every variable?


RE: oChatWnds[ChatWnd.Handle] - Shorcut? by matty on 02-10-2009 at 12:44 AM

js code:
with ( oChatWnds[ ChatWnd.Handle ] ) {
    /*
        your code here
    */
}

RE: oChatWnds[ChatWnd.Handle] - Shorcut? by Master Jake on 02-10-2009 at 03:39 PM

Ah yes that makes sense. Thanks a lot your very helpful.


RE: oChatWnds[ChatWnd.Handle] - Shorcut? by matty on 02-10-2009 at 04:06 PM

No problem it is what we are here for.