473,898 Members | 4,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

get text of SysListView32(L VS_OWNERDATA+LV S_OWN ERDRAWFIXED) items from other applications

2 New Member
Hello. I apologize in advance if I created the topic in the wrong place, because I think that my task is directly or indirectly related to WinApi. I will describe the task:
I am programming an imitation of manual work in applications for working on financial markets (Metatrader 4 and 5). I use AutoIt for this. I need to read the text of the SysListView32 elements. I wrote the following code for this purpose.
Expand|Select|Wrap|Line Numbers
  1. #include <WinAPI.au3>
  2. #include <Memory.au3>
  3. #include <ListViewConstants.au3>
  4. Local $pid=        ; here i write id of needed process
  5. Local $hwnd=      ; here i write handle of SysListView32 
  6. Local $maxtext=    ;here i write max number of chars 
  7. Local $hprocess=_WinAPI_OpenProcess($PROCESS_ALL_ACCESS,False,$pid)
  8. Local $plv=_MemVirtualAllocEx($hprocess,Null,$maxtext+60,$MEM_COMMIT,$PAGE_READWRITE)
  9. Local $rectext=DllStructCreate("char ["&$maxtext&"]")
  10. Local $lv=DllStructCreate($tagLVITEM)
  11. $lv.Mask=$LVIF_TEXT
  12. $lv.Item=0
  13. $lv.SubItem=0
  14. $lv.Text=$plv+60
  15. $lv.TextMax=$maxtext
  16. _WinAPI_WriteProcessMemory($hprocess,$plv,DllStructGetPtr($lv),60,Null)
  17. _SendMessageA($hwnd,$LVM_GETITEMA,0,$plv)
  18. _WinAPI_ReadProcessMemory($hprocess,$lv.Text,DllStructGetPtr($rectext),$maxtext,Null)
  19. _MemVirtualFreeEx($hprocess,$plv,0,$MEM_RELEASE)
  20. ConsoleWrite(DllStructGetData($rectext,1))
The problem is that the above code only gets the text if the SysListView32 has either LVS_OWNERDATA or LVS_OWNERDRAWFI XED style. But this code is not getting text of SysListView32 elements with combined LVS_OWNERDATA and LVS_OWNERDRAWFI XED styles.
Well here's the question:
How to get item text from SysListView32 from another application with both LVS_OWNERDATA and LVS_OWNERDRAWFI XED styles at the same time?
I would like to get some direction of action or example code (doesn't matter on AutoIt). Thank you.
Apr 3 '23 #1
0 1331

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2866
by: Michael Williams | last post by:
Hi, I am trying to create a VB6 application which can act as a 'connection broker' for other applications being run on the same machine. Essentially, the broker app will setup a number of connections to our legacy system. Another system will call a Java object, which will communicate with a COM object, which I want then to query the running broker app to be given a specific object reference to a free connection, which it can then use.
0
1263
by: Eric | last post by:
Hi, I wonder if it is possible to listen to events from other applications that you have not written yourself and that you don't know anything about? Notepad or any other windows application for instance? I would like to listen to all kinds of events (mouse clicks, text written in the application, images shown etc). In general I want to know as much as possible of what's happening in an application, that I haven't written, but...
2
1286
by: Justin | last post by:
How do you invoke other applications with or without command line arguments? -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
1
1654
by: Admin East | last post by:
I want to create an application which monitor other applications status. It is same as Windows Task Manager's Application Tab. Status would be RUNNING or NOT RESPONDING. Thanks.
4
1220
by: Usarian Skiff | last post by:
Is it possible to enter data into other applications' textboxes and datagrids? I want to automate our production control software (like a macro). It's written in VB6, and I have access to the form names. I'm programming in VB.net (1.1).
0
912
by: C R | last post by:
I would like to write a program that sits in the background and captures double-click events (or function keys) in other applications, then does something with them or not depending on which application they happen in. Specifically, if they occur in a web browser, I'd like to grab the page source in the browser and present it in a different format in my own application (then exit back to the browser when the user is done). Any...
4
1039
by: Jerry Spence1 | last post by:
I have an application with an icon that sits in the system tray. When I double click it the form is maximised, but I want it to sit at the front of all the other applications that are open. How do I do this? I suspect an API but maybe in VB2005 there's another way. -Jerry
0
4219
MMcCarthy
by: MMcCarthy | last post by:
This is a module that exports information from a Query or a Table to comma separated values in a text format, or using other symbol! It is very helpful for sharing information between the applications! The function that does this work is: create_file_from_SQL_SEP(SQL, File_name, sep) As Integer Parameters: SQL: You can pass a SQL expression, name of a table, or name of a Query that you want to export in csv File_name: You specify the...
5
1361
by: Marco Trapanese | last post by:
Hi! I wrote a VB.NET application that serializes my classes on a file. Each file contains a different instance of the class (i.e. different values of the properties). If I deserialize files from that application all works fine. Now, I need to deserialize them from my other applications. If I try I get this error:
0
1222
by: Laszo Pasztor | last post by:
Hello! Is it possible to make actions when working with other applications. For example: I start my application. It runs in the background with no user interface. But when I for example drag a window (to move it, a notepad, calculator, whatever) then a message box appears: "you dragged this window: notepad" or any other actions. Is it possible to do this? Could you give me a sample code for this?
0
9994
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10956
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8036
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7191
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5882
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6079
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4298
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3309
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.