And Just Because....

Started by JTaylor, March 21, 2025, 12:34:49 PM

Previous topic - Next topic

JTaylor

Finally figured out how to create a COM capable Extender (at least I think that would be the right terminology).  The options in the attached serve no purpose other than to demonstrate that it works.  So, for any interested parties...

http://www.jtdata.com/anonymous/wbOmniCOM.dll

Jim

td

You're welcome. Release 2022D made it possible for extenders to handle COM automation objects without some of the unpleasant side effects that existed before that release. There have also been several other undocumented COM related  improvements to the WIL dll side of the extender interface.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

Excellent.  Thanks.

Not sure what I might do with it yet.  I was just thrilled it actually worked.  Incorporating into XML seems pointless as that is already easily available and you already produced a JSON Extender so updating mine would just seem like I was trying to one up you and, plus, I try to never duplicate stuff you have already done.  Maybe my CSV Extender would be a good option???  Guess I should really get back to my vi editor I am writing.  This was a side path caused by Stan's XML questions.  Decided to clean up my XML Extender and then got to wondering if I could make it COM accessible.

Also, did you happen to test the Display Scaling function I posted, that you claimed wouldn't work?  Curious if you proved me wrong or not.

Thanks again.


Jim

td

I didn't claim it didn't work. That was not my point. 
[edit] To answer your question directly, I did not test your display scaling function. Had no reason to. [/edit]
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

Okay.  I had to wonder though if you scared people off.  Maybe not.   Oh well, it's there in case someone needs it.

Jim

kdmoyers

Quote from: JTaylor on March 21, 2025, 12:34:49 PMSo, for any interested parties...
The little example program runs fine for me, in 32bit mode (but not 64bit)
-Kirby
The mind is everything; What you think, you become.

JTaylor

Thanks for the feedback.  It is only 32-bit.   One of these days I am going to figure out the 64-bit thing.  I know I won't be able to convert all of them but maybe some.

I am curious if you tried the Display Scaling function on multiple monitors.  At least I think you were the one asking???

Thanks again.

Jim

spl

Example worked for me as well. Not sure what can really be instantiated.

AddExtender(DirScript():"wbOmniCOM.dll")
obj = xmObjectCreate("excel.application")  wouldn't make any sense as WB already has obj = CreateObject("Excel.Application")
Stan - formerly stanl [ex-Pundit]

JTaylor

It would, of course, only be for stuff I would write.   It wouldn't pertain to other applications.  As you noted, some of those are already COM accessible.  Anything that one has to keep passing an obj/value back in to every function is a good candidate.  Things like SQLite, HTML, JSON etc.   I probably won't do SQLite or JSON since there are now official extenders.   Was thinking about my CSV Extender.  May even just put it on the "I now know how to do that shelf" and move on to other things :-)

If nothing else, maybe it will inspire others to take a look at the SDK and see what they can do with it.

Thanks for taking the time to take a look. 

Jim

td

We have an in-house extender or two that implements the IDispatch interface and registers the extender as a COM Automation server. I won't go into the reasons for it, but it allows "dot" notational access to extender functionality instead of extender function calls. It also takes advantage of WinBatch's existing COM object functionality, thus avoiding the reinvention of the wheel.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kdmoyers

Quote from: JTaylor on March 26, 2025, 04:23:40 PMAt least I think you were the one asking???

I was not OP. I just just tried some of the posted code because I had a some interest in scales and monitors.  I run multi monitors, but *not* at different scales, so it was partly academic to me.  Then I got too busy with other things and had to move on...  hope to get back to it when I can. 
The mind is everything; What you think, you become.

JTaylor

Okay.   
Thanks.

Jim

Quote from: kdmoyers on March 27, 2025, 09:02:51 AMI was not OP. I just just tried some of the posted code because I had a some interest in scales and monitors.  I run multi monitors, but *not* at different scales, so it was partly academic to me.  Then I got too busy with other things and had to move on...  hope to get back to it when I can. 

spl

Quote from: JTaylor on March 27, 2025, 06:49:46 AMIt would, of course, only be for stuff I would write.   It wouldn't pertain to other applications.  As you noted, some of those are already COM accessible.
Thanks for taking the time to take a look. 

Jim

I may be off-base here, but basically we seem to be discussing 'dot sourcing' Extenders. You believe that capability can be injected into what you have developed (32-bit) only, and Tony has hinted it might be possible for other Extenders, but a lot of effort and that could mean a complete overhaul. Unless an improvement in speed, might be a hard sell on those comfortable with the way things are. Again, maybe off-base.
Stan - formerly stanl [ex-Pundit]

JTaylor

The 32-bit limit is simply my ignorance limitation. Some would be hard, if not impossible, due to the libraries used but not entirely certain on that front as, again, ignorance.  Some would just be overcoming my ignorance on what is the necessary pieces, if any, other than compiling as 64-bit.  Tony sent me a list years ago but I didn't know enought to make use of it and not sure if I could find it now or not.

I fully agree on the comfort thing.  All of us tend to like things as they are and are loathe to change if something is working.

I also agree on the effort side of things.  It would be a lot of work.  If I was doing it solely because I thought it would be heavily used, I probably wouldn't since the Dialog Extender is the only one I have ever really gotten any consistent feedback on, indicating it is being used, was only from 2-3 people.

As I've mentioned occasionally, it just fits my three main goals here of helping others, learning new things and making WinBatch even more awesome than it is now.

Hard to say how much it will further #1 but it definitely helps accomplish #2 and #3.  I have learned a lot and people now know there are new things that they, most likely, didn't know were possible with WinBatch.  Hopefully this will inspire others.

Jim

Quote from: spl on March 28, 2025, 06:11:37 AMI may be off-base here, but basically we seem to be discussing 'dot sourcing' Extenders. You believe that capability can be injected into what you have developed (32-bit) only, and Tony has hinted it might be possible for other Extenders, but a lot of effort and that could mean a complete overhaul. Unless an improvement in speed, might be a hard sell on those comfortable with the way things are. Again, maybe off-base.

spl

Quote from: JTaylor on March 28, 2025, 07:43:05 AMAs I've mentioned occasionally, it just fits my three main goals here of helping others, learning new things and making WinBatch even more awesome than it is now.

Couldn't agree more. While not on the Extender side, I have pushed the CLR and integrating PS for similar reasons, but have remarked that the board is not the collaborative forum it used to be. [Sigh]!
Stan - formerly stanl [ex-Pundit]