|
STOIK Imaging -
makers of photo and video editing software Interface: Automation |
|
| Scripting
and macro language Open Macros window (menu View-Windows) and make sure that Recording option is On. Now whatever you do with image will be scripted. Script can be stored and edited. Scripting provides multiple possibilities:
|
|
| External automation Picture Man 4.2 can be used as an automation server for external scripting and batch processing. You can call Picture Man commands from any other application supporting automation, e.g. from Visual Basic Script or Java Script. To use Picture Man automation server you should first initiate "Pman40.Application". Methods of this object correspond to commands of internal scripting language. |
![]() Image created in Picture Man 4.2 using script below. Copy script to Macros window of Picture Man 4.2 and click F5 to run. Note that each line should be ended with <CR> |
| Writing external scripts To use Picture Man automation server you should first initiate "Pman40.Application". Methods of this object correspond to commands of internal scripting language. Scripting commands have quite complex syntax to write external script from scratch, but if you use internal script from Macros window than converting it to VB or Java script is easy: See original internal script of Picture Man 4.2 and how it is to be converted to other languages |
Picture Man 4.2
Internal script example CreateNewImage("Flaming
text",500,300,600,600,{0,0,0}); |
| Visual Basic Script example | Set X =
WScript.CreateObject("Pman40.Application") X.CreateNewImage "Flaming text", 500, 300, 600, 600, 0, 0, 0 X.SetEdgeDegree 0 X.SetEdgeType 0 X.AddText 30,30, 200, 90, 0, 0, 0, 1, 0, 0, 0, 7, 2, 2, 0, "Times New Roman", " hot", 14 etc. |
| JavaScript example | var X =
WScript.CreateObject ("Pman40.Application"); X.CreateNewImage("Flaming text",500,300,600,600,0,0,0); X.SetEdgeDegree(0); X.SetEdgeType(0); X.AddText(30,30, 200, 90, 0, 0, 0, 1, 0, 0, 0, 7, 2, 2, 0, "Times New Roman", " hot", 14) etc. |
| Visual C++ MFC Example | To create Picture Man
Automation object, use COleDispatchDriver class: COleDispatchDriver driver; if (!driver.CreateDispatch (_T(“Pman40.Application”))) // error processing… To invoke any Picture Man command, use COleDispatchDriver methods: OLECHAR *szMember = L"OpenFile"; DISPID dispid; HRESULT hr = driver.m_lpDispatch->GetIDsOfNames (IID_NULL, &szMember, 1, LOCALE_USER_DEFAULT, &dispid); if (FAILED (hr)) // error processing… BOOL ret; BYTE BASED_CODE parms[] = VTS_BSTR; driver.InvokeHelper (dispid, DISPATCH_METHOD, VT_BOOL, &ret, parms, lpPathName); if (ret) // error processing… |
![]()