Activex, vbs, javascript, perl and more from PB very soon!

Everything else that doesn't fall into one of the other PB categories.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Activex, vbs, javascript, perl and more from PB very soon!

Post by ricardo »

Hi,

Im almost finishing a package that let me call Activex, vbs, javascript, perl and more from PB from an easy dll.
Im thinking on release it as shareware for PureBasic users (very cheap for community members!).

With this dll we could be able to:

-Manage almost any ActiveX (COM) even receiving events from it (it was veeeery hard to find a workaround to achieve it!!). Per example i have a n example that let me run IExplorer and access the webpage and change/modify/spy it on run time.

-Use it an as runtime parser that has complete access to languages as vbs, javascript, perlscript, etc.

I want to know if someone is interested on this.

However i will finish it since im very interested even if no one else is interested.

The idea that COM are bloated is not the correct approach to this matter in IMHO. The situation is:

WIN 32 API let us manage a lot of things in a very nice way but windows has a lot of major features that relies in another layer called COM. If we want to have access to all this stuff (the explorer and internet explorer per example) the ONLY way is using COM. At least dosent hurts to have this possibilitie.

Now, since im not a ASM genious like Danilo, El_Choni, etc. I approach the problem by the other side, accessing to COM from itself using a small C++ dll and then giving PureBasic (in fact any language that support calling a dll) the door open to go inside the COM world.

Give me 3 or 4 days and i will be here with some running examples.
ARGENTINA WORLD CHAMPION
Justin
Addict
Addict
Posts: 948
Joined: Sat Apr 26, 2003 2:49 pm

Post by Justin »

Very interesting , looking forward to it.
Cor
Enthusiast
Enthusiast
Posts: 124
Joined: Fri Apr 25, 2003 7:52 pm
Location: Netherlands
Contact:

Post by Cor »

@Ricardo,

Thanks for your efforts

Can't wait to test it
Cor de Visser

Registered PureBasic user

Author of ChordPlanet
Made with PureBasic
http://www.chordplanet.com
Mr Skunk
User
User
Posts: 12
Joined: Wed May 07, 2003 3:40 pm

Post by Mr Skunk »

Have to see how your examples work, but this might be very interesting.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Mr Skunk wrote:Have to see how your examples work, but this might be very interesting.
Just letting you really run vbs, javascript, etc. directly from PB then you can manage all COM and (a very important thing) receive the events of the COM objects.

The syntaxis is the one of the language that you use for it, in javascript you call the COM in this way:

Code: Select all

var ExcelSheet;
// Call ActiveXObject: Excel
ExcelApp = new ActiveXObject("Excel.Application");
ExcelSheet = new ActiveXObject("Excel.Sheet");
// Make Excel visible through the Application object.
ExcelSheet.Application.Visible = true;
// Place some text in the first cell of the sheet.
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
// Save the sheet.
ExcelSheet.SaveAs("C:\\TEST.XLS");
// Close Excel with the Quit method on the Application object.
ExcelSheet.Application.Quit();
Very easy way to control EXCEL !!

Now it can be done within PB just with a dll of something line 100 kbs.

Usin vbs you can control IExplorer with some code like this one:

Code: Select all

Set myIE = WScript.CreateObject("InternetExplorer.Application")
myIE.Navigate "www.google.com"
myIE.Width = 600
myIE.Height = 600
myIE.Left = 150
myIE.Top = 0
myIE.Visible = True
And if you want to change the size of the font once the page is loaded (and dont need to reload with this method) jus add this sub and call it when you want:

Code: Select all

Sub ChangeFontSize(Num)
myIE.ExecWB OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,clng(Num)
End Sub
Of course you can extend all this stuff as you want. You can use Perl too...
The idea is to be able to call somelanguages in runtime calling just some small dll 'wrapper'.

Why does we need the dll? Because if you write the code to a flie and try to run it...

1.- You can get a Antivirus prompt
2.- You wont be able to cll different functions/sub when you want it. By runing a .vbs file you need to run ALL the script at onve. With the dll you can load the script and trigger every sub/function (even passign/receiving parameters) in runtime.
3.- You wont be able to catch COM events on your PB application. In this case you can control Excel or IExplorer or any other COM and get the events, per example you can know if using IExplorer when the page is downloaded or the percent of a download, etc.

*I know that maybe some guys don't want to use vbs, jvs, perl, etc. But for the moment we don't have any other choice to call COM in realtime in a easy way.
The dll will be just ~100/150 kbs. And of course, its not an obligation to use it :wink:
ARGENTINA WORLD CHAMPION
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Activex, vbs, javascript, perl and more from PB very soo

Post by PB »

> I want to know if someone is interested on this.

I'm definitely interested in ActiveX support because I own a couple of OCX
files from my Visual Basic days, and would love to use them with PureBasic.
^OO^
User
User
Posts: 27
Joined: Mon Apr 28, 2003 5:58 am
Location: United Kingdom
Contact:

Post by ^OO^ »

I want to know if someone is interested on this.
I am intensely interested in the possibility of reading output from com objects like WSH parser output!

More strength to you, Friend :D
HPW
User
User
Posts: 26
Joined: Tue Apr 29, 2003 6:48 pm
Location: Germany

Post by HPW »

Yes, very interesting , I am also interested!
Hans-Peter
kns
User
User
Posts: 54
Joined: Sat Apr 26, 2003 2:06 am

Post by kns »

Sounds good. From your example it would be painless to rewrite my python URL tracker (see viewtopic.php?t=5939).

kns
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

I'm intrested too!
Tranquil
Mike
New User
New User
Posts: 9
Joined: Fri May 16, 2003 11:32 am
Location: Germany

Post by Mike »

I'm also interested (special for control of excel)
cheers
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Mike wrote:I'm also interested (special for control of excel)
cheers
Im almost done...
ARGENTINA WORLD CHAMPION
Max.
Enthusiast
Enthusiast
Posts: 225
Joined: Fri Apr 25, 2003 8:39 pm

Post by Max. »

ricardo wrote: Im almost done...
Excellent. :D
Bernard
User
User
Posts: 23
Joined: Sun Apr 27, 2003 4:49 pm
Location: France

Post by Bernard »

I'm intrested too
Bernard
Post Reply