During a development of some project we faced a need to input some 200~300 bytes of ASCII text (a string) from a Windows application (such as notepad) to a B&R controller which implements a VC4 visualization and is accessible on that Windows system via a VNC connection. Typing this much of text manually is not feasible. So, pasting a string from the clipboard is the only realistic possibility.
Could someone give me some clues or basic tips on how to implement this kind of idea? For example, is the Edit control and the Global Key Action Clipboard with mode Paste is the proper/best way to do this? Or is there another way?
I have studied the AS Help about the VC4 capabilities, but I couldn’t find a consistent guidance about this. I feel that it is not the most complicated issue to solve, yet I still could not find the relevant part of the VC4 technology to work with.
So, I would greatly appreciate if someone from the community could point me to some relevant details in the AS Help, B&R TM documents or elsewhere.
Thank you and Best Regards,
Alexander
PS. I do realize that the VC4 technology is not the latest & the greatest among B&R products, but I do not have a freedom of choice here. We need to stick with VC4 and VNC, upgrading to the mapp View 5.x or 6.x and web browser-based UI is not an option for us now.
While I’m not exactly sure how to implement what you’re aiming for, a basic workaround might be to use an AutoHotkey (AHK) script. You could create a script that can automatically type out a predefined string for you, so you wouldn’t have to enter it manually each time.
You would simply paste the desired string into the AHK script, and let it handle the typing. It might not be as fast as directly pasting the text into the Visualization, but it could still be a helpful alternative.
Thank you for a quick reply. What you are suggesting could be an acceptable workaround in certain cases.
But I would like to learn about the proper way to implement a Paste function using the VC4 and VNC.
Can someone/anyone please suggest some other idea to get me closer to the solution?
I don’t think this problem is the most difficult one compared to all those which have been discussed (and solved!) by the community here.
I really hope someone has a solution already and it is just this thread has been overlooked for some reason.
first I’ve to say, that I’m not a firmware / AR developer, so I only can share my personal experience and understanding of the topic.
Using VNC, both server and client must support the features + extensions that should be used, which is also depending on the servers and clients protocol version used.
I worked a lot with VC4 in past, and there wasn’t a possiblity to transfer clipboard data (I’ve never checked with actual versions, but I don’t think that this has changed).
And as I understood, the VNC server in Automation Runtime just supports mouse events and AT keyboard code transfer, but not clipboard/data transfer.
Therefore, if I’m right, there’s no way to implement this by your own, as the “hook” in the VNC server to receive the clipboard data (and processing it to the VC4 controls) is just not there.
So, the only theoretical possibility (I’ve never tried it) to transfer textual data is by emulating keyboard code events, like metioned by Patrick.
From my experience, typing much data is most often needed when creating / changing data like CNC programs, recipes or similar.
If this is also your usecase, maybe transferring the textual data as file (via FTPS or by accessing a CIFS share) and processing it by your own (for example reading the file content into a variable connected with a edit control in VC4) could also be an option.
I understand that this is not the answer how to realize it, but honestly spoken I don’t believe that a solution “using clipboad via VNC” exists.