Shoutbox

Issue adding messenger commands - 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: Issue adding messenger commands (/showthread.php?tid=93969)

Issue adding messenger commands by DSB on 02-26-2010 at 11:37 PM

I'm completely new to msgplus scripting, but I'm just trying to slightly modify an existing script.

The script has a command named "google", and an function for typing /google. However, after changing the name of the command in GetScriptCommands and changing the substring it looks for in the function, I get "command not recognized" when I type it in MSN.

What more do I need to do to make it a command?


RE: Issue adding messenger commands by billyy on 02-26-2010 at 11:48 PM

Could you give a link to the script?


RE: Issue adding messenger commands by DSB on 02-27-2010 at 12:59 AM

http://www.msgplus.net/scripts/view/363-Google-Searcher/

I made a copy of it and I'm trying to change the command to /images to do an image search. I know how to change the address it goes to, to make it do an image search, I just can't get it to recognize /images as a command.


RE: Issue adding messenger commands by CookieRevised on 02-27-2010 at 05:22 AM

quote:
Originally posted by DSB
I'm completely new to msgplus scripting, but I'm just trying to slightly modify an existing script.

The script has a command named "google", and an function for typing /google. However, after changing the name of the command in GetScriptCommands and changing the substring it looks for in the function, I get "command not recognized" when I type it in MSN.

What more do I need to do to make it a command?
If you got the error "command not recognized" it means you did something wrong (provided that you didn't got the error message in the original script).

Post the code you have changed and we can take a look at it...


WARNING: The Google Searcher script version 1.0 sends your Windows Live ID to the creator's website without your knowledge!
This IS an invasion of privacy! Script reported!

RE: Issue adding messenger commands by billyy on 02-27-2010 at 11:12 AM

Cookie is right it should not do that or inform you about it.
Ok i edited the code, you now set the string in the root just once and don't have to worrie about the strings length. ("I did before?" yesh you did)
Anyway now you can use google image too (only via chat command, i didn't have time to translate it all to every language for the menu :|)
Since its just for you, i pmed it :)


RE: Issue adding messenger commands by CookieRevised on 02-27-2010 at 12:21 PM

billyy :dodgy:


RE: Issue adding messenger commands by Menthix on 02-27-2010 at 02:02 PM

quote:
Originally posted by CookieRevised
WARNING: The Google Searcher script sends your Windows Live ID to the creator's website without your knowledge!
This IS an invasion of privacy! Script reported!
Removed the script, informed the creator. The will be back if he fixes the issue.
RE: Issue adding messenger commands by DSB on 02-27-2010 at 04:18 PM

Thank you for all the help Billyy, the issue has been more than resolved. I added a bunch of functions, such as wikipedia, weather, youtube, amazon, ebay, news, dictionary, etc...

I might completely remake it and name it something like "Multi searcher".

Also to CookieRevised, thanks for telling the part about sending the windows live ID. I deleted the lines related to that in what I'm using. (109-122)


RE: Issue adding messenger commands by Max28 on 02-27-2010 at 05:01 PM

Fix. Dsb good luck for all improvements ;)


RE: Issue adding messenger commands by billyy on 02-27-2010 at 05:14 PM

Well DSB, than you must make your own version of the script. It will be really nice with all those functions :)


RE: Issue adding messenger commands by CookieRevised on 02-27-2010 at 07:01 PM

quote:
Originally posted by Max28
Fix. Dsb good luck for all improvements ;)
Thanks for such a quick response, but the new version contains errors in the parameter processing. You assume that all parameters, for both commands, start at position 8. But this isn't always the case, especially not because both commands are not equal in length.

I suggest to take a look at
http://www.msgpluslive.net/scripts/view/543-Bing-Search/
which does exactly the same as your script, but is programmed in a much better and more efficient way.

And sorry that I had to report the script, but you should not be sending people's Windows Live Id to yourself like that. That is simply not-done and an invasion of privacy. If you want to track the usage of the script you should instead send a complete anonymous token. Also, out of courtesy, let the user know about it and give the ability to turn it off.

And since you update the script I also advise you to look into the update and version settings in ScriptInfo.xml so people can get auto-updates. Information regarding this is in the official Plus! scripting documentation and in this post.

----------------------------------------------------------------

DSB,

There is already a script which let you easly add whatever search engine and search URL you want:

http://www.msgpluslive.net/scripts/view/464-Mega-Finder/
RE: Issue adding messenger commands by Max28 on 02-27-2010 at 08:35 PM

I already add the tag <Version> which was absent during the previous versions. "If the same item is found and the version is different, an update notification is triggered." So it will work;) I do not think that there are other concerns.

For the error on the command that didn't really an error, I just forgot to change it and it's not very serious if the options aren't accessible by the /googleim.

DSB if you have a problem with my code you can ask me, I don't really want to program script anymore so it does not bother me that you take over :)


RE: Issue adding messenger commands by DSB on 03-01-2010 at 12:03 PM

Nope I have no problems, I used it to learn some of the events and fucntions etc. Then I remade the script keeping only what I added, as well as a friend that helped me make an about window. I've sent it to a few people and nobody has reported anything messing up.

Commands list:
/searchcommands: Display this list
/google: google search
/image: google images
/youtube
/gnews: google news
/cnn: CNN news
/ebay
/amazon
/web: goes to the entered web address. Do not put http.
/wiki: wikipedia
/weather: weather.com
/dic: dictionary.com
/tpb: Pirate bay

I have one question. The list is a simple return, which means that the other contact in the conversation sees it as well. Is there a way to make it only visible to the person that typed it?


RE: Issue adding messenger commands by CookieRevised on 03-01-2010 at 12:27 PM

Yes, by making your own interface windows. See the Plus! Scripting Documentation for that.
Note that you can't show something directly within the conversation window without your contact seeing it too...

You could also simply open a web browser window though, just as that Mega Finder script does.


RE: Issue adding messenger commands by matty on 03-01-2010 at 01:58 PM

quote:
Originally posted by CookieRevised
Note that you can't show something directly within the conversation window without your contact seeing it too...
Although it isn't reliable... and has limitations... if it is a short message they could use DisplayInfoMessage from the ChatWnd object.