simulate

Program to simulate vehicles at an intersection using queues

HI I got this coursework question to solve. This is the question: Design a program to simulate vehicles at an intersection. Assume that there is one lane going in each of four directions, with stoplights facing each direction. Vary the arrival time of vehicles randomly in each direction and set up a regular frequency of the light cha...

Simulate Mouse move/click/keyPress in an application that is not active

Hello guys, I know how to simulate mouse and keyboard events, but they act as if the user did them, so they will affect the window that is active. What I need is to simulate one of those inputs, but in a Window that is not active. I'm not saying that it is minimized, imagine for example, you have msPaint, and notepad. Notepad is in fr...

Simulating a locked/hung application

I have an application that interacts with another application using SendMessage (among other things). Everything works fine until the other application hangs (either because it has actually frozen or it is doing a long, blocking call). I would like to simulate an application hanging using a C# WinForms application. Is there any way to st...

How to simulate JavaScript in a client C# Applications

Hi Guys. 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 Http Parser that can parse anything I want. I found all link like "href", "src", "...

[C++] Simulate holding down a key

Im using: keybd_event(0x41, 0, 0, 0); 0x41 is a 'a'. But that just prints one 'a' to the screen. I need it to hold down the key. And when i call keybd_event(0x41, 0, KEYEVENTF_KEYUP, 0); it must release the key. Is that possible? ...

Simulate form submit with VB.NET

I wonder if I can simulate the action of the button in this website by VB.NET code ? http://www2.xonefm.com/hot10/index_in.aspx ...

Is there a way to simulate Windows input with C++?

I'm wondering if its possible to make a program in C++ that can "press" keys, or make the computer think certain keys have been pressed, and do things like make a program that "plays" games, or automatically enter some long and obscure button sequence that no one could remember. (I can't think of any right now, but savegame passwords mi...

Network tools that simulate slow network connection

I would like to visually evaluate web pages response time for several Internet connections types (DSL, Cable, T1, dial-up etc.) while my browser and web server are on the same LAN or even on the same machine. Are there any simple network tools or browser plug-ins that slow down network bandwidth to simulate different real-world connectio...

Simulating a click for NSCollectionView

In an attempt to create drag and drop between two NSCollectionViews in the same app i've made the view that holds the collection views responsible for all the mouse clicks. It then checks what the mouse actually hits, etc. One problem I'm having though, is trying to get the NSCollectionView to handle single clicks properly (i.e. if the s...

Flex: Simulate key press

I'm creating a virtual keyboard for a touchscreen Flex app and i'm trying to simulate a key press by dispatching a KeyboardEvent. I've written a handler function to listen for the event and act accordingly. So far so good... but it's starting to get complicated as i have to manage the focused textInputs (easy), the cursor position in tho...

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 code here: #include <X11/Xlib.h> #include <X11/keysym.h> #include <X11/extensions/XTest....

Simulate mouse select with Javascript?

Hello, I would like to select text on the page by simulating a left mouse button down and drag it to a specified x,y location (in pixels) Can this be done with JavaScript? Thank you. ...

R: How do I best simulate an arbitrary univariate random variate using its probability function?

R: What's the best way to simulate an arbitrary univariate random variate if only its probability/density function is available? ...

Simulating a mouse button click in Windows

Hi everyone, I'm writing Remote Desktop clone in C++ using QT. So far I'm able to move the mouse cursor around fine. QT has a nice setPos function for that. However, I'm a bit lost as to what API/Library to use for simulating mouse button clicks. One method I'm aware of is to send the WM_(event) to a window using the window's HWND. How...

Keypress To Simulate A Button Click in C#

Ok, so I'm in the process of making a Tic-Tac-Toe game to help me learn C#. I'm attempting to add a bit of functionality to it, so I want people to be able to use the NumPad on a computer to simulate clicking the buttons. Here is what I have but when I use the NumPad the buttons don't click. Can any of you see a reason as to why? ...

How to simulate fisheye lens effect by openCV?

I am looking for ways to create fisheye lens effect, looked at documentations for openCV, it looks like it contains Camera Calibration functions for radial distortions like fisheye. Is it possible to simulate fisheye distortion by openCV? If it is possible to do it by openCV, comparing to openGL, which one will generate better results?...

Simulated pagination of linked file across multiple divs (for display; NOT FOR PRINTING)

Hey everyone, I think I have a pretty unique and challenging issue here... I should also preface this by noting that I'm quite inexperienced, and probably shouldn't even be considered a coding novice. I'm primarily a designer, not a programmer, and my knowledge is limited to basic html and css. As soon as I finish with this project I p...

Cocos2d and chipmunk how to simulate depth?

Hello, I am developing a game that intends to toss an object but instead of having it being tossed horizontally I would like to simulate it being thrown along the imaginary z axis that is simulate depth in my game. Something like the nintendo duck hunt game. Can someone point me in the right direction to implement this?. My first idea w...

Can the sendinput API simulate a keyboard key being held down during some time?

My app will need to simulate a key being held down during some time. I don't know how many time. Can I use the sendinput API for this? ...

Simulate low speed connection on local network

Hi, Sometimes I want to manually test my web applications (either desktop applications calling web services or websites or RIA) to see how they behave with low speed internet connection (56 kbps for example). Is it possible to do it through network by simulating lower speed that the real one? If yes, is it also possible to simulate low ...