Restored from previous forum. Originally posted by Justin.
Can PB create an exe and be controled by another language like Delphi,VBScript.., via OLE?
for example in vbs it's easy to access ole objects:
Set WshShell = CreateObject("WScript.Shell")
Return = WshShell.Run("c:\someprogram.ext", 1, true)
this just uses the shell object to run a program.
so, it could be possible to create a pb exe with its own objects and methods to be controled in that easy way by another language with ole support?
Edited by - Justin on 14 August 2002 00:45:17
Question for Fred or some expert
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by ricardo.
Hi,
Im not sure but i thik that at te moment you cant make a COM object from your PB app.
It will be really great when it can be done, just imagine the possibilities !!!
Nw you can control external activex or COM object FROM PureBasic, iv never done and i will try soon.
Hi,
Im not sure but i thik that at te moment you cant make a COM object from your PB app.
It will be really great when it can be done, just imagine the possibilities !!!
Nw you can control external activex or COM object FROM PureBasic, iv never done and i will try soon.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
> Can PB create an exe and be controled by another language like Delphi,
> VBScript.., via OLE?
Not via OLE, but PureBasic can create DLLs, of which both Delphi/VB can use.
> Return = WshShell.Run("c:\someprogram.ext", 1, true)
For the record, PureBasic has a RunProgram command to run external apps.
PB - Registered PureBasic Coder
> Can PB create an exe and be controled by another language like Delphi,
> VBScript.., via OLE?
Not via OLE, but PureBasic can create DLLs, of which both Delphi/VB can use.
> Return = WshShell.Run("c:\someprogram.ext", 1, true)
For the record, PureBasic has a RunProgram command to run external apps.
PB - Registered PureBasic Coder
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Justin.
Thank you for your answers.
PB, the run example was just an arbitrary one.
I need to use OLE and not dlls, because i have to use VBS or Javascript (wich not support dlls).
What i want to do is add an entry to the MSIE context menu when i right click on a link(i know how to do it, it's well explained at msdn), when i click on the menu item i want to send the link to my pb program and do something with it.
This is a common feature in d/l managers, Flashget launches a .htm file with a vbs script that sends the link to the main program via OLE, i can't think of another way because the only action you can assign to the menu item is launch a vbs or js script.
The run example will not work because launches a new program every time, any suggestions?
Thank you for your answers.
PB, the run example was just an arbitrary one.
I need to use OLE and not dlls, because i have to use VBS or Javascript (wich not support dlls).
What i want to do is add an entry to the MSIE context menu when i right click on a link(i know how to do it, it's well explained at msdn), when i click on the menu item i want to send the link to my pb program and do something with it.
This is a common feature in d/l managers, Flashget launches a .htm file with a vbs script that sends the link to the main program via OLE, i can't think of another way because the only action you can assign to the menu item is launch a vbs or js script.
The run example will not work because launches a new program every time, any suggestions?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Justin.
Just thought that there is an easy way to do what i wanted, monitor the clipboard to see if contains an http link, so when the user chooses 'copy shortcut' form the context menu the pb program will catch the link, although it will consume more cpu time.
The ability to create com objects for pb would be cool anyways.
Just thought that there is an easy way to do what i wanted, monitor the clipboard to see if contains an http link, so when the user chooses 'copy shortcut' form the context menu the pb program will catch the link, although it will consume more cpu time.
The ability to create com objects for pb would be cool anyways.