Activex, vbs, javascript, perl and more from PB very soon!
Activex, vbs, javascript, perl and more from PB very soon!
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.
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
@Ricardo,
Thanks for your efforts
Can't wait to test it
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
Registered PureBasic user
Author of ChordPlanet
Made with PureBasic
http://www.chordplanet.com
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.Mr Skunk wrote:Have to see how your examples work, but this might be very interesting.
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();
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
Code: Select all
Sub ChangeFontSize(Num)
myIE.ExecWB OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER,clng(Num)
End Sub
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

ARGENTINA WORLD CHAMPION
Re: Activex, vbs, javascript, perl and more from PB very soo
> 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.
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.
Sounds good. From your example it would be painless to rewrite my python URL tracker (see viewtopic.php?t=5939).
kns
kns