![]() |
|
#1
|
|||
|
|||
|
hello, i starting a build a docker and i need know how call a function placed in gsm file from my html file... for example...
javascript function into MyDockerfile.html function OpenFile(){ Download('MyURLFILEHere'); } Then in my MyDockerFile.gsm i have this code Declare Function shellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hWnd As Long, _ ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Declare Function URLDownloadToFile _ Lib "urlmon" _ Alias "URLDownloadToFileA" ( _ ByVal pCaller As Long, _ ByVal szURL As String, _ ByVal szFileName As String, _ ByVal dwReserved As Long, _ ByVal lpfnCB As Long) As Long Sub Download (Url As String) Call URLDownloadToFile(0, Url, "C:\imagen.gif", 0, 0) End Sub Is this possible? Thanks |
|
#2
|
||||
|
||||
|
You need to call your Macro with the RunMacro following this format:
Function RunMacro(ModuleName As String, MacroName As String, Parameter() As Variant) As Variant So your code might look like this: Code:
function OpenFile() {
window.external.Application.InitializeVBA();
window.external.Application.GMSManager.RunMacro("NameofGMS", "MyModule.Download", strMyUrl);
Hope that helps, -Shelby |
|
#3
|
|||
|
|||
|
Thanks for your reply
|
![]() |
| Tags |
| dockers, gsm, javascript, vba |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Corel8Script: How to call external program | kombat | CorelDRAW CS | 1 | 14-04-2008 07:00 |
| How I can call my function in DLL from VBA code? | geHucKa | CorelDRAW/Corel DESIGNER VBA | 6 | 23-06-2005 15:02 |
| call Color Manager from VBA ? | wOxxOm | CorelDRAW/Corel DESIGNER VBA | 1 | 30-04-2005 13:33 |
| Macro Call from VFP | BobReed | CorelDRAW/Corel DESIGNER VBA | 4 | 20-02-2005 20:25 |
| How do you successful call the DeInterlace sub? | micahk | Corel Photo-Paint VBA | 2 | 03-05-2004 20:34 |