Shoutbox

File Organiser Plug-in - 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: File Organiser Plug-in (/showthread.php?tid=17720)

File Organiser Plug-in by Jutx on 11-05-2003 at 05:30 PM

Here is my first VB plug-in.

It is a file organiser, basically just use a command and it will move files containing a certain string (including file extension) to a folder you specify.

As for bugs i have tested it on my Win XP (home) machine and it works fine, please report bugs/suggestions/comments in this thread.

Extract from readme

Commands


/xorgfiles  -     Organises your recieved files folder (use this command after you recieve a new                file)

/xorgauto    -      Organises your received files folder every few minutes (only if required, ON to                 turn on, OFF to turn off)(only needs to be turned on once during MSN session)

/xorgopts   -      Opens the options so you can say which files go where and a couple of                    extra options.

/xorgabout  -      About Screen



Files that should be included:
Org Readme.txt        - This file
FileOrganiser.dll    - The Actual Plugin


Files that appear after usage:

Organisations.dtb    - Your saved options


Thanks to:
DJMystic - for the installer
Patchou  - for Plus!
Mnjul    - for helping me with a problem (see good deeds DO pay off!)


KNOWN LIMITATIONS :(

/xorgfiles won't be cleared from the conversation window until files are actually organised.

/xorgauto won't be cleared at all but you can clear it yourself as soon as you click send or press enter

------------------------------------------------------------------------
                Change Log

Version 1.2

fixed File Organisation Error bug
fixed Error Handling Routine bug

Version 1.1

fixed "Click remove and leave blank entry in listview" bug (what a name)
improved options dialog
included /xorgauto command
improved error handling routine


Version 1

contained /xorgfiles, /xorgopts, /xorgabout
START VERSION


RE: File Organiser Plug-in by tomfletcherman on 11-06-2003 at 04:43 PM

this is gr8, but can u make it so th@ al msn windows rnt blocked?

makes organising files fun:P


RE: File Organiser Plug-in by wipey on 11-06-2003 at 05:00 PM

I wanna try it.....but I can't get on msn for some reason:@:(:'(


RE: File Organiser Plug-in by Jutx on 11-06-2003 at 05:09 PM

I just tried it with the options window and it doesn't work, for some reason the form won't show if it is not modal. I will work on it tho and will tell you if i manage to sort it.

PS good to hear wipey hope ya fix your MSN


RE: File Organiser Plug-in by wipey on 11-06-2003 at 08:33 PM

lol it works now:D finally...
um I tried organizing files and it done something then sent the command in my convo window, is this meant to happen?


RE: File Organiser Plug-in by Jutx on 11-06-2003 at 09:23 PM

If by done something you mean a delay then yes it does. The delay is just getting a list of files from the Received Files folder and moving the appropriate files. This delay depends on how many files are there and how big the files are.


RE: File Organiser Plug-in by wipey on 11-07-2003 at 12:21 AM

shud it really send the command into my conversation after tho? it would be better if it didnt:$


RE: File Organiser Plug-in by Sk3tch on 11-07-2003 at 01:49 AM

Not a bad plugin :) Nice idea.

quote:
Originally posted by wipey
shud it really send the command into my conversation after tho? it would be better if it didnt
Yeah, i agree.. its nice to keep it un-noticed, if possible that would be better :wink:
RE: File Organiser Plug-in by riley on 11-07-2003 at 11:07 AM

nice plug-in (y) could there be an option if a file is received (file is done transfering) it automatically sort the file, so take action if a transfer is finished?


RE: File Organiser Plug-in by Jutx on 11-07-2003 at 05:50 PM

OK:

wipey and sk3tch: Beginning to think this is a limitation, because i have worked all day and still no joy

riley: not possible however i am testing out a new feature that'll organise automatically.

* Jutx is very pleased with himself as only 1 little bug has been found.
* Jutx is annoyed that this one little bug is unsolvable right now


RE: File Organiser Plug-in by wipey on 11-07-2003 at 11:29 PM

so u shud be:P(y)


RE: File Organiser Plug-in by Jutx on 11-08-2003 at 01:30 AM

Hi everyone,

I posted a new version of the plugin up. This version has:

fixed "Click remove and leave blank entry in listview" bug
improved options dialog
included /xorgauto command
improved error handling routine


PS sorry wipey and sk3tch but i cannot fix that bug so it has become a limitation. Its on my to do list but i really do not think it can be done.

Way off topic but must be said. I found my cat today he has been missing for a week :(. turns out he was locked in a house builders were working on. Had to be mentioned


RE: File Organiser Plug-in by Sk3tch on 11-08-2003 at 01:34 AM

Thats great :)  Better options dialog is nice, and thats ok.. if you cant do it its not a big deal, it would just be nice :wink:


RE: File Organiser Plug-in by wipey on 11-08-2003 at 12:55 PM

um, isn't the bug fixed by placing like

code:
sTextToSend = ""

in your function?

good to hear bout your cat, ours once got locked in a garage lol, wasn't funny at the time no one knew where he was:(:$
RE: File Organiser Plug-in by Jutx on 11-08-2003 at 07:21 PM

Ah if it only were as simple as:
Sresult = ""

You are right in theory but Sresult isn't processed until the function is finished so in /xorgfiles it has to finish performing the function (organising files) before it sends Sresult (even if Sresult = "" is the first thing in the code.) and the reason why it doesn't clear at all on /xorgauto is because the function doesn't finish until /xorgauto OFF is called (which is when Sresult will be sent.) I hope that makes sense


RE: File Organiser Plug-in by wipey on 11-09-2003 at 12:31 AM

Surely though something like this would work:$?
(pardon my VB. not sure what you program in:P)

code:
ElseIf sCommand = "xorgfiles" Then            'Yea I cut down the compare cos I can't remember lol
    Call OrganizeFiles()
    sResult = ""
    ParseCommand = True
    Exit Function

sorry, I dunno why it wouldn't, correct me if I'm stupid:$

(just say you program in C and I'll get my coat now:P)

also if it takes alot of time why not place the function in another thread so your plugin could return ""?
RE: File Organiser Plug-in by Jutx on 11-29-2003 at 06:56 PM

I have just noticed a huge bug in the newer version of the plug-in. It basically assumed that files that have been moved, have not, so it tried to move them and you got an error. Well here is the bug fix.

Just one thing you may need to remove all your old organisations if you are updating from the older version


RE: File Organiser Plug-in by dotNorma on 02-05-2004 at 02:08 AM

I must try this plug-in when i get home!


RE: File Organiser Plug-in by optimism_ on 02-05-2004 at 05:44 PM

If you want the "Organisation" to not lock up messenger you must run it in another thread. This means you call the organisation function and then instantly set sResult to "" and return

I dont know what VBs like for multithreading, i use c. However in c, the task would be along the lines of

* make a data structure to contain "messages".
* make a function to check the data structure for "messages" such as the "Organise files" message, and when it finds the message, calls the organise files function.
* create a new thread to execute that function
*in the main thread, at the appropriate time add the "Organise files" message to the queue.

obviously you would start your thread up at initialise() and close it down at uninitialise.

8-) if only u used c/c++ cos i got a set of classes that do all this for u =/


RE: File Organiser Plug-in by Jutx on 02-05-2004 at 06:43 PM

Multithreading (gulp) is the solution for the "limitations" of this plugin. Now all i have to do is to figure out multithreading. As for this plugin generally, i am gonna do a complete remake of it.


RE: File Organiser Plug-in by optimism_ on 02-05-2004 at 06:49 PM

if u make it in c++, u can have my lib ;)