I have an winforms VB application that outputs a string of characters to a serial port and it goes through RS232 port to another computer and writes to a portal on the other computer -- I'm not sure if it writes one character at a time or the whole string. At any rate, there is a device between the 2 computers that emulates a keyboard input.
The character (or string or characters) is output wherever the cursor has focus on the other computer. I'm not sure whether I'm explaining this clearly, but the basic idea is to automate the typing of data into a web portal (it works very well).
However (to make a long story short), the goal is to eliminate the second computer, using extended dual screens. The application and the web portal would be open on the same computer (instead of 2) and output from the winforms application would be directed to the web portal and written where the focus is on the web portal.
The way that I imagine it should work is like this: a process would write text to a stream, but instead of redirecting the text to a file or the console, it would write it to wherever the cursor's focus is.
My question is what method could I use to do this? I've been looking into the ProcessStartInfo Class, but I'm not sure if I'm on the right track.
Any help would be sincerely appreciated.
Related
I am trying to create a VB.net program to help me fill the properties form in my Solidworks Model. My program uses pixel by pixel comparison to find out where should fill the information and then send keystroke to fill the properties form.
My program works in my home computer. However, it does not work in my company computer. I found out that my company computer does not run "SendKeys.Send". Is there anyway to get around it?
I had the same issue but I was trying on a school computer try to make a game. I would bother tying to get around it "That makes your program malware. – jmcilhinney"
Your company computer has security measures for a reason. Don't try to by pass them ever!
My application, written in VB.Net 4.5 and deployed using ClickOnce, gets information through parameters when it is opened via the link on a website. The application uses that information to modify data collected from hardware connected to a virtual serial port. The data is usually on the order of a 3-15 kilobytes of plain text. The data then needs to return to the page (in a text box), and the page submitted, at which point the application closes.
Previously, the page used a Java applet, but increased Java security has made upkeep very time consuming.
Is it possible for the application to send data back to the same web page, still open in the browser, and submit that page?
If not, what would the simplest way for the application to send its data to the webserver, knowing that it needs user credentials (and a few other pieces of data) to do so?
You can make a post to the webpage from your application. See the WebRequest object
I have an auto suggestion mechanism that works fairly nice for desktop version where we have a wireless or a wired internet connection. The worst response time is 320ms.
(Without using solr as of now, I use a storage system on the server that gives back the result).
I have users that belong to the group where you can have a slow internet connection also known as a 2G connection where the downspeed can be ~10Kbps-50Kbps.
I have seen that google provides Auto Suggestion to this speed as-well, my my system cannot.
I have tried these:
Make a txt and JSON file on the server and when the user does a keydown (1st) it fires ajax to bring the entire 2.2MB data inside a JS variable on client side and show suggestions.
Make a service that is called when the user types 2 characters, service reads the txt/JSON file for those 3 character occurence anywhere in the words and gives data into a JS variable.
Repeat the above step and store the result in localStorage, for a fresh 3 characters again the same process occurs and storage happens. The benefit is that the user in future gets a prompt suggestion but according to me browser storage is used very sensibly.
Anyone with suggestions how www.google.com and www.flipkart.com handles auto suggestions for slow internet connections on mobile (smartphones).
I want to send keys to other application with focusing on it with VB.NET. I want to be able to send a Keydown message and a KeyUp message. But without focusing on the application I want to send keys to.
The following example focuses on the application when it is sending the keys. I don't want that.
http://www.codeproject.com/Articles/18366/Sending-Keystrokes-to-another-Application-in-C
The reason for this is I want to be able to Login with 2 games/windows onto 1 server and play with both of them. I have macros keys so I can set them to run this code. which will for example move the character on the 2nd game window while I control the character on my 1st game window. Like send "W" to move the 2nd character forward.
Any help?
In a quick research (I bet you dit it as well), I haven't found it possible.
SendKey is a way to simulate inputs at OS level, and not application level.
A possible workaround
That said, one way you could accomplish that would be creating a Virtual Machine and then run your automation script on it, keeping the host OS free. I'm just affraid that depending of the resources required by the game your are running (3D renderization), the VM specs maybe won't fit.
(Since I hate answers as "you can't do that", I just found interesting to share this palliative)
Hi I've used the shockwave flash com object to embed my flash file. I have buttons you can click on within the flash movie. Is it possible to get flash to notify my winform app which button has been pressed. It's developed using actionscript3. I'm using the latest vb.Net.
You can either use FSCommand, or use ExternalInterface. The later is better, although it may be harder to understand at first because of the format it uses, although if you've already solved the CallFunction (or SendFunction?) method argument, it's the same.
There are documentation and a sample C# project in Adobe's site, but I don't know the exact URL.
EDIT: To catch FSCommand and ExternalInterface calls there are two events you can subscribe to.
Also, you could also use sockets (either binary or XML).
That's a very open question as there would be many ways to do this depending on how your website and winforms applications are setup.
My initial suggestion would be to have your flash movie call some client side javascript on the button clicks. The javascript could post to a .Net SOAP webservice for instance which logs the button interaction to an associated database. Then your winforms application could finally check the database for the presence of new button click records.
This is just one high level suggestion based on the very high level question asked. If there's more specific information available then this can be refined.
Brian.