OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Thread Tools Search this Thread Display Modes
Old 05-03-2010, 11:18
Posts: n/a
Default call a gsm function trougth javascript in docker

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(){


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
Reply With Quote
Old 05-03-2010, 11:39
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Docker calling GMS

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:

function OpenFile() {
    window.external.Application.GMSManager.RunMacro("NameofGMS", "MyModule.Download", strMyUrl);
Hendrik has an excellent example here: Custom add-ons and dockers in CorelDRAW

Hope that helps,

Reply With Quote
Old 08-03-2010, 10:15
Posts: n/a
Default Thanks

Thanks for your reply
Reply With Quote

dockers, gsm, javascript, vba

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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

All times are GMT -5. The time now is 08:31.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com