Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python in QM
#1
Does Quick Macros have any kind of Python support/integration?
#2
Python can be embedded in QM like in C/C++. It is documented in ActivePython documentation.

Other way - active scripting. Easier. Copy QM function VbsExec and similar functions and edit for Python. Example:
Function PythonExec
Code:
Copy      Help
;/
function $code [flags] ;;flags: 0 text, 1 macro, 2 file, 4 skip first line in macro.

;Executes Python code.

;EXAMPLE
;str code=
;;python code
;;python code
;PythonExec code


#if EXE
#warning __ME_W2
#endif

MSScript.ScriptControl- _python
VbsInit2 _python "Python" code flags _s; err end _error

_python.ExecuteStatement(code); err end _error
if(_python.Error.Number) end VbsError(_python)

I tested with ActivePython 2.7: http://www.activestate.com/activepython/downloads
Initially did not work. Need to install Python for Windows Extensions (PyWin32) from sourceforge. Also may need to run C:\YourPythonVersion\Lib\site-packages\win32comext\axscript\client\pyscript.py.
#3
Hi Gintaras, are you using Python? Is it worth to learn?
#4
not using


Forum Jump:


Users browsing this thread: 2 Guest(s)