06-27-2018, 09:00 AM
I am wondering whether it is possible to call from a Fortran program a QM function, and if yes what is the procedure to pass/get parameters. Any advice is mostly welcome.
Fortran callable QM functions
|
06-27-2018, 09:00 AM
I am wondering whether it is possible to call from a Fortran program a QM function, and if yes what is the procedure to pass/get parameters. Any advice is mostly welcome.
06-27-2018, 11:57 AM
Call directly - no. The fastest way is to find the main QM window and send message. More info in QM Help topic "Command line parameters".
01-22-2019, 06:48 PM
I am sorry, I cannot well understand, from which application should I send the message (for example SendMessage(qmw WM_SETTEXT 3 "M ''tempf02''")? Could you please give an example? Many thanks in advance.
01-22-2019, 08:05 PM
From the Fortran program. Or from any.
I cannot give a Fortran example. SendMessage is a Windows API function, and probably you can call it from Fortran.
01-24-2019, 08:29 AM
Solution finally given : Subroutine ses_qmi.for. Example to call qm item temf03 in fortran program rs.for. Any comments are welcome.
01-30-2019, 08:30 PM
@ssimop
Thank you for sharing your experience. I don't know much about Fortran programming language. Can you help me how to implement it in VB programming language? Thanks in advance
C# example
//using System.Runtime.InteropServices; VB.NET example 'Imports System.Runtime.InteropServices
thank you very much
@[b]Gintaras[/b] I want to know, in QM3, whether to support the function module to generate dll files? provide calls to other programming languages The above code is VB.net. How is it different from the VB Script code? Can you provide the code corresponding of VB Script? thanks
01-31-2019, 09:36 AM
Dll in QM3 - yes.
VBScript does not support calling Windows dll functions. It supports only COM dlls. COM dll : http://www.quickmacros.com/forum/showthr...9#pid32229 VBScript example using function VbsExec in QM: Macro Macro82 str vbs= Function Fun5
Thank you for your reminder, Macro vbs call qm1 Can run successfully
but I have two questions Question 1: After Generated exe file is executed, a QmSendMessage.tlb file will be generated in the dll directory. How to disable it? Question 2: I need to run QM first, how to automatically run QM when calling function ______________________________________________________________________________ How written the code in the Macro vbs call qm2 (??? s1 ???) Question 1: The code of the QM function in the VBS code, how to run it using QM when calling Question 2: If the code of the QM function is in a txt file, how to use QM to run it when called Macro vbs call qm1 RegisterNetComComponent "$qm$\QmSendMessage.dll" 2|4 Function Func1 Macro vbs call qm2
I created a run.bat file on the desktop with the following contents. In addition, the desktop also has a Macro2.qml file.
I double-click running run.bat can't support running macros, It will open the macro view dialog how should I write code? The following image is a description of the QM help file: _______________________________________________________________________ start "C:\Program Files (x86)\Quick Macros 2\qmcl.exe" "C:\Users\Administrator\Desktop\Macro2.qml" pause
02-01-2019, 09:39 AM
I tried a lot of methods, only calling the functions inside QM can succeed.
I hope someone can provide a way to run the external .qml file directly, thank you very much.
02-03-2019, 06:35 PM
Cannot run .qml files or functions from external .qml files.
For other questions, need some changes in the C# code, and compile it with Visual Studio.
02-03-2019, 11:54 PM
Thank you for your reminder
I have a question, how do I get the variable i2 from the QM to the VBS code? Macro Macro2 RegisterNetComComponent "$qm$\QmSendMessage.dll" 2|4 Function Fun5
02-04-2019, 06:50 AM
Write it in a file or registry, and let the VBS code read it from there.
How to send a message to QM from autohotkey, I use the following code, no effect
MyVar:="M ''Macro2''" SendMessage, 0xC, 0, &MyVar, QM_Editor I don't understand how to send a message to QM in AHK. The above code is wrong. Can you guide me? thanks The following is the documentation https://www.autohotkey.com/docs/commands...essage.htm A string may be sent via wParam or lParam by specifying the address of a variable. The following example uses the address operator (&) to do this: SendMessage, 0xC, 0, &MyVar, ClassNN, WinTitle ; 0XC is WM_SETTEXT
I am using the following code, can't succeed, why?
AHK Format: SendMessage, Msg , wParam, lParam, Control, WinTitle, WinText, ExcludeTitle, ExcludeText, Timeout code: 1. SendMessage, 0xC , 1, "M ''Macro2''", ahk_class QM_Editor, Quick Macros - Main - [Macro2] 2. MyVar:="M ''Macro2''" SendMessage, 0xC , 1, &MyVar, ahk_class QM_Editor, Quick Macros - Main - [Macro2]
04-22-2019, 08:31 AM
Has been successfully called, using dll
q := ComObjCreate("QmSendMessage.QMSM") q.Run("Q ^ M ^Func2^") |
« Next Oldest | Next Newest »
|