Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually the API calls have not been so horrendous. I have been able
to replace all internal Excel VBA commands for this project without too much trouble. The last bit is this get text part. I don't need to get the text in a text file I want to put the text in a variable at runtime in my excel vba code directly. I already use the clipboard with success. I have tested SendMessage, GetDlgItemText, GetWindowText, SetWindowText and have been able to set the text and retrieve it with these functions but I am not able to get the text from the screen. When I use wm_SetText or SetWindowText it changes the Title of the child window. I am then able to get that text. From what I have read elsewhere in the Groups this indicates that the window is accepting these commands. The text window may have hidden windows which I understand slightly after searching the Groups/Web but I am not sure how to proceed to learn more about this. I used EnumWindows to retrieve the following results of my open session. Note the Title "Hello, world!" which was placed there by one of my SetText tests. I also included info that I retreived from a GUIi Spy Tool. I feel like I am close but frustrated because I am unclear as to how to proceed. LEV. CLASSNAME HANDLE PARENT TITLE 0 PCSWS:Main:00400000 590504 0 AS400 1 msctls_statusbar32 656032 590504 1 PCSWS:Oia:00400000 656034 590504 1 PCSWS:Hsb:00400000 656036 590504 1 PCSWS:Pres:00400000 525212 590504 Hello, world! 1 UCMBrkr 524982 590504 2 UCMenu 525008 524982 3 ScrollBar 2360176 525008 4 Hide 787228 2360176 5 MenuToolBar 524984 787228 6 ToolbarWindow32 590526 524984 This is the window information that contains text I wish to get! {displayed: 1,width: 960,x: 36,y: 119,abs_x: 32,class: object,MSW_class: "PCSWS:Pres:00400000",abs_y: 115,maximizable: 0,focused: 0,height: 577,active: 0,MSW_id: 2,handle: 525212,minimizable: 0,nchildren: 0,label: "Hello, world!",enabled: 1,TOOLKIT_class: "PCSWS:Pres:00400000"} I have also come across information regarding HLLAPI Declare Function hllapi& Lib "PCSHLL32.DLL" (Func&, ByVal DataString$, Length&, RetC&) This API is provided by IBM and requires an install I believe. Any suggestions would be greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to GetText() from TextBox under Visual C++ application? | Excel Worksheet Functions | |||
Client Access to iSeries Automation | Excel Programming | |||
Excel, client access & AS400 | Excel Programming | |||
Download from Client Access to Excel | Excel Discussion (Misc queries) | |||
Clipboard.GetText | Excel Programming |