Subject |
Author |
Date |
|
jayender S
|
Dec 26, 2005 - 5:16 AM
|
Hi, i need to get or set the value from a text box which is in the Dialog box through ActiveX scripting. how to do it ? is there any sample program which can solve my issue ? I saw the sample ActiveX scripting which is done in SDI, but i need it in Dialog based .. waiting for ur reply. thanks, Jayender
|
|
Technical Support
|
Dec 26, 2005 - 7:11 AM
|
The Prof-UIS Automation Pack provides a set of COM objects which wrap the functionality of Prof-UIS customizable menus and toolbars and make them programmable via scripts like in Microsoft Office applications. The customizable toolbars and menus are available in the frame window based applications only. Besides, toolbars which can be drag-and-dropped are also available inside frame windows only. So, you should code application which has the frame window as the main application’s window. But you can use the dialog window or form view window as the main view window. In any case ProfAuto manages only toolbars and menus. ProfAuto does not know anything about any dialogs in your application. So, you should create your own COM objects to allow scripts to access any of your input fields as well as it accesses Prof-UIS toolbars and menus via ProfAuto objects.
|
|
jayender S
|
Dec 26, 2005 - 8:39 AM
|
Is there any samples or examples where ActiveX scripting is done in the dialog based application ?Any website (url) or samples attached will be greatly appriciated. waiting for ur reply. thanks, Jayender.
|
|
Technical Support
|
Dec 27, 2005 - 6:13 AM
|
|
|
Jayender S
|
Dec 27, 2005 - 6:21 AM
|
Well....is the example u gave is for a dialog based application ? Ok .. i will give u more info about my needs. I got a dialog box which has got few CExtEdit box (Say 4) and i should assign values to the textbox through VB scripting as it does for changing the Menu names. Is it possible ? If u r still unclear with my question u can ask me. waiting for ur reply . thanks, jayender.
|
|
Technical Support
|
Dec 27, 2005 - 9:29 AM
|
This can be done by coding a COM object that implements some methods or properties which return text values of your edit fields. This COM object should be imported into the running script’s context as the variable with some unique name. For instance the ActiveScripts sample makes the variable called AutoWindow available to the script programs. This variable is the ExtAutoWindow object implemented in ProfAuto. So, you need to do the same to make script programs having a chance to retrieve any data of your application like text values from edit fields.
|
|
Jayender S
|
Dec 27, 2005 - 8:45 PM
|
Well.. is there any sample that is done using Prof UIS for Scripting in dialog based application as like menu or tool bar ? I am not too familiar with COM.If there any samples, that will be really handy.waiting for ur reply. thanks, jayender.
|
|
Technical Support
|
Dec 30, 2005 - 8:43 AM
|
We have no ready-to-use sample that demonstrates how to implement ActiveX scripting support in dialog-based applications. If you provide us with a detailed (as much as possible) description of your app, we will try to code such an application for you. This does not require any strong COM knowledge from you. Just provide us with more detailed description of the UI design. How exactly the main window should look like? Which controls and their layout? How the input events should be handled?
|
|
Jayender S
|
Dec 30, 2005 - 11:09 PM
|
Well.. First i need to have VB scripting facility in VC++ ( with Prof UIS ), so i got ActiveX scripting. now i need to assign a valuethrough Scripting to my Edit box which is there in the Dialog. .. and i have a global variable say CString m_Tech and i need to assign value to that m_Tect = "Technical Support" through scripting. (at run time). how to do it ? waiting for ur reply. thanks,
|
|
Technical Support
|
Jan 2, 2006 - 4:54 AM
|
Please download a sample we coded for you. It is the simplest possible Prof-UIS based customizable application that uses both ProfAuto and the Active Scripting engine. It allows the script to access two edit fields: editable input field and read-only output field. The VB script gets the text string from one field and puts it into another one plus changes the text in the first button in the menu bar. The CAppObject C++/ATL class implements the AppObject COM object with IAppObject dual interface. The instance of CAppObject C++/ATL class is a global variable called AppObject in the running VB script. The methods of the IAppObject interface are designed to let the VB script to access fields in the dialog form. So, this application covers all the questions you asked about the VB scripting with regard to Prof-UIS.
|