Questions tagged [simulate]

For issues relating to simulating a system, action, function, or behavior.

Simulation is an attempt to model a real-life or hypothetical situation so that it can be studied to see how the system works. By changing variables in the simulation, predictions may be made about the behaviour of the system. It is a tool to virtually investigate the behaviour of the system under study.

451 questions
5
votes
3 answers

How to simulate mouse clicks and keypresses in F#

I'm doing a program that's supposed to move the mouse around and press automatically at places where I specify in the code. Right now i've managed to move the cursor by using this line: Cursor.Position <- System.Drawing.Point(x,y) What I haven't…
Alex
  • 51
  • 2
5
votes
2 answers

simulate backspace key with java.awt.Robot

There seems to be an issue simulating the backspace key with java.awt.Robot. This thread seems to confirm this but it does not propose a solution. This works: Robot rob = new Robot(); rob.keyPress(KeyEvent.VK_A); rob.keyRelease(KeyEvent.VK_A); This…
Tyler
  • 4,679
  • 12
  • 41
  • 60
5
votes
2 answers

simulate nagios notifications

My normal method of testing the notification and escalation chain is to simulate a failure by causing one, for example blocking a port. But this is thoroughly unsatisfying. I don't want down time recorded in nagios where there was none. I also…
user3373692
  • 51
  • 1
  • 1
  • 2
5
votes
0 answers

How to simulate low level keyboard/mouse event on osx

I have tried to use Applescript to simulate a keyboard event tell application "System Events" keystroke "This is a test" and use Quartz event service CGEventRef e = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)52,…
5
votes
1 answer

VB Simulate a key press

In my program, I want to simulate the pressing of the MediaPlayPause key. Just as a note, I do not want to check to see if the key is down or pressed, I want to press the key via my program. I have tried SendKeys.Send but the special keys are…
jgetrost
  • 193
  • 4
  • 12
5
votes
1 answer

How to simulate distortion with opencv based on real data, generated by camera calibration (C++)?

I am looking for a way to create (barrel) distortion with OpenCV in C++ that is based on real camera data, that are generated by camera calibration. So my target is to simulate real lens distortion with opencv. Therefor I calibrated a camera with…
user2428883
5
votes
1 answer

How to create event with filled property dataTransfer?

I have local html file with javascript code. I should cover drag & drop by tests. It uses only IE. In javascript code event "drop" is caught and content of dataTransfer (e.dataTransfer.getData("Text")) is analysed. In test I simulate event with next…
Alexey
  • 61
  • 3
5
votes
1 answer

Help: Maximum number of clients reached - Segmentation fault

I want to simulate many key press events. I found a solution by using XTestFakeKeyEvent, but when I simulate more than 210 times my program raises a "Maximum number of clients reached" segmentation fault. I don't known how to solve this problem. My…
wearetherock
  • 3,721
  • 8
  • 36
  • 47
5
votes
4 answers

Javascript to simulate "right click on image -> save image as"

OK, there has been an extact duplicate question as this one, but it's been 2 years away, and there's only one answer which was not really a solution. So, I have an image (thumbnail), right below it there are 2 buttons: View and Download. View will…
user1643156
  • 4,407
  • 10
  • 36
  • 59
5
votes
1 answer

What is called after "onConfigurationChanged()"?

I am a young developer on Android and I can't find a solution to my problem. I want to simulate an event just after the configuration changes and for that I have tried to use onConfigurationChanged() but with this method, my event is applied just…
5
votes
1 answer

Simulate click into a hidden window

I've got a C# problem, I am able to simulate a click to the current window, but I would like to do it if the window is minimized or hidden. Any ideas?
tlovidiu
  • 53
  • 1
  • 3
4
votes
4 answers

How to simulate JavaScript in a client C# Applications

I'm writing a web crawler (web spider) that crawl all links in a website. My application is a Win32 App, written in C# with .Net framework 3.5. Now I'm using HttpWebRequest an HttpWebResponse to communicate with the web server. I also built my own…
user112899
4
votes
1 answer

Simulate mouse clicks at a certain position on inactive window in Java?

Anyways, I'm building a bot to run in the background. This bot requires me to click. Of course, I want to be able to do other things while the bot is running. So I was wondering if it was possible for me to simulate a mouse click at a certain…
iAndr0idOs
  • 257
  • 4
  • 14
4
votes
1 answer

Sending mouse or touch events to VirtualBox VM from host shell?

I know how to send keyboard events (keystrokes) to a VirtualBox Virtual Machine, using VBoxManage controlvm keyboardputscancode Is there a similar way to simulate mouse or touch events? For example, move the mouse to a…
RocketNuts
  • 9,958
  • 11
  • 47
  • 88
4
votes
4 answers

Sending a Mouse Click to a Specific Position without Moving the Mouse

I'm looking to send a mouse click to a specific position on a screen without affecting the mouse cursor's location. I've scoured and have tried everything under the sun with mouse_event (which is supposed to do this) mouse_event(MOUSEEVENTF_LEFTDOWN…
byanity
  • 203
  • 1
  • 4
  • 14