Shoutbox

[Request] ..:Help for scriptfunction!!:.. - 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: [Request] ..:Help for scriptfunction!!:.. (/showthread.php?tid=80211)

[Request] ..:Help for scriptfunction!!:.. by Jumpfreakske on 12-18-2007 at 11:09 PM

Hey everyone! I need a little help for the start of my script.

- so when you type a commando ('/hstart' in this case) then
a window appears > the startwindow.

Here a screenshot of it:
[Image: screenshotscriptum9.png]

Now the thing is: If people click on 'site' or forum' link, then
I don't want internet to open on that URL like this code does:

code:
<Control xsi:type="LinkControl" Id="LnkData">
                <Position Top="77" Left="154" Width="55"/>
                <Caption>Site</Caption>
            </Control>

But i want this in case: When they click on that link, a message wil be send:
(When clicking on the link, then sending '!site'

code:
if(Message == "!site")
{
ChatWnd.SendMessage("For more info, go to the site.");
}

What do I have to change in the scripteditor, or in my Wndstart.xml ?
RE: Help for scriptfunction by aNILEator on 12-18-2007 at 11:30 PM

This is very dodgy, in the style sense, I would highly expect a link in there to take me to the website.


RE: RE: Help for scriptfunction by Jumpfreakske on 12-18-2007 at 11:32 PM

quote:
Originally posted by aNILEator
This is very dodgy, in the style sense, I would highly expect a link in there to take me to the website.

Wat do you recommend me then ? :)
can anyone help me ?
RE: [Request] ..:Help for scriptfunction!!:.. by davidpolitis on 12-19-2007 at 02:56 AM

I don't get what you actually want. The link control will do whatever you want it to when clicked. eg:

code:
function OnWndEvent_CtrlClicked(Wnd, ControlId)
{
    if (ControlId == "LnkData")
    {
        //PUT CODE HERE
    }
}

RE: RE: [Request] ..:Help for scriptfunction!!:.. by Jumpfreakske on 12-19-2007 at 09:27 AM

This is the code for opening this 3 links in your browser: for example:

code:
function OnWndAboutEvent_CtrlClicked(Wnd, sControlId){
    if(sControlId == "lnkSite"){
        new ActiveXObject("wscript.shell").run("http://msgpluslive.net");
    }
    else if(sControlId == "lnkForum"){
        new ActiveXObject("wscript.shell").run("http://shoutbox.menthix.net");
    }
    else if(sControlId == "lnkContact"){
        new ActiveXObject("wscript.shell").run("http://shoutbox.menthix.net/contact");
    }
}

But instead of opening this links in your browser,
I want people, when they click on this 3 links' they reveive
a message in their chatwindow that says 'For more information go to shoutbox.menthix.net'
RE: [Request] ..:Help for scriptfunction!!:.. by davidpolitis on 12-19-2007 at 09:58 AM

It's not possible... unless you get them to add some kind of bot that responds to a command and get the command sent to the bot.

If you meant that you just wanted text put into a text area, I don't know if thats possible using interop.call with some dll.


RE: RE: [Request] ..:Help for scriptfunction!!:.. by Jumpfreakske on 12-19-2007 at 10:10 AM

quote:
Originally posted by davidpolitis
It's not possible... unless you get them to add some kind of bot that responds to a command and get the command sent to the bot.
not possible ? :(

But on the script 'Screenshot Sender' when you click in
the scriptmenu on 'Share script', en message is also automaticly
be send to the contactperson isn't it ?

quote:
Hey, you should check out this awesome script called Screenshot Sender 4 (http://ScreenshotSender.com) for Messenger Plus! Live (http://MsgPlusLive.net).

The same with 'Ultimate script'. When you click on 'Share script, this message wil be send.

quote:
I'm using The UltimateScript, and my wlm have a lot of new features, if you want to try just go here : http://www.toutmessenger.info/ultimatescript/en/ultimatescript/



That's just the same I want to do, but my link isn't in the scriptmenu like screenshot sender,
but in a window (WndStart.xml)
RE: [Request] ..:Help for scriptfunction!!:.. by davidpolitis on 12-19-2007 at 10:12 AM

Oh... you just want something sent to the convo?


RE: [Request] ..:Help for scriptfunction!!:.. by Jumpfreakske on 12-19-2007 at 10:14 AM

Yes , indead, but I don't now the code of it

I have made a Jscript File named as: WndStart.handler,
but there needs something to be changed

Maybe I have to change this:

code:
new ActiveXObject("wscript.shell").run("http://shoutbox.menthix.net");

Into this:
code:
ChatWnd.SendMessage("You want to visit the site: http://www.............com");

RE: [Request] ..:Help for scriptfunction!!:.. by davidpolitis on 12-19-2007 at 10:21 AM

Try this:

code:
function OnEvent_MenuClicked(MenuId, Location, ChatWnd)
{
if (MenuId == "MenuID")
{
  for(var enumerator = new Enumerator(ChatWnd.Contacts) ; !enumerator.atEnd(); enumerator.moveNext())
  {
   var Contact = enumerator.item();
   var sChatWnd = Messenger.OpenChat(Contact.Email);
   sChatWnd.SendMessage("Message Here");
  }
}
}

I understand that English obviously isn't your first language, but please try to be clearer in what you want next time. Thanks.
RE: RE: [Request] ..:Help for scriptfunction!!:.. by Jumpfreakske on 12-19-2007 at 10:23 AM

quote:
Originally posted by davidpolitis
Try this:

code:
function OnEvent_MenuClicked(MenuId, Location, ChatWnd)
{
if (MenuId == "MenuID")
{
  for(var enumerator = new Enumerator(ChatWnd.Contacts) ; !enumerator.atEnd(); enumerator.moveNext())
  {
   var Contact = enumerator.item();
   var sChatWnd = Messenger.OpenChat(Contact.Email);
   sChatWnd.SendMessage("Message Here");
  }
}
}


Do I have to put this in the 'WndStart.Handler' ?
RE: RE: RE: [Request] ..:Help for scriptfunction!!:.. by davidpolitis on 12-19-2007 at 10:24 AM

quote:
Originally posted by davidpolitis
quote:
Originally posted by Jumpfreakske
Do I have to put this in the 'WndStart.Handler' ?
Do you seriously know what you're doing? First of all you asked for code to send a message for the OnClick of a Link Control in a Window and then you asked for a ScriptsMenu OnClick  and now you don't even know where to put the given code and now you expect me to know how everything in your script is set up :S

RE: RE: RE: RE: [Request] ..:Help for scriptfunction!!:.. by Jumpfreakske on 12-19-2007 at 10:28 AM

quote:
Originally posted by davidpolitis
quote:
Originally posted by Jumpfreakske
Do I have to put this in the 'WndStart.Handler' ?
Do you seriously know what you're doing? First of all you asked for code to send a message for an OnClick and now you're asking for a ScriptsMenu OnClick :S

No, No, sorry. I know what I want ;) I Just wasn't sure
where I had to put this code....
the point is (see the screenshot on the first post)
That when people click on that link, they receive a message with link :)
RE: [Request] ..:Help for scriptfunction!!:.. by Matti on 12-19-2007 at 11:03 AM

So, you don't want the current user who clicked on that link to send the message, but receive a message in a chat window, right? :S

But then...

  • ...who would send that message?
  • ...why can't you just display a toast when the user clicks that link, and make the site open when the user clicks the toast?
  • ...why can't you just make a link do what a link is supposed to do: open a web page?
I think your logic simply doesn't work. :S

By the way, it's not possible that you see a message in a chat window without having your contact see it too, whether that contact sent or received that message!
RE: [Request] ..:Help for scriptfunction!!:.. by davidpolitis on 12-19-2007 at 11:10 AM

I think he really means that he'll have a Link Control in his window and on the OnClick, a message to be sent to a contact...


RE: [Request] ..:Help for scriptfunction!!:.. by Matti on 12-19-2007 at 11:16 AM

quote:
Originally posted by davidpolitis
I think he really means that he'll have a Link Control in his window and on the OnClick, a message to be sent to a contact...
But then again, which contact? :P
RE: [Request] ..:Help for scriptfunction!!:.. by davidpolitis on 12-19-2007 at 11:22 AM

The contact in the convo that the ScriptsMenu Item was clicked in to generate the window? I really cannot be bothered since I'm tired, have helped enough and my code snippets have been rendered almost useless...


RE: [Request] ..:Help for scriptfunction!!:.. by Jumpfreakske on 12-19-2007 at 11:39 AM

I will explain it once more, hopely clear now :) :

When people download and install my script, they have to start
it with typing '!start'. When they typed !start, this window will open (WndStart.xml)

[Image: screenshotscriptum9.png]

Then they can click on one of these 3 links:
    - Normally their browser will open on that internet adress
    - Now: I want a message to be sent.


This screenshot explains it all (the working of it):

[Image: helppppvy3.jpg]

Do you understand now what i'm trying to explain ? :)