Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
Util plugin really necessary
Posted by: Alain
Date: December 02, 2005 09:02PM

I've realized the plugin toggle and it's verification very easily. So I think this plugin is really necessary.

But, if I'm not too exigeant (am-I?), I think it would be great to add in util (or perhaps in luamacros, or in the two) some functions as a filebox to improve some functions which need a filename with path or a path, as :

SetDir(), ClientPath() .....

Hoping ...

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: December 03, 2005 07:02AM

Thank you for your praise.
I think it's on macros what you want. Please check.

http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage

Thanks.

P.S. I changed name from "307" to "mark307". Because spammer has used a name similar to mine.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 03, 2005 08:36AM

No, you don't understand what I said, or my explanations are bad.

I think it will be good to have a button to navigate on the disk to choose a folder or a file as we have for 'Save as ...' menu entry, for example.

I also think a function to read a registry key, another to read inifile key (I don't talk of write registry key or inifile key, because some guys aren't probably ok for this)

and I must forgot some goodies ...

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: December 05, 2005 02:27PM

Sorry, I misunderstood.

I have a trouble with my PC.
Then I can't work for k-meleon now. orz

I thought to add luamacros's "choose" function to utils plugin. Showing dialogs requires hwnd, but macros can't take it.

And I suppose strangely why you make plugin, because you could make "Km_Plugs.exe".

http://kmeleon.sourceforge.net/wiki/index.php?id=DeveloperDocs

I think good that you will become a maintainer of utils plugin.
Thanks.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix at wanadoo fr
Date: December 05, 2005 04:05PM

And I suppose strangely why you make plugin, because you could make "Km_Plugs.exe".

Km_Plugs works, but I think the less we have as external tools, the better it is.
But util has the functions I need for testing and renaming plugins, and I made it with a macro and no nore need of Km_Plugs.

I think good that you will become a maintainer of utils plugin.

What do you mean by maintener ??


Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: December 11, 2005 04:35AM

File dialogs and reading registory are experimentally supported.

http://rapidshare.de/files/8962969/utils-0.0.2.zip.html

What do you mean by maintener ??

Sorry, my expression is too bad. The message I posted last is mixed two topics.

1: I saw a plugin is suitable to implement what you would write.

2: I wrote utils plugin as for a small example of K-Meleon's plugin. I hoped someone who looked the plugin would write another plugins or extend the plugin by oneself.

I know a maintainer is leader who develops and manages a software.
Thanks.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 11, 2005 09:07PM

@mark307

I've forgotten to say that my little tools are made with Visual DialogScript, not C++.

And I'm too aged to learn C++. There's a long time, I have some difficulties with C, so now ...

Thanks for the new version.

Can you just give one sample of each new function. It would be nice for an old man smiling smiley

A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: December 13, 2005 02:04PM

Hmm, I hadn't thought of a sample about new functions. However I had added some explanation to readme.txt about new functions with templates of calling.

In readme.txt, $default is default file (or folder) name such as

"C:\\My Documents\\document.txt" (or folder "C:\\My Documents"),

$name is file (or folder) name selected by user such as

"C:\My Documents\document.txt" (or folder "C:\My Documents").

$key is registry key such as

"HKEY_CURRENT_USER\\Software\\K-Meleon\\K-Meleon\\General\\InstallDir".

Thanks.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 13, 2005 07:27PM

@mark307,

I was surely a little tired, when I read the readme.txt.
Yes there are examples, and all works great.
I have just some remarks.

Regread()
---------
I've search a moment for default values. I know now the string must \\ finished.
Macros.dll seems not to appreciate directly the key in the command line, but it works great with $key.

GetOpenFileName() and GetSaveFileName()
-----------------
Would be better, if we could pass also a $default folder parameter (as for SelectDirectory)

exists(), rename(), read(), write(), append() and SelectDirectory()
-----------------
Perfect!

Thanks a lot for this really nice plugin.

@Fred,

Wait a little moment before making a RC2, a lot of macros may be greatly improved with this nice k-plugin smiling smiley)

A+


A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: December 15, 2005 01:35PM

As you complained, the explanation in readme is too few and bad. I find about it now. Thank you for your comment.

Macros.dll seems not to appreciate directly the key in the command line, but it works great with $key.

I feel strange. I tested this code.

$data = pluginmsgex(utils, "RegRead", "HKCU\\Software\\K-Meleon\\K-Meleon\\General\\InstallDir", STRING);

And the expression of registory key is borrowed from WSH and others. This plugin supports types REG_DWORD and REG_SZ.

Would be better, if we could pass also a $default folder parameter (as for SelectDirectory)

Sorry, it isn't supported. But I made sure that I could include path and wildcard on default filename, such as "C:\\Program Files\\K-Meleon\\kplugins\\*.dll". This trick is little ugly, but works well.

Thanks.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 15, 2005 08:19PM

This trick is little ugly, but works well.

I'll try it.

I have improved a lot of macros (mail, news, savedir, ...) and it works great.

Thanks

When modifying the macros, I've found a bug in macros.dll.

Does someboody can confirm:

Add this function:

Macros_BugTest{
$a="HKEY_CLASSES_ROOT\\";
$b="\\shell\\open\\command\\";
$ap="Winamp.File";
$ap == "" ? 0 : $ok=$a.$ap.$b;
$ap == "" ? 0 : $ko="HKEY_CLASSES_ROOT\\".$ap."\\shell\\open\\command\\"
alert($ok."\n".$ko);
}

in menu
Add an entry like that (where you want, in help menu, for example), and test

macros(Macros_BugTest)

If it's ok, the two lines are the same, if it bugs, they aren't.

Thanks

A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: December 16, 2005 01:28PM

I saw different lines.
And I found other strange behaviors of macros.

* Escape charactor '\r' is just only 'r'.
* 1+2*3 => 7 3*2+1 => 9 3*2+1+2*3 => 45

Thanks.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 16, 2005 04:43PM

* 1+2*3 => 7 3*2+1 => 9 3*2+1+2*3 => 45

Yes, really curious smiling smiley

A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 19, 2005 12:09PM

@mark307,

It would be nice, now to have two functions more:

copyfile() and getenv()

It should be easier than use bat or cmd files ...

Thanks

A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 19, 2005 01:37PM

@mark307,

I've found another solution (read first, write then), but I not great.

I always hope for getenv.

A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: December 19, 2005 02:18PM

This plugin has over ability, doesn't it?
http://rapidshare.de/files/9446971/utils-0.0.3.zip.html

I want to know what other users think about this plugin.
Thanks.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 19, 2005 05:14PM

Wouahhh ... It's Christmas before the date smiling smiley)

Thanks a lot

Great, Giant ...

A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: Hao Jiang
Date: December 19, 2005 07:45PM

@mark307,
I think this 's a great plugin which could greatly improve some functions in KM. Could I use this plugin in my next CCF release please?

Regards,

Hao

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: rmn
Date: December 20, 2005 02:03AM

Hey, the GetOpenFileName and GetSaveFileName plus the file IO functions seem very useful... but I'm running out of ideas of any macro to code. Damn.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 20, 2005 07:00AM

@mark307,

The last function which would be nice:

wait

To allow wait n seconds, because exec doesn't do it, and it's sometime a pain ...(IEshortcut, for example).

Thanks

@rmn,

I've already rewrite it smiling smiley


A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: December 20, 2005 02:04PM

I feel relieved by your comments. I worried about this plugin became dengerous.
http://rapidshare.de/files/9510091/utils-0.0.4.zip.html

@Hao
Yes, of cource. I'm happy at your proposal. But you have to understand risks of this plugin.

Thanks.

P.S. I'm writing a Win32 common dialog addon for Lua (not kplugin), such as:

name = w32cd.GetOpenFileName(hwnd, {
Filter = "All Files(*.*)\0*.*\0HTML Files(*.html;*.htm)\0*.html;*.htm\0\0",
FilterIndex = 0,
InitialDir = "C:\\My Documents",
Title = "Select HTML",
Flags = w32cd.OFN_HIDEREADONLY,
DefExt = "htm",
});

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: alain aupeix chez wanadoo fr
Date: December 20, 2005 05:23PM

@mark307,

I think now I have all I want to improve some things.

I really think it's as dangereous than exec command in macros command, and not more, and really better than it, which is not able to wait the end of the process ...

Thank's a lot ...

A+

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: March 19, 2006 07:09AM

Little modified.

* exec command doesn't wait infinity for safe. (waits 10 sec)
* exec and sleep commands wait 10 sec at least for over maximal wait.
Previous version ignores long wait.
* new commands GetOSVer, EncodeUTF8, DecodeUTF8, urlescape

]http://rapidshare.de/files/15868757/utils-0.0.5.zip.html

Thank you for your reading and supporting.

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: simpleinventor
Date: July 19, 2006 08:31PM

Just an idea, but I'm currently a HUGE fan of Autoit. While it can do a lot (including GUI's and registry manipulations), it can also create stand-alone EXEs and DLLs! I've been complaing about a few plugins I wanted made, and even tried to code them. Now that I'm getting better at Autoit (and the LUA plugin doesn't support advanced GUIs), I'm going to try to implement my ideas with Autoit. What do you guys think about that?

Options: ReplyQuote
Re: Util plugin really necessary
Posted by: mark307
Date: July 22, 2006 02:40PM

@simpleinventor
I don't know well about autoit, sorry.
But I saw the document, autoit is enough to get the idea.
Cheers.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.