![]() |
|
[.NET] Reading the result from calculator app? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Reading the result from calculator app? (/showthread.php?tid=5802051) |
Reading the result from calculator app? - ToXiiC - Feb 19, 2018 I was checking this out... https://docs.microsoft.com/en-us/dotnet/visual-basic/developing-apps/programming/computer-resources/how-to-start-an-application-and-send-it-keystrokes That part is simple enough but how do you go about obtaining the result and placing it in a variable? RE: Reading the result from calculator app? - Stixx - Feb 19, 2018 If you're writing code, I'm just wondering why you'd want to open the calc app and send it keys when you can just: int x = 5 * 3; RE: Reading the result from calculator app? - ToXiiC - Feb 19, 2018 (Feb 19, 2018 08:54 PM)Stixx Wrote: If you're writing code, I'm just wondering why you'd want to open the calc app and send it keys when you can just: I'm trying to learn for other purposes my friend but this made me giggle a bit. 😝 RE: Reading the result from calculator app? - gigajew - Feb 20, 2018 Find the child window that holds the value using the windows api Here’s an example of sending text to notepad, it’s updating the text but this has the code to find the child window https://stackoverflow.com/questions/523405/how-to-send-text-to-notepad-in-c-win32 Use spy++ or a similar tool to find out what your child window is called RE: Reading the result from calculator app? - 0xDEAD10CC - Feb 21, 2018 (Feb 20, 2018 09:40 AM)gigajew Wrote: Find the child window that holds the value using the windows api Yeah this isn't going to work with Windows 10 calculator though as it is a Windows store app.. RE: Reading the result from calculator app? - ✔ Soufian ✔ - Feb 21, 2018 Kinda funny how that page shows you how to send data, but not receive data back lol RE: Reading the result from calculator app? - 0xDEAD10CC - Feb 21, 2018 (Feb 21, 2018 06:09 PM)✔ Soufian ✔ Wrote: Kinda funny how that page shows you how to send data, but not receive data back lol It's really the same principle. Although what people don't get is that this isn't going to work with Windows store apps. RE: Reading the result from calculator app? - gigajew - Feb 21, 2018 What DEADLOCK said. Another option is to find the pointer to the address of the value in calculator. Just make sure check version compability or implement pattern scanning I’ve got to ask - which app is it really that you’re trying to read a value from? That could make all the difference |