Shoutbox

[Developers] Script Packager - 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: [Developers] Script Packager (/showthread.php?tid=61961)

[Developers] Script Packager by Dempsey on 06-28-2006 at 10:24 PM

Well here is my Script Packager, that will be a part of the upcoming Script Studio.

Theres no installer atm, as this is intended as a kind of test release so I can get some feedback and check it works ok for other people.

Just extract the zip file somewhere and run ScriptPackager.exe

You type in some info about your script, add your files, pick any to be registered, choose where to save and your done :D

Have fun :)     let me know any problems/ideas/feature requests.

Btw adding support for the menu stuff in the ScriptInfo.xml is on the todo for some time in the future already.

EDIT:  Script Packager 1.1

Change Log:

  • Make the Add Files and Add Subfolder start browsing in C:\Program Files\Messenger Plus! Live\Scripts by default
  • Show a simulation/example of how the script import dialog
  • Make a remove button in the Add Files dialog
  • FIX:  After adding a folder, removing some files, the next screen "Register Com Objects" Still showed all files

RE: [Developers] Script Packager by Three6Mafia on 06-28-2006 at 10:35 PM

i love it, works for me :D ty v much


RE: [Developers] Script Packager by XM4ST3RX on 06-28-2006 at 10:39 PM

Hey hey,

user-friendly, nice and quick, no complications.... very good mate, works a treat (Y)


Cheers,
XM4ST3RX


RE: [Developers] Script Packager by alexp2_ad on 06-28-2006 at 10:40 PM

Heh, if people can make a script they can use an archiver. :P

Still, excellent work none-the-less, I'll be looking forward to the Script Studio. :)


RE: [Developers] Script Packager by upsfeup on 06-28-2006 at 10:44 PM

Well! here I go: :P

Sugestion: add a button to remove files. Or a friendly way to remove them. I just right-clicked and there it was the option.
Anyway, after adding a folder, removing some files, the next screen "Register Com Objects" Still showed all files (before removing them).

And about not adding ScriptInfo.xml. I believe it is because of the first panel that asks for the information. But there is not all of it. What about commands and menus?

Ups... sorry!


RE: [Developers] Script Packager by Lou on 06-28-2006 at 10:53 PM

Is this an updated version or do I have the latest one?:P


RE: [Developers] Script Packager by Three6Mafia on 06-28-2006 at 10:54 PM

YAYAY!!!:D I can say i D/L it first (In Public Version) :P
its a great tool to have lying around for when some w(A)nka doesn't plsc their script (i am aware u can change file extension[but for the even sadder cases:'(])...oh and for when u hurry up and make the script studio :P


BETTERA???


RE: [Developers] Script Packager by Lou on 06-28-2006 at 10:56 PM

quote:
Originally posted by Three6Mafia
I can say i D/L it first
But you didn't. He released this to testers months ago.

edit:
quote:
Originally posted by Three6Mafia
BETTERA???
;)

When are we to expect the final version of the entire program?

I can't wait to see it:)
RE: [Developers] Script Packager by Dempsey on 06-29-2006 at 07:21 AM

quote:
Originally posted by upsfeup
Sugestion: add a button to remove files. Or a friendly way to remove them. I just right-clicked and there it was the option.
Oh yea, I forgot to mention about the right click menu, but yea I'll add a delete button too (Y)
quote:
Originally posted by upsfeup

Anyway, after adding a folder, removing some files, the next screen "Register Com Objects" Still showed all files (before removing them).
Ah yea, so it does, thanks, I'll fix that :)

RE: [Developers] Script Packager by Felu on 06-29-2006 at 07:42 AM

I cant use it i get an error :(.

[Image: attachment.php?pid=681248]


RE: [Developers] Script Packager by Dempsey on 06-29-2006 at 07:57 AM

quote:
Originally posted by -!Felu!-
I cant use it i get an error :(.
Ah yea you need to download comctl32.ocx from somewhere, when the program is complete, the install will also check if required files are installed :)

try downloading:  http://www.ascentive.com/support/new/images/lib/COMCTL32.OCX

Copy it to system32 folder and then do regsvr32 \windows\system32\COMCTL32.OCX
RE: [Developers] Script Packager by Menthix on 06-29-2006 at 09:03 AM

Nice, but a few suggestions:
- Set version to 1.0 be drfault (just 1 looks dodgy IMO).
- Make the Add Files and Add Subfolder start browsing in C:\Program Files\Messenger Plus! Live\Scripts by default (detect which folder MP!L was installed on).
- Make a remove button in the Add Files dialog, i saw the reghclick menu, but I think many users will miss that one.
- BUG: In the Add Files dialog, add a folder, then remove it, then add the same folder again and i get an error "RunTime error 35602: Key is not unique in collection".


RE: [Developers] Script Packager by Mike on 06-29-2006 at 09:15 AM

Nice program! (Y)
Btw, when do you think script studio will be released?
I'm asking because i'm looking forward to the window designer... :P


Offtopic: How did you do the multifile select common dialog?
I wanted to do that once, I found a flag that converted it to multifile, but all i was getting was an ugly old-style dialog control... :(


RE: [Developers] Script Packager by Dempsey on 06-29-2006 at 09:37 AM

quote:
Originally posted by MenthiX
- Set version to 1.0 be drfault (just 1 looks dodgy IMO).
Yea good idea, fixed. :)
quote:
Originally posted by MenthiX
- Make the Add Files and Add Subfolder start browsing in C:\Program Files\Messenger Plus! Live\Scripts by default (detect which folder MP!L was installed on).
Will do, after it has been brosed for once, it should default back to the same folder, but to start with I will default to the Scripts folder.
quote:
Originally posted by MenthiX
- Make a remove button in the Add Files dialog, i saw the reghclick menu, but I think many users will miss that one.
Already done, will be in next release :)
quote:
Originally posted by MenthiX
- BUG: In the Add Files dialog, add a folder, then remove it, then add the same folder again and i get an error "RunTime error 35602: Key is not unique in collection".
Ah thanks :)  I'll fix that now.

quote:
Originally posted by Mike
Nice program! (Y)
Thanks :D
quote:
Originally posted by Mike
Btw, when do you think script studio will be released?
I'm asking because i'm looking forward to the window designer... :P

Well the GUI Maker is the part im working on now, I'm hoping to get an early, kind of preview release out within a week ro two to start getting some feedback.
quote:
Originally posted by Mike

Offtopic: How did you do the multifile select common dialog?
I wanted to do that once, I found a flag that converted it to multifile, but all i was getting was an ugly old-style dialog control... :(
Yea mine did that at first, can't rememeber how I got around it, think I had to add another flag to force it to use the new style, I'll check later.
RE: [Developers] Script Packager by CookieRevised on 06-29-2006 at 09:43 AM

Simple suggestions:

- Ability to set a comment for the zip itself (instead of the "created by"... well this could still be added at the end I suppose)
- Check if added XML files are in unicode, if not convert them automatically (after showing a notice and confirmation from the user)
- show a simulation/example of how the script import dialog will look like when the script gets installed. And of course the ability to go back and tweak your settings.

Advanced suggestions:

- it's now a standalone tool, but it might be very handy if it is a script itself (no need for starting another tool when the user is already scripting in Plus!)
- add a right click context menu for folders in windows explorer => extreeeeeeemly handy. No need for manually starting up this tool, selecting the script folder, etc...
- add a right click context menu item for plsc files to edit the scriptinfo.xml inside the script pack

;)

[OFF TOPIC]

quote:
Originally posted by Dempsey
quote:
Originally posted by Mike
Offtopic: How did you do the multifile select common dialog?
I wanted to do that once, I found a flag that converted it to multifile, but all i was getting was an ugly old-style dialog control... :(
Yea mine did that at first, can't rememeber how I got around it, think I had to add another flag to force it to use the new style, I'll check later.
It depends on what DLL (API) you use. There are two different ones (and then there are also ActiveX objects, but that shows yet another kind of open/save file dialog). if you use the 'modern' one, you indeed only need to set a multiselect flag.

[/OFF TOPIC]
RE: [Developers] Script Packager by Dempsey on 06-29-2006 at 10:04 AM

quote:
Originally posted by CookieRevised
Simple suggestions:
- Ability to set a comment for the zip itself (instead of the "created by"... well this could still be added at the end I suppose)
Yup I could make that another option.
quote:
Originally posted by CookieRevised
- Check if added XML files are in unicode, if not convert them automatically (after showing a notice and confirmation from the user)
Good idea (Y)  I'll work on that.
quote:
Originally posted by CookieRevised
- show a simulation/example of how the script import dialog will look like when the script gets installed. And of course the ability to go back and tweak your settings.
That should be easy enough (Y)

quote:
Originally posted by CookieRevised
Advanced suggestions:

- it's now a standalone tool, but it might be very handy if it is a script itself (no need for starting another tool when the user is already scripting in Plus!)
Could make more sense yea, but I'm not too great with JS so I'll leave that to someone else.  It's standalone atm, but the plan is that it will be part of 1 app, Script Studio.
quote:
Originally posted by CookieRevised
- add a right click context menu for folders in windows explorer => extreeeeeeemly handy. No need for manually starting up this tool, selecting the script folder, etc...
Good idea yea, could definatly make that an option in the installer.
quote:
Originally posted by CookieRevised
- add a right click context menu item for plsc files to edit the scriptinfo.xml inside the script pack.
Do you mean editing it as in opening it with Script Packager with teh fields pre-filled and regisered files checked?  Or just text editing the file?  Either way, great suggesstion (Y)

RE: RE: [Developers] Script Packager by CookieRevised on 06-29-2006 at 10:34 AM

quote:
Originally posted by Dempsey
quote:
Originally posted by CookieRevised
- add a right click context menu item for plsc files to edit the scriptinfo.xml inside the script pack.
Do you mean editing it as in opening it with Script Packager with teh fields pre-filled and regisered files checked?  Or just text editing the file?  Either way, great suggesstion (Y)
both ways?

This might also be a suggestion as-is. A button where the scriptinfo xml is loaded in notepad so people can make some changes manually, and after closing the notepad and saving it (and thus the tool detecting a change was made by comparing the saved file with the original one), the tool updates its fields. =< this is the same way what winzip does when you open and edit a file inside a zip... very handy.
RE: [Developers] Script Packager by Dempsey on 06-29-2006 at 03:06 PM

Script Packager 1.1 Released, few small changes, see first post.


RE: [Developers] Script Packager by dramado on 06-30-2006 at 04:53 PM

my packager, very easy to use, drag and drop the folder ontop of .bat

package.bat

code:
c:\progra~1\winzip\winzip32 -a -r -en %1.zip %1
move %1.zip %1.plsc
%1.plsc



RE: [Developers] Script Packager by Mike on 06-30-2006 at 07:08 PM

quote:
Originally posted by dramado
my packager, very easy to use, drag and drop the folder ontop of .bat

package.bat
code:
c:\progra~1\winzip\winzip32 -a -r -en %1.zip %1
move %1.zip %1.plsc
%1.plsc



Two things:
1) To use this, the user needs to have WinZip installed into the location "C:\Program Files\Winzip"
2) This won't create Scriptinfo.xml. You need to create it yourself. If you don't then (I guess that) the script package won't be recognized as a valid script package.
RE: [Developers] Script Packager by pollolibredegrasa on 06-30-2006 at 07:17 PM

Just a small bug, but a bug all the same ;)

When creating a description, if the text is too long it won't wrap in your preview window:

[Image: attachment.php?pid=682934]


RE: [Developers] Script Packager by Dempsey on 07-01-2006 at 09:11 AM

quote:
Originally posted by fatfreechicken
Just a small bug, but a bug all the same ;)

When creating a description, if the text is too long it won't wrap in your preview window

Ah yea (y) cheers
RE: [Developers] Script Packager by -dt- on 07-01-2006 at 09:29 AM

Looks quite nice dempsey good job :)

quote:
Originally posted by dramado
my packager, very easy to use, drag and drop the folder ontop of .bat

package.bat
code:
c:\progra~1\winzip\winzip32 -a -r -en %1.zip %1
move %1.zip %1.plsc
%1.plsc




=p mines easier i just click a link on my websvn and it auto packages it
http://svn.thedt.net/plusrelease.phps


RE: RE: [Developers] Script Packager by CookieRevised on 07-02-2006 at 01:28 AM

quote:
Originally posted by Dempsey
quote:
Originally posted by fatfreechicken
Just a small bug, but a bug all the same ;)

When creating a description, if the text is too long it won't wrap in your preview window
Ah yea (y) cheers
The textboxes in the preview also don't have the exact same measurements as the real thing. The reason why I suggested a preview is so people could exactly ("to the pixel" so to speak) see how their text will look. eg: to check if a long term isn't wrapped around making it look ugly or something. So it is vital that the preview textboxes have the same dimensions and behaviour....

Also take in account the parsing of special XML/HTML entities (the import dialog doesn't parse all of them, but it does parses some).
RE: [Developers] Script Packager by Marelo on 07-05-2006 at 03:27 AM

I've got the following error when I executed my .plsc:

"The file you tried to load does not appear to be a valid Messenger Plus! script pack"

I made the script directly on the script editor, copied/pasted on notepad and saved as .js and finally packed with the Script Packer...

Any ideas of what could be wrong? Thanks in advance!


RE: [Developers] Script Packager by Dempsey on 07-05-2006 at 06:32 AM

quote:
Originally posted by Marelo
I've got the following error when I executed my .plsc:

"The file you tried to load does not appear to be a valid Messenger Plus! script pack"

I made the script directly on the script editor, copied/pasted on notepad and saved as .js and finally packed with the Script Packer...

Any ideas of what could be wrong? Thanks in advance!

Things to check:
  • Is the .JS file in the root of the pack?  Not in a subfolder?
  • Do you have any window XML files?  If so they need saving as unicode
Can't think of anything else atm, but if you want to attach the script here, or email it to me at dempsey @ mpscripts.net, ill take a look for you :)
RE: [Developers] Script Packager by Marelo on 07-05-2006 at 01:44 PM

No... My script is pretty simple...
No COM's, DLL's, and so on... Just a short .js file...

code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
    // Função criada por Luiz Gonzaga dos Santos Filho
    // Contato: lfilho@gmail.com
    // TODO: Capitalar as letras após pontuação.
    // Dicas, sugestões - entre em contato!
   
    var substituir= new Array();
    var vetorPalavras = sMessage.split(' ');
       
    substituir['vc'] = 'você';
    substituir['nao'] = 'não';
    substituir['ja'] = 'já';
    substituir['ta'] = 'tá';
    substituir['pq'] = 'porque';
    substituir['qq'] = 'qualquer';
    substituir['q'] = 'que';
    substituir['eh'] = 'é';
    substituir['bao'] = 'bão';
    substituir['sao'] = 'são';
    substituir['tao'] = 'tão';
    substituir['tambem'] = 'também';
    substituir['blz'] = 'beleza';
    substituir['hj'] = 'hoje';
    substituir['mto'] = 'muito';
    substituir['mta'] = 'muita';
    substituir['soh'] = 'só';

    for (i=0; i<vetorPalavras.length; i++) {
        if (substituir[vetorPalavras[i]])
            vetorPalavras[i] = substituir[vetorPalavras[i]];
        if (i == 0 && vetorPalavras[i].charAt(0) != '/' && vetorPalavras[i].substr(0, 4) != 'www.' && vetorPalavras[i].substr(0, 7) != 'http://')
            vetorPalavras[i] = vetorPalavras[i].charAt(0).toUpperCase() + vetorPalavras[i].substr(1);
         else if (inArray(vetorPalavras[i-1].charAt(vetorPalavras[i-1].length - 1), ".?!"))
              vetorPalavras[i] = vetorPalavras[i].charAt(0).toUpperCase() + vetorPalavras[i].substr(1);
    }
   
    return vetorPalavras.join(' ');
}

function inArray(needle, haystack) {
    for (var i = 0; i < haystack.length; i++)
        if (haystack.charAt(i) == needle)
            return true;
    return false;
}


The contents of the generated ScriptInfo.xml is:

code:
<?xml version="1.0"?>
    <ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="1.0">
    <Information>
        <Name>TextReplacer+Capititalizer v1.0</Name>
        <Description>Este script torna maiúscula o primeiro caracter de cada frase e substitui palavras como "vc", "tb", "q" por "você", "também" e "que", respectivamente.

Para adicionar novas palavras edite o script em "Opções" -> Aba "Geral" -> Item de menu "Scripts"

Desenvolvido por Luiz Gonzaga dos Santos Filho
Comentários, sugestões, etc: lfilho@gmail.com</Description>
        <AboutUrl>www.luizgonzaga.eti.br</AboutUrl>
    </Information>
</ScriptInfo>


Is there any restrictions on file naming, for example?
As you may noticed my script is is portuguese... So, must I save the file in a diferent format because of the "~^ç" letters?

Thanks!
RE: RE: [Developers] Script Packager by CookieRevised on 07-06-2006 at 08:13 AM

quote:
Originally posted by Marelo
No... My script is pretty simple...
No COM's, DLL's, and so on... Just a short .js file...
The contents of the script isn't important, how the script is saved and where is important:
quote:
Originally posted by Dempsey
Things to check:
  • Is the .JS file in the root of the pack?  Not in a subfolder?



But the error you get is caused by:
quote:
Originally posted by Marelo
The contents of the generated ScriptInfo.xml is:
code:
<?xml version="1.0"?>
    <ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="1.0">
    <Information>
        <Name>TextReplacer+Capititalizer v1.0</Name>
        <Description>Este script torna maiúscula o primeiro caracter de cada frase e substitui palavras como "vc", "tb", "q" por "você", "também" e "que", respectivamente.

Para adicionar novas palavras edite o script em "Opções" -> Aba "Geral" -> Item de menu "Scripts"

Desenvolvido por Luiz Gonzaga dos Santos Filho
Comentários, sugestões, etc: lfilho@gmail.com</Description>
        <AboutUrl>www.luizgonzaga.eti.br</AboutUrl>
    </Information>
</ScriptInfo>


For starters your description is majorly waaaaaaaaay too long. And second, which causes the error, it contains a lot of characters which are not valid in XML (eg: the ">"). If you want to use those characters you need to use HTML/XML entities for them (eg: "&gt;").

quote:
Originally posted by Marelo
Is there any restrictions on file naming, for example?
the file name of the XML must be "scriptinfo.xml" and must be saved in unicode.
RE: [Developers] Script Packager by Marelo on 07-06-2006 at 01:13 PM

Superb! Thanks for the reply!

It was the ">" thing...

Now it's just fine!
Cya