Source language: Translate to:

Utility Plugin - for simple delphi components

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Utility Plugin

Postby HPW » Sat Nov 02, 2002 10:57 am

Just released hpwUtility 1.08.

Action: hpwBitmapToRTF now supports PNG.
Action: hpwRtfToBitmap now supports PNG.
HPW
 

Utility Plugin

Postby HPW » Sun Nov 03, 2002 3:18 pm

Just released hpwUtility 1.09.

Action: hpwMimeEncodeFile to MIME-encode binary files.
Action: hpwMimeDecodeFile to MIME-decode binary files.

So you can store all sort of binary in memo-fields.
HPW
 

Utility Plugin

Postby Gaev » Sun Nov 03, 2002 3:44 pm

Hans-Peter:

Quite an impressive set of functions you have built into this plug-in ... hats off to you !

Is there any way to have a function that captures the image of the entire inner-window of the of the running pub (in other words the page being displayed) ; I tried pointing to other (than Rectangle) objects like PushButton, Picture and Article objects, and also tried to place these above and below (a transparent) Rectangle object, but was not successful in my qwest.

Also, I recall somewhere that you planned to keep this plug-in as freeware ; what if I want to use it in a not-free product ? Would you entertain a separate chargeable version with support, especially if a smaller one with a specific subset of functions were required ?

Again, Congratulations and thanks for your contributions.
User avatar
Gaev
 
Posts: 3736
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Utility Plugin

Postby HPW » Sun Nov 03, 2002 11:58 pm

Hello gk51,

For the hardcopy I have not thought about it. Isn't their a keyboard sequence for "ALT+PRINT" which could be send with hpwsendkeys to the windowtitle? If not it might be possible to implement this in the utility-plugin.

For the freeware question djold had opened a similar thread. Afer that I had contained a license.txt file which does define the usage of this freeware. And I mean free, not GNU, MPL or all the other license models.

Of course this means: Use it as it is. No warranties. No timelines.

For the freeware which I used myself I copied the license terms/author into this file and you have to watch it for your own use.

I have no plans to make a commercial plugin. (How many commercial plugins have you seen in the last month? Reason?)  As I told I started this to learn "making plugins with delphi" and "delphi". I have some serious development in mind for my own development where I will use the "generic" plugin-helpers for myself. And in the past I often use free code for myself and this time I give a little back.

PS: Leave the hat on your head! Most work of my plugins is finding free code on the net and repackage it into a plugin. So the great delphi people out there are the nice guys who share their knowledge. Only for RtfToBitmap I find nothing and I have to write it from scratch. (After a deeper look in DIB/RTF specs) :-)


(Edited by HPW at 2:04 am on Nov. 4, 2002)
HPW
 

Utility Plugin

Postby djold1 » Mon Nov 04, 2002 4:49 am

The position that Hans-Peter has taken on his plug-ins is admirable and very clear. It certainly tells us what the rules are for this freeware.

I think that gk51 has the same hesitation about using plug-ins that are offered without charge in commercial applications as I do. Everyone that uses "free" software of any kind should also have the same hesitations if they put it in commercial work of their own.

At this point I can at least think about using an HPW plug-in. I will make the decision when I need the functions.

I would feel better about paying something for it, but that would obligate Hans-Peter in some ways which he does not want for very understandable reasons.

In spite of his modesty I am very impressed with the innovative plug-ins he has created and I think it adds a great deal to the strength of NeoBook as a whole.

You have my thanks..
djold1
 

Utility Plugin

Postby Gaev » Mon Nov 04, 2002 1:01 pm

Hans-Peter:

For the hardcopy I have not thought about it. Isn't their a keyboard sequence for "ALT+PRINT" which could be send with hpwsendkeys to the windowtitle? If not it might be possible to implement this in the utility-plugin.

By harcopy, if you meant paper-copy, that was not my intent; I was thinking of saving image to Clipboard, Variable or File; so further manipulation was possible via more scripts.

I have been able to send keystrokes to the object (with current focus) within my pub (by leaving the filename empty) but I wasn't aware that you could send keystrokes to its Window Title; what does that do ? Does it work while in Design mode ?

For the freeware question .....  and this time I give a little back.

Point taken and accepted.

Leave the hat on your head! ...
Skilled, Giving and Modest to boost ! Just because you didn't slave over the kitchen ... err Delphi/C++ counter making all the ingredients from scratch, doesn't make the end product any less appreciated ; I believe it was Einstein who (when asked a question by a smart-ass reporter) responded that it wasn't as important for him to know all the answers as he had a sizable library and able librarians (before computers !) who were skilled in obtaining any information he required. I applaud your skill in piecing together these freely available code modules and assembling them into a useful utility ; kind of like a software version of Leggo Toys. And thanks to the many makers of (Leggo) bricks as well !

Pete:

I think that gk51 has the same hesitation about using plug-ins that are offered without charge in commercial applications as I do. Everyone that uses "free" software of any kind should also have the same hesitations if they put it in commercial work of their own. I would feel better about paying something for it, but that would obligate Hans-Peter in some ways which he does not want for very understandable reasons.

My primary reason for enquiring was one of ethics/fair-play ; I did not want to wrap Hans-Peter's free plug-in with some pretty clothes and sell it for a fee. Like some companies do with Open Source Software !

Secondly, in an effort to limit the size of any end-product I offered, I was probing the possibility of a custom sliced-&-diced subset plug-in, for which I would expect to be charged.

Your comments on this subject (elsewhere on this forum) are also valid ; but there is inherent risk in all obtained software ; paying $20 for a widget may entitle you to demand a little more than of a free widget, but the internet is full of low cost widgets that have been abandoned by their developers (perhaps leaving customers high & dry) ; even products costing thousands of dollars have been abandoned when their developer went under or got bought out by the competition only for the captive client list. One reason corporations are sticking with MS Office against cheaper (WordPerfect) and free (StarOffice) alternatives. Like you, I would not use freeware in a commercial product (except maybe if I had source code as well).
User avatar
Gaev
 
Posts: 3736
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Utility Plugin

Postby HPW » Mon Nov 04, 2002 2:22 pm

GK51,

No I meant not paper copy, ALT+PRINT send the active main window (and childs) to the clipboard. So I thought this cought be used for this. Saving from clipboard can be done from hpwImage. I also did not test if hpwSendkeys could be used for this. It was created for sending keystrokes to window titles, because neobook sendkey only send to exe-names.

From what plugin do you want a custom sliced-&-diced subset plug-in. Because the plugin are not very big, does this make sense? Only plugins without binding the VCL gives smaller plugins.
HPW
 

Utility Plugin

Postby Gaev » Tue Nov 05, 2002 7:53 am

Hans-Peter:

ALT+PRINT send the active main window (and childs) to the clipboard. So I thought this cought be used for this. Saving from clipboard can be done from hpwImage. I also did not test if hpwSendkeys could be used for this.

Thanks for the ALT+PRINT tip ; this plus your function to copy from clipboard is a solution ; however, I was looking for a solution (may be impossible) that
(i) only captured the content area of the window (minus titlebar, controls etc. and (in design mode) minus the NeoBook stuff as well).
(ii) a scripted solution that did not require user to press (unusual) key combinations ; the PRINT key is often in different places on different computers and is also marked differently ; neither NeoBook's nor your Sendkey functions enable this key to be specified ; also, since this is like a universal short-cut for Windows, I am not sure which object should have focus before sending this keystroke.

BTW, I noticed in the Help file that NeoBook has a variable called ...
[WinHandle] The handle of the publication’s windows (reserved for future use by third party plug-ins)
... I wonder if this is of any use to you in carving out a solution.


From what plugin do you want a custom sliced-&-diced subset plug-in. Because the plugin are not very big, does this make sense? Only plugins without binding the VCL gives smaller plugins.

I agree that your plug-in is quite small; but once you start adding the NeoBook base, my scripts, other plug-ins, the total size might discourage downloads by users without high-speed access ; so, it was just a thought that if not-used functions could be excluded from custom-crafted sliced-&-diced plug-ins, it might help ; of course, such an exercise would not be undertaken unless the overall size could be reduced noticeably.
User avatar
Gaev
 
Posts: 3736
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Utility Plugin

Postby HPW » Tue Nov 05, 2002 1:43 pm

Just released hpwUtility 1.10.

Action: hpwScreenShot get Bitmap of the Screen or part of it to file or clipboard.

There is a bug in neobook with [WindowLeft] and [WindowLeft], because it is different between design and runtime. In design time it is relativ to the inner neobook main window. At runtime it is relativ to the screen.
HPW
 

Utility Plugin

Postby Gaev » Fri Nov 08, 2002 2:36 pm

Hans-Peter:

Thank you for providing this function ; as just posted here ...

http://www.neosoftware.com/cgi-bin/ikon ... &topic=601

... I will be able to work around this Design/Run time difference .

BTW, do you have a criteria for determining if a function goes in hpwUtility vs. hpwImage ?

Thanks again.
User avatar
Gaev
 
Posts: 3736
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Utility Plugin

Postby Ronnie » Fri Nov 08, 2002 8:39 pm

Hans,

Use NeoBook's nbHandle as the handle for GetDC and not the Desktop. This way... you should be able to capture a NeoBook screen (without the title bar) and not some white space as if you capture from desktop...

I believe GK51 wants in your plugin is similar to the screen capture functions I have in rtFSM... where you can capture a dekstop screen.. a NeoBook screen.. or just a portion of anything on the screen, relative to desktop or the PUB.
Ronnie
 

Utility Plugin

Postby HPW » Sat Nov 09, 2002 12:17 am

Oops, Ronnie I think GK51 and me have not looked in rtFSM before wishing/making it. So again, I do not want to reinvent the wheel. Of course I wanted it to be generic and so it should not be restricted to nb screen.

GK51, No I have no exact criteria, only a quick thought about, to which group of functions it matches better.

The problem is, that it would be nice to have each function in a seperate tiny plugin, where the developer can choose what is binded at runtime. The only drawback is only, that in each plugin the copy of the delphi-VisualComponentLibrary is binded, which gets then multipel times (redundant)  in the final EXE.

The other option would be one big plugin with all functions, but then every user binds something he did not need in the final EXE.

So would you like to have a function in a other plugin?
HPW
 

Utility Plugin

Postby Gaev » Sat Nov 09, 2002 7:54 am

Double Oops from me ; should have checked Ronnie's (Mega) List first !

Hans-Peter: Yes, there are no easy solutions when it comes to plug-in design/integration ; my earlier reference to "slice-&-dice" was to address this kind of issues ; thank you for the offer, but for now, I will use your functions from their respective locations ; when it comes time to distributing my efforts, I will either purchase a custom (sliced-&-diced) plug-in from you, or use Ronnie's if I end up needing some of his other (very useful) functions within the same plug-in. Thank you again for your assistance todate.
User avatar
Gaev
 
Posts: 3736
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Utility Plugin

Postby HPW » Sat Nov 09, 2002 7:56 am

Just released hpwUtility 1.11.

Action: hpwGetObjRect get the rectangle of a window or object from the handle.

Maybe a bit redundant with nb's GetObjInfo, but it works on handle's and so get every window object even outside from nb. And it get all 4 edge with one call.
HPW
 

Utility Plugin

Postby HPW » Sun Nov 10, 2002 12:56 am

Just released hpwUtility 1.12.

Action: hpwGetNbWinHandle get the handle of the neobook main process.

When comparing the handle with [WinHandle] you get the designmode status when unequal. Also sreenshot of the whole session possible.

[NbWinHandle] should be set by neobook in the future.


(Edited by HPW at 2:56 am on Nov. 10, 2002)
HPW
 

PreviousNext

Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 1 guest