Shoutbox

[Suggestion] *.LNK Plugin - 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)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: [Suggestion] *.LNK Plugin (/showthread.php?tid=35882)

[Suggestion] *.LNK Plugin by John on 12-21-2004 at 07:21 PM

Ok, here's an idea for a plugin:

I was thinking of a plugin that would be able to make *.LNK files (a shortcut (link)) that would run a certain Plus! command or change something in Messenger by clicking on it from anywhere on your computer. With this plugin you would be able to make a *.LNK file and change things in it to make it do whatever you like.

For example: You could make a shortcut that would change your status to "Busy". Then you could place that shortcut on your desktop or anywhere and by clicking on it it would then change your Messenger status to "Busy".

Does anyone understand the idea? What do you think about it?

This would also be handy with other programs (like a calendar program) that you can set up to start a certain program at a certain time, but instead of making it start a program, you could make it run a shortcut that you've made with the plugin. For example: You could make it automatically chang your status at a certain time or change your nick to "(!NP) - Merry Christmas" on Christmas day. :)

The list of commands you could use in the *.LNK files is very long and I'm sure you can come up with most of them yourself. :)

So, is any plugin maker interested in having a go at this? :)


RE: [Suggestion] *.LNK Plugin by Millenium_edition on 12-21-2004 at 07:28 PM

contacts on desktop anywhere :D


RE: [Suggestion] *.LNK Plugin by user27089 on 12-21-2004 at 07:49 PM

That would be a good idea... possibly have a right-click option on the contacts on desktop, and have it with some features in there like block and stuff :D I dunno though... that would be easier imo.


RE: [Suggestion] *.LNK Plugin by John on 12-28-2004 at 07:54 PM

Does anyone else think this is cool? I'd really appreciate it if someone would have a go at making this, please.


RE: [Suggestion] *.LNK Plugin by L. Coyote on 12-28-2004 at 08:30 PM

Sounds good. :o

I'd give it a try if I wasn't a n00b @ this.

I'll investigate about this and if I have any news I'll tell you.


RE: [Suggestion] *.LNK Plugin by azn angel on 12-29-2004 at 11:49 AM

dude sounds good not sure if it can be done...probably can.


RE: [Suggestion] *.LNK Plugin by (CyBeRDuDe) on 12-29-2004 at 10:09 PM

This should be as easy as scrathing your ass.. :D:D:D:D... hehe...
No, seriously, this is very easy if you just got the hang of Msgplus API, and the Messenger API.... If I wasn't busy doing my other programming projects, I would be willing to do this, since this idea have been said several times I think, It was talked about just before Patchou made the "Contacts on Desktop" feature... I haven't been following the latest update in the MsgPlus and Messeng API's so I would have to do some research to get up 2 date, but I can't do that ATM..... But anybody else willing to do this?.. It shouldn't be very difficult if your up 2 date with the API's...


RE: [Suggestion] *.LNK Plugin by John on 12-30-2004 at 11:17 AM

Haha, well if it's that easy how long do you think it would take to make a first version? It's really too bad that you can't have a go at it at the moment. I wish I could but it would take me ages to learn it all and the chance that what I would make would work is fairly small. :P I hope someone else thinks this is a good idea aswell and decides to have a go..

I've got nothing to do so I'm going to draw something up to give people an idea of exactly what I mean. :P

[edit] Here's what I drew up:

[Image: ShortcutLinkPlug.jpg]

Can you all see what I mean by the picture? :)

For those who can't see: What this link would do (after clicking on it on the desktop) is send a message to all open conversations saying *John will be right back and then it would put Messenger's status on "Be Right Back".

If you would only use /me instead of /all /me it would send the message to the last active conversation window. So for example if you would make a link that would execute the /close command, it would execute that command in the last active conversation window and thus close that window.

You could make links to execute any Plus! command this way. :)


RE: [Suggestion] *.LNK Plugin by Menthix on 12-30-2004 at 04:13 PM

Sounds a bit like scripting, during the Paris dinner Patchou said once again he will probally never do that ;'(. He had a good reason though.

The example you show in the picture would be fun, but add functions like wait and make it respond to what contacts are saying and you have the easiest script language in the world :).

I like the idea, but it personally think it should be a bit more advanced to make it really fun.
- Activate these things not only by doubleclicking a file but also, like, activate it by using the Plus! sheduler (have it activated on a certain day/time).
- Activate it by what contacts are saying.
- A few "advanced" functions added to it: WAIT, mathimatical functions.... not to much of them tough, this whole feature should be noob-proof.
- Being able to read replies from a contacts and the abillity to react to it. Like, the last message a contact says to you should be a variable that the "script" can use.
- Extension of these files shouldn't be .lnk since Windows already use that.


RE: [Suggestion] *.LNK Plugin by Tarry on 12-30-2004 at 04:21 PM

quote:
Originally posted by MenthiX
- Extension of these files shouldn't be .lnk since Windows already use that.
I think he was talking about making them Windows-compatible icon shortcuts, they use the .lnk extension.
RE: [Suggestion] *.LNK Plugin by Menthix on 12-30-2004 at 04:29 PM

Yes, but .lnk is used for shortcuts to executables. You could make a shortcut like:

code:
"c:\program files\Messenger Plus! 3\msgplus.exe" -script -name=brb
But i don't think that will be practical. If you just make the "scripts" save in files with their own extension you will only have to make something that handles this extension. This way you can still double click the files, and you don't need to make shortcuts to them.
RE: [Suggestion] *.LNK Plugin by Stigmata on 12-30-2004 at 04:56 PM

thats what i was thinking....


code:
private sub Form_Load(command as string)
if command = "status=busy" then
messengerapi.mystatus = 2
else
Msgbox "Command Not Reconised"
end if
end sub


then in the link

code:
pathtoprogram\stigmatasl33tprogram.exe status=busy

would that work?
RE: [Suggestion] *.LNK Plugin by (CyBeRDuDe) on 12-30-2004 at 06:39 PM

exactly as Stigmata is suggesting... :D...
I might be able to get time during the next week... Maybe I can make a template and give the source to someone that is more up 2 date with the msgplus and messenger API's.. I can't promies anything yet though....

1 thing I need to know is:
Is it possible to activate msgplus API, like chaning name, using the / commands or whatever, without it being a plugin?... or would this then have to be plugin that handles all this?...


RE: [Suggestion] *.LNK Plugin by Plik on 12-30-2004 at 06:43 PM

quote:
Originally posted by (CyBeRDuDe)
1 thing I need to know is:
Is it possible to activate msgplus API, like chaning name, using the / commands or whatever, without it being a plugin?... or would this then have to be plugin that handles all this?...
Has to be a plugin.
Because of security issues.
Although changing your nick can be done out side a plugin, but its more complex.
RE: [Suggestion] *.LNK Plugin by (CyBeRDuDe) on 12-30-2004 at 06:46 PM

oki... i'll let the other programmer(s) do this... I'll try getting a template plugin running for you guys... :D...


RE: RE: [Suggestion] *.LNK Plugin by John on 12-31-2004 at 03:31 PM

Thanks (CyBeRDuDe). :D

quote:
Originally posted by MenthiX
Sounds a bit like scripting, during the Paris dinner Patchou said once again he will probally never do that ;'(. He had a good reason though.

The example you show in the picture would be fun, but add functions like wait and make it respond to what contacts are saying and you have the easiest script language in the world :).

I like the idea, but it personally think it should be a bit more advanced to make it really fun.
1. Activate these things not only by doubleclicking a file but also, like, activate it by using the Plus! sheduler (have it activated on a certain day/time).
2. Activate it by what contacts are saying.
3. A few "advanced" functions added to it: WAIT, mathimatical functions.... not to much of them tough, this whole feature should be noob-proof.
4. Being able to read replies from a contacts and the abillity to react to it. Like, the last message a contact says to you should be a variable that the "script" can use.
5. Extension of these files shouldn't be .lnk since Windows already use that.

1. Plus! can execute a .lnk file with the scheduler already.. so there would be no need to make up a new file. The advantage of having it a .lnk file is that it's totally Window compatible.
2. & 4. Why would you want other people to be able to run commands on your computer? :P
3. Plus! already has a delay funtion in quick texts so you could just use that. (I can't remember the command.)
5. The whole point is making them .lnk files so Windows and other programs can use them.



I just want it to be as simple as possible. Look at the picture I made and see how easy that would be for anyone to use All the user would need to be able to do is understand the Plus! commands, come up with a name for the link and choose where to save it. How easy is that. The person that makes the plugin has to do all the hard stuff, like translate the commands writen in the box into codes that can be used in the .lnk file etc..
RE: [Suggestion] *.LNK Plugin by Ash_ on 12-31-2004 at 03:32 PM

bah cant you just Register the "MessengerPlus_SetName" message and use SendMessage API to send your new nick without it being a plugin?

this is the Visual Basic source code im talking bout.

code:
Public Function SetNewName(ByVal sMessage As String) As Boolean
    Dim nMsg As Long
    nMsg = RegisterWindowMessage("MessengerPlus_SetName")

    Dim nResult As Long
    nResult = SendMessage(HWND_BROADCAST, nMsg, StrPtr(sMessage), 1)
    If (nResult = 0) Then
        SetNewName = False 'Can happen if the user if offline
    Else
        SetNewName = True 'There is no absolute way to detect if the function was successful
    End If
End Function


then like use the commandline way Stigmata mentioned and use like "Addnick=- Brb Playin teh Gamez"
and call the function with a nick thats already in a preset variable?

otherwise someone has to do some IMessenger pointer finding :P
RE: [Suggestion] *.LNK Plugin by Plik on 12-31-2004 at 04:11 PM

quote:
Originally posted by the api documentation
Technical Note: the message must be sent from the same thread Initialize() was called, else, Messenger Plus! will reject the call for security reasons.

RE: [Suggestion] *.LNK Plugin by Ash_ on 12-31-2004 at 04:19 PM

bah dll injection, solves everything(Y) :P


RE: [Suggestion] *.LNK Plugin by Menthix on 12-31-2004 at 07:18 PM

quote:
Originally posted by Jaguar
1. Plus! can execute a .lnk file with the scheduler already.. so there would be no need to make up a new file. The advantage of having it a .lnk file is that it's totally Window compatible.
Scheduler does use shell indeed to execute everything, nice :). Any extension can be made windows compitable without much work. My point is that .lnk is meant to be purely a shortcut to another file. A .lnk file itself doesn't contain any other data besides the name and location of the file it should execute, optionally it can has one or more comman line switches.

So when you use pure .lnk you can only store the whole "script" in the shortcut itself by using the command line switches, or have the "script" stored somewhere else and make the .lnk shortcut refer to this. Both methods have downsides:
- .lnk is used, also by by non-plus! users, when they doubleclick these Plus! "scripts" Windows will still try to execute, causing errors.
- The actual "scripts" themselves have to be stored somewhere anyway, when they are stored somewhere in seperate files people can exchange them with eachother on MSN and sites which will boost popularity big time. Ofcourse you can store the "scripts" in .lnk files too, but it must be on one command line, which will be very messy with bigger "scripts", also see point above here.


quote:
Originally posted by Jaguar
2. & 4. Why would you want other people to be able to run commands on your computer?
Many reason, ever did scripting in mIRC or simulair? It's great to have automatic response to certain message/commands. But i understand such things might be to advanced to create in a plugin, certainly for a new plugin.



quote:
Originally posted by Jaguar
3. Plus! already has a delay funtion in quick texts so you could just use that. (I can't remember the command.)
That's true, forgot about that for a moment (even while i was the one requesting it once :O).


quote:
Originally posted by Jaguar
5. The whole point is making them .lnk files so Windows and other programs can use them.
I understand and agree with that. My main point is just that:
- It's not a good idea to store the actual "script" code in a .lnk file
- I think the "scripts" should be stored in seperate files (with other extensions then .lnk) so people can send them to eachother, publish them on sites and such. If you store the "scripts" in either registry, one big file or some kind of database type you would have to import/export "scripts" first which makes it less simple to use.

To be able to run "scripts" from any program there should be something that handles them from command line. Something like:
code:
"C:\Program Files\Messenger Plus! 3\Plugins\scriptlauncher.exe" -run c:\Program Files\Messenger Plus! 3\Plugins\somescript.mps
Took .mps as extension for the file that contains the "script" code (Messenger Plus! Script).



quote:
Originally posted by Stigmata
code:
private sub Form_Load(command as string)
if command = "status=busy" then
messengerapi.mystatus = 2
else
Msgbox "Command Not Reconised"
end if
end sub

Nice, but i prefer pure simple syntax as Jaguar showed in his picture, altough it would require way more programming to be able to use advanced functions in simple syntax mode.
RE: [Suggestion] *.LNK Plugin by John on 01-01-2005 at 07:16 AM

Thanks for that MenthiX :) that cleared up a lot. I understand everything you said.

I do think that having other people being able to run these "link/scripts" but typing commands is going a bit too far. The original idea I had was just to have a few icons on your desktop or quick launch bar (or anywhere you want) that would control certain things in MSN Messenger (eg. status changes) by clicking on them.

quote:
.lnk is used, also by by non-plus! users, when they doubleclick these Plus! "scripts" Windows will still try to execute, causing errors.
Well other users that use your computer shouldn't click on things that they don't know, it's their own fault if they cause errors. :P Hehe.

I think the idea of being able to store the "scripts" and being able to share them is a great idea. I can really see this plugin ending up in the group of popular plugins. (ie. SPNG, Song2Nick etc.)

quote:
Originally posted by MenthiX (replying to Stigmata)
Nice, but i prefer pure simple syntax as Jaguar showed in his picture, altough it would require way more programming to be able to use advanced functions in simple syntax mode.
Yeah exactly, this plugin should be a top-notch-user-friendly-plugin. :P
                                                                 n00b ^
RE: [Suggestion] *.LNK Plugin by L. Coyote on 01-01-2005 at 07:21 AM

Can't a .lnk file store the type of link? Like ed2k links get ed2k://, URLs are http://, emails are mailto:, etc.

So this .lnk file could actually be something like mplnk://commands

I dunno if this was the idea or what. If not, sorry! :-#


RE: [Suggestion] *.LNK Plugin by John on 01-01-2005 at 07:25 AM

That sort of was the idea, but I can see now that you can't just use a stand-alone .lnk file to execute Plus! commands, you need to link it to another ("script") file.


RE: [Suggestion] *.LNK Plugin by John on 01-11-2005 at 10:51 AM

Sorry to bring up an old topic, but is anyone doing anything on this? Is anyone working on it? Like (CyBeRDuDe) said he would? :)


RE: [Suggestion] *.LNK Plugin by (CyBeRDuDe) on 01-11-2005 at 12:42 PM

I don't know if others started yet?.. But I haven't, i'm sorry.. I would really like to, I think this would have great potential, but I am kinda out of sparetime ATM... so it properly won't be in the near future.. I will do it sometime, if someone still haven't done it, I would gladly make this, but I simply don't have time... sorry...

One thing to note:
I don't want it to be as advanved and stuff as MethinX is trying to... I want it to be very simple, very basic, with a only a few commands, maybe later expanding a bit.. But I only want commands like status change, name change, block, unblock certian contacts/groups, start convo with specific contact, bring up/hide mainwindow.. you know, small things like that.. I don't want big scripts files or anything... That was at least my point in this plugin/program...
I see the smartness in using script files that people can share and just need to be executed.. But I don't see the point in sharing in script file that does something like this:
"Block=xxx@xxx.com
Status=Away"

That's just to lame... sorry... then I would rather just use some command line tags...


RE: [Suggestion] *.LNK Plugin by John on 01-11-2005 at 02:07 PM

That's ok (CyBeRDuDe), I'll wait till you have spare time if no-one else wants to start work on this. :)

That's what I think aswell, it should be very simple. Like I've said in every post in this thread, hehe.


RE: [Suggestion] *.LNK Plugin by Ash_ on 01-18-2005 at 01:34 AM

im bringing this thread back from the dead because i'm gonna Develop it. and i just wanted to update everyone on the status.

I Currently can make a .lnk file from within a program but it uses some funky DLL that not everyone has so im gonna look into the COM way of  making the Link files, also im  Looking into Plus's Broadcast messages so i can hook into them like the SetNewName function in the latest API.  and im gonna use the oMessenger variable passed to Initilize if i store it.

the way the Link files are gonna work is ill code a Main exe and call the main exe with command arguments as Stigmata said (Y).

if anyone has any problems with the way im doing it or any suggestions then please reply here, cheers.

This will be my first C++ Msg! Plus plugin but i'm sure all will go well.

ill keep you upto date


RE: [Suggestion] *.LNK Plugin by (CyBeRDuDe) on 01-18-2005 at 07:24 AM

Yay!!! Go ash!! :D...
That's cool dude, that someone finally took this project...

That's exactly how I would do it to, haev the main exe executed when clicking on the *.lnk files, with the command arguments..
I was just wondering how you would send the command to the plugin, for intstance the SetNewName... How would you transfer this information from the Main Exe to the Running Plugin?... I considered using WinSock or some other Sock, as I have done this before, but I think it has some disadvanteges, people not having the dll files for the Sock, I don't know, but maybe firewall's would be a problem even if it is only connecting local, or some other problems might occour.... Write to a temp file and make the plugin check/load that file each x seconds?... Or do you know to send "API" calls to the plugin?... Using some kind of SendMessage method?... I think this would be the best, but I haven't really tried this yet, but I guess it would be easily done...
I was just wondering which method you would use?

Keep up the good work man!!! :D... Please post any news on your progress when it happens... Maybe make a new thread for it?


RE: [Suggestion] *.LNK Plugin by Ash_ on 01-18-2005 at 07:35 AM

Cyber i was looking at using the MsgPlus ways before but now have decided against it. reason being i cannot find a way to get inside plus from an outside exe.

so i will use the API, but dont worry im gonna do this the good way so no windows messenger is needed, just inject my dll into MSN, get the IMessenger3 Pointer and do this each time.

the only problem being that im having trouble Injecting my DLL while the Process is still running.

Did Patchou attempt this for plus and is it even possible anyone?


RE: [Suggestion] *.LNK Plugin by John on 01-18-2005 at 09:12 AM

Wow, thanks a lot Ash_ :). Seems like you know what you're talking about, since i can only half understand it, hehe. You should make a new thread and someone can close this one. :)


RE: RE: [Suggestion] *.LNK Plugin by Ash_ on 01-18-2005 at 01:39 PM

quote:
Originally posted by Jaguar
Wow, thanks a lot Ash_ :). Seems like you know what you're talking about, since i can only half understand it, hehe. You should make a new thread and someone can close this one. :)


well i like to think so :P

someone really good at programming will probly come and own me though in the process destroying my dignity :P

bah. still having dll runtime inject problems. :(
RE: [Suggestion] *.LNK Plugin by (CyBeRDuDe) on 01-18-2005 at 06:18 PM

quote:
Originally posted by Ash_
so i will use the API, but dont worry im gonna do this the good way so no windows messenger is needed, just inject my dll into MSN, get the IMessenger3 Pointer and do this each time.

the only problem being that im having trouble Injecting my DLL while the Process is still running.

Did Patchou attempt this for plus and is it even possible anyone?

You mean injecting the dll into messenger while messenger is running?.. I tried playing with this too, but I found it hard getting it working properly, and especeially with msn, can't remember if I ever had it working... :s...
RE: RE: [Suggestion] *.LNK Plugin by Ash_ on 01-19-2005 at 12:51 PM

quote:
Originally posted by (CyBeRDuDe)
quote:
Originally posted by Ash_
so i will use the API, but dont worry im gonna do this the good way so no windows messenger is needed, just inject my dll into MSN, get the IMessenger3 Pointer and do this each time.

the only problem being that im having trouble Injecting my DLL while the Process is still running.

Did Patchou attempt this for plus and is it even possible anyone?

You mean injecting the dll into messenger while messenger is running?.. I tried playing with this too, but I found it hard getting it working properly, and especeially with msn, can't remember if I ever had it working... :s...


mmm, Well i need to find another way to execute it :( |-) :P
RE: [Suggestion] *.LNK Plugin by (CyBeRDuDe) on 01-19-2005 at 09:49 PM

Ash_ anything new?

Hmm.. I just wanted to say I started this project to(if you don't mind?)...
I took some time now to test some stuff out, and I have in fact already a plugin and executable that is able to change your nick name by using the commandarguments, "nick=some nick"... :D...
It works alright... :D...
right now i'm just experimenting with some stuff.... I'll get back to you tomorrow...

Ash_: If you want to, we might be able to work together?... Work as a team?.... If I need to do this right, so no windows messenger is needed, I need some help... don't know if you fixed this problem?... or I might just create so it uses the windows messenger library, then I can change this when I/We work something out....

Edit:
I was just surfing the net, and I found somewhere someone refering to that you don't need to call/use the Messenger Api when doing a plugin... The person as refering to the VB .Net Advanced example in the plugin documentation... In the initilize function it should be possible to use the oMessenger object, and use that as the api... Would this then make sure that WM doesn't run in the background?.. does this use msgplus as WM api?.. Have pathou done the ddl inject and then making us possible accesing the Messenger Api that way?... or what does this mean?.. I am not sure... And I couldn't really get it working....

BTW: I'm doing this thing in VB 6, not .Net... If anybody knows anything about the oMessenger object, please post some info for me! :D...


RE: RE: [Suggestion] *.LNK Plugin by Ash_ on 01-20-2005 at 11:32 AM

quote:
Originally posted by (CyBeRDuDe)
Ash_ anything new?

Hmm.. I just wanted to say I started this project to(if you don't mind?)...
I took some time now to test some stuff out, and I have in fact already a plugin and executable that is able to change your nick name by using the commandarguments, "nick=some nick"... :D...
It works alright... :D...
right now i'm just experimenting with some stuff.... I'll get back to you tomorrow...

Ash_: If you want to, we might be able to work together?... Work as a team?.... If I need to do this right, so no windows messenger is needed, I need some help... don't know if you fixed this problem?... or I might just create so it uses the windows messenger library, then I can change this when I/We work something out....

Edit:
I was just surfing the net, and I found somewhere someone refering to that you don't need to call/use the Messenger Api when doing a plugin... The person as refering to the VB .Net Advanced example in the plugin documentation... In the initilize function it should be possible to use the oMessenger object, and use that as the api... Would this then make sure that WM doesn't run in the background?.. does this use msgplus as WM api?.. Have pathou done the ddl inject and then making us possible accesing the Messenger Api that way?... or what does this mean?.. I am not sure... And I couldn't really get it working....

BTW: I'm doing this thing in VB 6, not .Net... If anybody knows anything about the oMessenger object, please post some info for me! :D...


yes the oMessenger object passed to initialize is the same as the MessengerAPI.Messenger reference in the Windows Messenger API.

btw good on you for the whole nick thing. if you wanna talk on MSN or something PM me and ill give you my addy.
RE: [Suggestion] *.LNK Plugin by (CyBeRDuDe) on 01-20-2005 at 03:00 PM

hmm... I will try getting the oMessenger thing working properly... :D... would this then mean people could use this even when they have uninstalled WM?... Cool! :D...

I might try release an early beta during this weekend... But I said only MAYBE... :D...
I will just PM you, then we can talk... :D...


RE: [Suggestion] *.LNK Plugin by Yousef on 02-07-2005 at 09:31 PM

so how's the development going? Looks like an interesting project :)


RE: [Suggestion] *.LNK Plugin by Tochjo on 02-07-2005 at 09:36 PM

quote:
Originally posted by noelie
how's the development going?
Please see Shortcut Plugin Beta Released! :D :)