Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can you please point me into the right direction?
I want to edit other application textbox or click, programmatically. For example, in a web sites, I can edit elements and invoke button clicks.
I have no idea how to do this, but I can move mouse and use keyboard run time is it possible to edit other application's textbox ?
I have C++, VB.NET, and C# knowledge - any suggestions or sample code?
Thanks.
There is no easy way to do this, but it is possible. You will dig through the Win32 Api to get what you need. There will be a lot code needed for this, too much to put in sample here.
You will need to start with finding the window you want. This could be accomplished with FindWindowEx. When you have the window, you can enumerate the child controls using EnumChildWindows.
When you finally get the handle to the control you need, you can hook up to the windows message subsystem and send a WM_SETTEXT message using the SendMessage function. There is a wrapper function available: SetWindowText but the documentation clearly states that it will NOT work for windows of other applications.
Be prepared for a lot of digging around in the Win Api. You will probably run into issues regarding security in newer windows OS's. When you get it to run the functionality will be highly depending on the OS, UAC settings etc.
I remember doing this once, 15 years ago in Windows 98, even then it was problematic! So good luck!
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am new to GUI development and Embedded programming using DSP Processors.
I would like to build a GUI of 4 channel oscilloscope using Visual C# and Windows Forms. The signals will be communicated from DSP processor using serial port RS232.
What kind of Windows Forms controls help in building such a GUI? and how to start with the work?
If there any other useful tools to be used along with Visual studio C#?
Any useful links explaining the basics of development may be helpful.
What kind of Windows forms controls help in building such a GUI?
There is a nice tool un Windows Forms called Chart. You can draw graphs of different kind with it.
Here is a Tutorial
Here is a Video that shows how to use it.
How to start with the work?
You should start and play with this control.
Learn how to add values.
Learn how to remove values.
Learn how to bind values.
Learn how to handle the axes and the ranges to be displayed.
If there any other useful tools to be used along with Visual studio C#?Any useful links explaining the basics of development may be helpful.
here you find all different chart types that can be displayed.
and here how to use them.
This answer is partly copied from a previous one of mine.
I would suggest to search also for "online/real time display of data with chart control" or "moving chart".
This link might be usefull. It asks for almost the same as you.
Here you can find some samples
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am working on a windows application and I want to insert some data to the controls in another windows application from my application. I think it's possible using spy++ or AutoIt.
But on searching I found only code like clicking a button in another application from one application.
What I need is,
I have 3 textboxes in WindowsApp_1 and I need to fill these from the value sending from WindowsApp_2. Could you please give me a sample code to achieve this ?
If you are intending to work on your application, I suggest working on it, instead of abusing stackoverflow
Asking for sample code in the way like you did, suggests, that you wont be able to do what you want yourself, even if samplecode is provided.
I shall give some hints, though:
Read the documentation of AutoIt
Begin with learning how to identify a Window from your App 1
# for instance:
WinWaitActive("Untitled - Notepad")
Elaborate on how to get the desired text from App 1
Paste the ill gotten text with
ControlSetText($app2, "", "Edit1", "This is some text")
https://www.autoitscript.com/autoit3/docs/intro/windowsbasic.htm
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I would like to create a application walkthrough for users to reveal functionality and give a short introduction to the software like this: http://www.dtelepathy.com/blog/design/ux-flows-how-when-to-design-app-walkthrough
This is often used for smartphone apps or browser applications. I've never seen this for Windows applications before, but this should be possible or not?
The application is implemented in C# and WinForms and uses a lot of controls from Infragistics.
It isn't possible to find anything about that on google or SO because "walkthrough" could be anything... :/ Maybe I'm looking for the wrong keywords?
Yes, this is definitely possible in a Windows App. We've done something like this before. I see your frustration regarding lack of documentation on the web. There isn't a lot out there specifically for windows desktop. Take what you can learn from the tutorial that you linked and translate that over. What we did a lot of was used semi-transparent panels containing the necessary content and then just lay those over everything. This way, you can get the 'greyed out' look for the main content of the app but control user's access.
Good luck!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I want to know how could I write a program in C# that opens a browser and go to google.com (I did that easily)
I want to write code to automate move mouse to the input text field, click the mouse and then enter some text. move mouse to search button and hit it.
I know I should deal with iAccessible interface but I did not find any useful source.
Any help will be appreciated.
You can also try Winium, an automation library similar to Selenium through which you can do automated testing and instruct it to perform testing even on remote machines. We have used it at our organization in combination with Selenium to perform automated testing of Windows and Web modules. It is free to use and open source. Here are the links.
https://github.com/2gis/Winium and https://github.com/2gis/Winium.Desktop
Look at the Windows Automation API: http://msdn.microsoft.com/en-us/library/ms726294(VS.85).aspx
and the Test API: testapi.codeplex.com which has some related packages you'll likely need.
Sorry, can't post more than one link yet, but add the usual bits to get to the TestAPI site on codeplex.
You can try Visual Studio Test Suite it lets you record how you interact with your application and then lets you run it automaticly.
It's a powerful product.
If you're looking to understand UI Automation, I've just started that myself. I wrote this project so that other people could use it or understand themselves too:
http://code.google.com/p/wipflash/
Mostly it's based around the Patterns and Properties. You can see how I've used the Patterns here:
http://code.google.com/p/wipflash/source/browse/#hg/WiPFlash/Framework/Patterns
Hope it helps.
(Edit: I also answered a similar question here: WPF, Project White and Infragistics - you're probably looking for the ValuePattern).
There is a commercial solution that would do the job: Telerik WebUI Test Studio. It also supports Silverlight apps.
http://www.telerik.com/automated-testing-tools.aspx
Here is one positive review:
http://fczaja.blogspot.com/2011/01/ui-tests-automation-for-silverlight.html
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
http://www.xtremevbtalk.com/showthread.php?p=1221565#post1221565
This thread shows some discussion about what I'm trying to do. I can't use Powershell for this purpose and I'm not an advanced student, so my level is beginning intermediate. Understand concepts, but need lots of help and basic ideas :-)
Can i use a simple control in c# to let me take a internet window I currently have open for our IP phone system, take a string from another IE, or to keep it simple just a text string that I have, and have it submit the form, and fill out the required selections in the IE ip phone (ie, click on radio button, click submit, paste number, and click dial). All of our extremely repetitive actions daily are based on the same routine submissions on the IP phone (and it is TEDIOUS). This would greatly help our company, and we have no developers besides me (student that works on this stuff on the side). I'd really like to streamline some of our repetitive actions.
I'd like to know about the SIMPLEST way to possibly automate. Would VBA be better for this, can c# actually itself be used to control IE, set cursor position, submit requests, etc? I'm using this with mostly IE applications that we use at work, that I don't have source code to, so I'm trying to figure out how to do it as simply as possibly.
Beginner friendly reponses please. Dumb it down a little for someone who is still learning the foundations!
I have been investigating this some time ago and found a good tool for this: WatiN. It is normally used for testing web applications, but I think you can also find it helpful. It has an easy to learn API:
public void SearchForWatiNOnGoogle()
{
using (IE ie = new IE("http://www.google.com"))
{
ie.TextField(Find.ByName("q")).TypeText("WatiN");
ie.Button(Find.ByName("btnG")).Click();
}
}
look at this post. On the way even Google's WebDriver