Shoutbox

[Release] FindLinks (Version 2.1.2) - 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: [Release] FindLinks (Version 2.1.2) (/showthread.php?tid=68783)

[Release] FindLinks (Version 2.1.2) by Spunky on 11-23-2006 at 06:24 PM

I was looking at the protocol the other day and kinda got side tracked checking if any special informatin was sent when a link was sent received. From what I can tell... No, nothing special :p I then decided to make my own way of checking for links. Then I developed it into launching the links that it captures using different browsers etc... My mind wanders easily... Ooo! A bird...

Anyway, just type "/links" (or use the menu option) and a window will pop up with a list of links sent/received since the script was started and who sent them. Just select the link you want and press the corresponding browsers icon to launch it in that browser. So far, only Internet Explorer, FireFox and Opera are supported, but more will be added shortly.

I will be adding further options to store links so that they can be sent to contacts other than the one that sent it you.

Enjoy... Please :p

[Image: findlinks.png]

Remove Old Versions First!

83 Downloads So Far


RE: [Release] Link Grabber (Version 1.0) by EBFL on 11-23-2006 at 06:33 PM

Another great script spunky :zippy:

quote:
Originally posted by SpunkyLoveMuff
So far, only Internet Explorer, FireFox and Opera are supported, but more will be added shortly.
What about netscape? :grin:
RE: [Release] Link Grabber (Version 1.0) by Oxy on 11-23-2006 at 06:35 PM

quote:
Originally posted by EnglandBoyForLife.
What about netscape?

quote:
Originally posted by SpunkyLoveMuff
more will be added shortly.

RE: [Release] Link Grabber (Version 1.0) by EBFL on 11-23-2006 at 06:38 PM

quote:
Originally posted by skillz
quote:
Originally posted by EnglandBoyForLife.
What about netscape?

quote:
Originally posted by SpunkyLoveMuff
more will be added shortly.

I know 8-)
I was just suggesting Netscape
RE: [Release] Link Grabber (Version 1.0) by Oxy on 11-23-2006 at 06:41 PM

Great one spunky! i love it!



quote:
Originally posted by EnglandBoyForLife.
quote:
Originally posted by skillz
quote:
Originally posted by EnglandBoyForLife.
What about netscape?

quote:
Originally posted by SpunkyLoveMuff
more will be added shortly.

I know 8-)
I was just suggesting Netscape


Ahh, okay. sorry.
[/offtopic]
RE: [Release] Link Grabber (Version 1.0) by vaccination on 11-23-2006 at 06:42 PM

Ooo nice one spunky. Does it store the links even if you..say sign out and then back in again later on?


RE: [Release] Link Grabber (Version 1.0) by Spunky on 11-23-2006 at 11:14 PM

I made it so that it intentionally clears stored links when the script is stopped so signing out will clear them. I could always set this as an option... I'm also hoping to find a registry key that identifies the default browser so it can have a little icon stating the fact. I'm hoping to add a "filter" so that only links from certain people are shown if it is used...

Netscape is on my list of things to do. I need to install it first so that I can test it (I had to do this with opera to find out how to send a URL as a commad line parameter). I'm HOPING to try and support AOL (even though I personally hate the browser). I was thinking about other browsers, but then realised that they were for different OSs that don't support WLM <insert "duh!" picture here>


RE: RE: [Release] Link Grabber (Version 1.0) by alexp2_ad on 11-23-2006 at 11:18 PM

quote:
Originally posted by SpunkyLoveMuff
I'm also hoping to find a registry key that identifies the default browser so it can have a little icon stating the fact.

HKEY_CLASSES_ROOT\http\shell\open\command is the command used to open http links, so the default browser.  So you can just check if it contains iexplore or firefox or whatever.
RE: [Release] Link Grabber (Version 1.0) by deAd on 11-23-2006 at 11:48 PM

quote:
Originally posted by SpunkyLoveMuff
I made it so that it intentionally clears stored links when the script is stopped so signing out will clear them.
Signing out does not stop running scripts unless you exit as well.
RE: [Release] Link Grabber (Version 1.0) by Spunky on 11-23-2006 at 11:49 PM

I stand corrected :p I DID know that, just forgot about it :s


RE: [Release] Link Grabber (Version 1.0) by MicroWay on 11-23-2006 at 11:57 PM

Liked the script... Helpful when it's hard to take note... Thanks (Y)

May I suggest something???
1) How about adding the links of "Favorites" on the script? I think it don't need to be on the same "page" with the links sent/recieved...
2) The possibility to erase non-wanted links -> an example of it it's the virus links passed automaticly with MSN/WLM, like "Go to see me at www.me.com/pic.exe"
3) Maybe a way to put the nick of the person and not the e-mail on the "Sender List" or a way to choose betten e-mail/nick
;)


RE: [Release] Link Grabber (Version 1.0) by Spunky on 11-24-2006 at 02:43 AM

1) Done :D Spent all night making my own functions to enumerate files and folders inside the favourites folder (after finding out how to get the current users Windows username). Just use /faves instead of /links

2) It's not really easy to tell if a file is legitimate or not and people may want to send files via WLM... I can add an option that changes the link if it's a certain file type, but it will not be on by default.

3) Nicknames can look very messy as they usually have spaces and/or colour formatting codes in them making it almost impossible to tell who is who.

If anybody has any problems with this update, just let me know. I tested it quite well on my machine, but I still need some feedback as I wrote it, I only use it the way it was meant to... I need people to TRY and break it :P

EDIT: Oh yeah, while I remember, added support for Netscape as well ;)

(All version "tested" are the latest available from the official websites at this time. Support is not gauranteed for earlier/later version, although it is likely to be the same method used or I will update my script with a version detection system)

[Image: link.bmp]


RE: [Release] Link Grabber (Version 1.0) by alexp2_ad on 11-24-2006 at 11:13 AM

Can I make a few suggestions?

1. 

code:
        for(var k=0;k<links.length;k=k+2){
            WndLinks.LstView_AddItem("List1",links[k]);
            WndLinks.LstView_SetItemText("List1",b,1,links[k+1]);
            c++;
        }
Surely that b should be a c, or it doesn't even work for me?  I'll assume it's just me though, you must have tested it before releasing.

2.  Don't assume opera is installed to C:\Program Files\Opera\Opera.exe... windows XP's installer is so stupid I don't even have a C:\ and plenty people install programs in... different places.

3.  Again, favourites, C:\.  Plus, you could read firefox's favourites from a bookmark.html if you were feeling like it.  But you should at least change favourites to read like so:

code:
var dir = new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%HOMEPATH%\\Favorites\\");

4.  Should check if each browser is installed and not show the button if it isn't.


I'm done.
RE: [Release] Link Grabber (Version 1.0) by EBFL on 11-24-2006 at 11:15 AM

I just tried it again for the netscape option,
But mine doesnt have it 8-)


RE: [Release] Link Grabber (Version 1.0) by Felu on 11-24-2006 at 11:19 AM

Nice Script [Image: msn_tongue.gif]. How about checking the registry for what all browsers are available and showing buttons only for available ones. Like if HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer show the Internet Explorer button and all 8-).

Also a bug [Image: msn_tongue.gif].

code:
    if(MenuItemId=="set2"){
        OnEvent_ChatWndSendMessage("", "/favourites")
    }

code:
    if(Message.substr(0,6)=="/faves"){
        try{
            WndLinks.Close(1);
        }catch(e){

Shouldn't it be OnEvent_ChatWndSendMessage("", "/faves") [Image: msn_tongue.gif]?


Another bug :P
When no link is selected nothing should open up instead of unidentified :P

Some more things
code:
function GetFavouritesFolder(){
    var CSIDL_FAVORITES = 0x0006;
    var szSendToPath = Interop.Allocate((255 *2) +2);
    Interop.Call("Shell32", "SHGetSpecialFolderPathW", 0, szSendToPath, CSIDL_FAVORITES, 0);
    return szSendToPath.ReadString(0);
}


See Opera's Command Line Options
RE: [Release] Link Grabber (Version 1.0) by Spunky on 11-24-2006 at 04:36 PM

quote:
Windows Command Line Options

Note: Windows command line switches must be preceded by '/' (a forward slash) only. They are case insensitive.
Settings <full path>    Launch with specified settings (opera6.ini) file
Debug    Voice debug mode

No option to specify a URL... These are switches to add to the command line in a shortcut file, not for running the program from the RUN command



quote:
Originally posted by alexp2_ad
1. Surely that b should be a c, or it doesn't even work for me?  I'll assume it's just me though, you must have tested it before releasing.

2.  Don't assume opera is installed to C:\Program Files\Opera\Opera.exe...

3.  Again, favourites, C:\.  Plus, you could read firefox's favourites from a bookmark.html

4.  Should check if each browser is installed and not show the button if it isn't.

1) Yes... It should :p

2) Adding a method to check for the path as we speak

3) The favourites location is now read from the reigstry and it includes the drive letter so it SHOULD always be right

4) Close enough... If it doesn't detect the exe file it disables the button (Obviously, this will work better when it is definately the right parth)

Also, the %HOMEPATH% environment variable you suggested only returns the path AFTER the drive letter (eg. "\Documents and Settings\My Documents") Is that just me or does it happen for other people as well?
RE: [Release] Link Grabber (Version 1.0) by MicroWay on 11-24-2006 at 10:12 PM

Thanks.. I will test it and if there is a bug/another suggestion, I tell you... Great WORK!!!
;)(Y)

Edit: Sorry, but when I click on "Favourites Link", no window apear or nothing happens? Maybe some incompatibility that I didn't know??? USing: IE6, Plus! 4.10, WLM 8.0 and WinXP SP2
Edit 2: Another problem is that the script works fine... But on "Found Links", it dind't show the "location", but still open the link...
;)


RE: RE: [Release] Link Grabber (Version 1.0) by CookieRevised on 11-24-2006 at 10:31 PM

quote:
Originally posted by SpunkyLoveMuff
2) It's not really easy to tell if a file is legitimate or not and people may want to send files via WLM... I can add an option that changes the link if it's a certain file type, but it will not be on by default.
Don't... options like this never ever work like intended. Blocking or auto-deleting such files and links will always result in unwanted deletions etc.

See WLM's/Windows OneCare's own (stupidly annoying!) block for certain extensions etc.

quote:
Originally posted by alexp2_ad
Can I make a few suggestions?
3.  Again, favourites, C:\.  Plus, you could read firefox's favourites from a bookmark.html if you were feeling like it.  But you should at least change favourites to read like so:

code:
var dir = new ActiveXObject("WScript.Shell").ExpandEnvironmentStrings("%HOMEPATH%\\Favorites\\");

Don't use environment variables if you don't have to. Not everybody has such environment variables and sometimes they even are wrongly defined. Use the proper Windows APIs (eg: SHGetSpecialFolderPath and the likes) to get those special folders.

quote:
Originally posted by alexp2_ad
4.  Should check if each browser is installed and not show the button if it isn't.
Better just disable the button. Hiding the button will result in a messy layout with gaps between the buttons when certain browsers aren't installed.

quote:
Originally posted by SpunkyLoveMuff
(...) These are switches to add to the command line in a shortcut file, not for running the program from the RUN command
That is the exactly the same. What you enter in the shortcut _is_ exactly what you would write on the command line in a DOS-box.

quote:
Originally posted by SpunkyLoveMuff
3) The favourites location is now read from the reigstry and it includes the drive letter so it SHOULD always be right
Do not... That registry key you're using (I assume, I didn't checked out the script yet) is only there for Windows compatibily reasons. Although extremely many apps use those keys to get to those paths it really shouldn't be used. Use the proper APIs instead...


---------

EDIT: after writing this post I4ve seen you've made some changes already or responded on some things already.... I'll sush now ;)
RE: [Release] FindLinks (Version 2.1) by Spunky on 12-06-2006 at 03:54 AM

Right...

Favourites are now found in ways that shouldn't cause any problems. IE is read using SHGetSpecialFolderPath(), Opera uses an "adr" file type (found in AppData folder so again, using SHGetSpecialFolderPath()...) to store it's favourites and FF and Netscape use a bookmarks.html file(In AppData again, but with a random address for the "profile" folder, which is read from an ini file). (FF and Netscape are SO similar, all I had to do was alter some variables and the same code applies for both. So it reads all favourites for those browsers... so far (might add more...). Favourites now update everytime you go into the menu, not just on initialization.

As mentioned before, I made the buttons disable rather than hide for the same reasons Cookie stated. I fixed the problem of the browser opening an "undefined" site if no link was selected (see Felu's post. Thanks :p) I also got rid of the "faves/favourites" blunder meaning the window will now open from the menu as well :p

I want to implement some better error checking before a final release as the method for detecting available browsers is not certain to work as files could be in none default locations and so on. I may end up using some registry keys with references to the programs (which hopefully get removed during it's uninstallation).
The reg keys shouldpoint to the exe file that is the browser, if that file is not there then it should be uninstalled... ^o) I think thats how it goes...



Added support for two new browsers (Avant Browser and Maxthon). Tried Songbird, but it doesn't seem to accept parameters. It just loads the default home page. I fixed a bug where when you opened the favourites window for a second or third time etc where it was adding them AGAIN



UPDATE
Been working on this again and it now has some cool new features. The script now includes a configuration wizard that allows the user to specify which browsers are installed and at which location. There are a couple of bug fixes.

[Image: need%20you.gif]
I Need YOU

I need people to test this for me and tell me any errors they get. I would be most grateful :P

EDIT: BTW, The link is in the first post
RE: [Release] FindLinks (Version 2.1) by elektra on 12-06-2006 at 08:27 PM

quote:
Originally posted by SpunkyLoveMuff
Right...

Favourites are now found in ways that shouldn't cause any problems. IE is read using SHGetSpecialFolderPath(), Opera uses an "adr" file type (found in AppData folder so again, using SHGetSpecialFolderPath()...) to store it's favourites and FF and Netscape use a bookmarks.html file(In AppData again, but with a random address for the "profile" folder, which is read from an ini file). (FF and Netscape are SO similar, all I had to do was alter some variables and the same code applies for both. So it reads all favourites for those browsers... so far (might add more...). Favourites now update everytime you go into the menu, not just on initialization.

As mentioned before, I made the buttons disable rather than hide for the same reasons Cookie stated. I fixed the problem of the browser opening an "undefined" site if no link was selected (see Felu's post. Thanks :p) I also got rid of the "faves/favourites" blunder meaning the window will now open from the menu as well :p

I want to implement some better error checking before a final release as the method for detecting available browsers is not certain to work as files could be in none default locations and so on. I may end up using some registry keys with references to the programs (which hopefully get removed during it's uninstallation).
The reg keys shouldpoint to the exe file that is the browser, if that file is not there then it should be uninstalled... ^o) I think thats how it goes...



Added support for two new browsers (Avant Browser and Maxthon). Tried Songbird, but it doesn't seem to accept parameters. It just loads the default home page. I fixed a bug where when you opened the favourites window for a second or third time etc where it was adding them AGAIN



UPDATE
Been working on this again and it now has some cool new features. The script now includes a configuration wizard that allows the user to specify which browsers are installed and at which location. There are a couple of bug fixes.

[Image: need%20you.gif]
I Need YOU

I need people to test this for me and tell me any errors they get. I would be most grateful :P

EDIT: BTW, The link is in the first post

when i download the script i go to import it, but it says that it is imported but failed to start 8-)
RE: [Release] FindLinks (Version 2.1) by Thor on 12-06-2006 at 08:45 PM

quote:
Originally posted by elektra
when i download the script i go to import it, but it says that it is imported but failed to start (Smilie)
x2

Debug:
Feil: Objektet støtter ikke angitt egenskap eller metode.
       Linje: 3. Kode: -2146827850.
En feil oppstod ved skript-oppstart

Norwegian :P
RE: [Release] FindLinks (Version 2.1) by Spunky on 12-07-2006 at 04:38 PM

quote:
Originally posted by Nitro
Debug:
Feil: Objektet støtter ikke angitt egenskap eller metode.
       Linje: 3. Kode: -2146827850.
En feil oppstod ved skript-oppstart

I need that in English if possible :s

RE: [Release] FindLinks (Version 2.1) by elektra on 12-07-2006 at 05:20 PM

quote:
Originally posted by SpunkyLoveMuff
quote:
Originally posted by Nitro
Debug:
Feil: Objektet støtter ikke angitt egenskap eller metode.
       Linje: 3. Kode: -2146827850.
En feil oppstod ved skript-oppstart

I need that in English if possible :s
i beleive its something like error on line 3 code:
Script failed to start
RE: [Release] FindLinks (Version 2.1) by Spunky on 12-07-2006 at 05:47 PM

quote:
Originally posted by elektra
i beleive its something like error on line 3 code:
Script failed to start

I already know that it's an error on line 3, however it seems to be referring to an object and there is only one object on line 3 which is just a variable being assigned as a new Array();
RE: [Release] FindLinks (Version 2.1) by elektra on 12-07-2006 at 05:55 PM

quote:
Originally posted by Translator
Feil: Objektet støtter ikke angitt egenskap eller metode. In to english is:
blemish The object am not backing designated character or method.
Of course thats done by translator, im trying to help wont be 100% accurate but you can figure it out i think 8-)
RE: [Release] FindLinks (Version 2.1.2) by Spunky on 12-10-2006 at 01:33 PM

Even if I do a fresh install of the script, I cannot recreate this error. Is anybody else having problems with this?

SOLVED: The error was:

quote:
Invalid root in registry key "HKCR\Applications\Opera.exe\shell\open\command\".
Error: 'undefined' is null or not an object.
       Line: 3. Code: -2146823281.


Opera wasn't installed and I hadn't put error checking in for detecting it :p

First post update with the fix (also fixes all other browsers in the script)

Thanks to Nick for his help finding that

New Version, see first post for download :p

(only added configuration setup checking really, but probably worth the update)
RE: [Release] FindLinks (Version 2.1.2) by SerGuMa on 12-10-2006 at 09:17 PM

When I write /faves it just tells me that it isn't a command (although it appears in the command list, but it doesn't autocomplete itself).
Moreover, if I click the option in the script menu it doesn't do anything.
Capturing links is working fine, though.

P.S.:Could you implement an option to store the links, like an historial?


RE: [Release] FindLinks (Version 2.1.2) by alexp2_ad on 12-10-2006 at 10:22 PM

Upon opening favourites:

Error: 'ffFaves.1' is null or not an object.
       Line: 127. Code: -2146823281.


Also, wtf @ the mosaic window as the background... uh... why? :S


RE: [Release] FindLinks (Version 2.1.2) by Spunky on 12-10-2006 at 10:38 PM

quote:
Originally posted by alexp2_ad
Error: 'ffFaves.1' is null or not an object.
       Line: 127. Code: -2146823281.

That refers to a problem splitting the favourites from FF up into chunks. Unfortunatley, I don't get this error so I can't tell if my "fix" fixes it. I've placed the line in a try statement and hopefully the file will still split ok with it :s

quote:
Originally posted by alexp2_ad
Also, wtf @ the mosaic window as the background... uh... why?

Partly for the fact that it was one of the first decent browsers and I thought I'd kind of pay tribute to that and partly for another reason I won't go into until somebody guesses :p
RE: [Release] FindLinks (Version 2.1.2) by Lukeyy19 on 03-04-2007 at 07:37 PM

sorry to bring back a 2 month old topic, but i just installed this, and my main browser is BT Yahoo! Browser, i have assigned this to one of the buttons but i just wanted to know how i could change the icon displayed on the button to the icon for the browser?


RE: [Release] FindLinks (Version 2.1.2) by godhunter74 on 10-20-2007 at 11:29 AM

I wanted to create a script like FindLinks, but I saw that you did.
WellDone !
I was surprised to see that you haven't put ftp:// edk:// and more like irc and other... I edited your script just for me. I share not my personnal version because it's your script.
Waiting for your update !!!

You should do this I am sure you will be even more successful.;)

I'm sorry for my English level, i'm French :$


RE: [Release] FindLinks (Version 2.1.2) by Spunky on 10-20-2007 at 05:50 PM

quote:
Originally posted by Lukeyy19
sorry to bring back a 2 month old topic, but i just installed this, and my main browser is BT Yahoo! Browser, i have assigned this to one of the buttons but i just wanted to know how i could change the icon displayed on the button to the icon for the browser?

I didn't build in support for other browsers yet, but from your post it seems to work ok which is good news. As it only supports the main 5, I haven't put in a method of changing the icons. You can however goto
quote:
H:\Program Files\Messenger Plus! Live\Scripts\Find Links\images
(replace "H:\" with the appropriate drive letter)

and replace one of the files with your own image (25x25px png file)


quote:
Originally posted by godhunter74
I was surprised to see that you haven't put ftp:// edk:// and more like irc and other... I edited your script just for me. I share not my personnal version because it's your script.
Waiting for your update !!!

You should do this I am sure you will be even more successful.

I was going to incluse these in an update but got side-tracked with other projects. I might add them into another list window.

What I may also do is add an option to display links in a toast messages that will open the link when clicked =/
RE: [Release] FindLinks (Version 2.1.2) by EvilDragon on 11-22-2010 at 12:02 AM

Hm... doesn't work correctly for me.


I select Firefox, then browse to its location. Then after it detects links, I select a link and click on the Firefox icon, but it doesn't open the link, instead it opens Windows Explorer window pointing at Firefox folder...


RE: [Release] FindLinks (Version 2.1.2) by matty on 11-22-2010 at 12:31 AM

Is also 4 years old... things change...


RE: [Release] FindLinks (Version 2.1.2) by Hank on 11-22-2010 at 12:53 AM

if its old an hasnt been updated. a Mod may aswell close this thread


RE: [Release] FindLinks (Version 2.1.2) by Spunky on 11-22-2010 at 01:24 PM

As soon as I can get a version of 2009 on my PC, or  2011 is fully supported by Plus!, I will update this script to work with some of the most popular browsers (IE, Firefox, Opera and Chrome). Any suggestions for more browsers are welcome.