Reputation:
I want to simulate a button click on a website (not mine, www.gfainfo.com).
They want the page appearing on a laptop at their tradeshow and don't want to have to click the "Replay Video" button over and over again.
When the "start" button is clicked the video displays the first time. I want the video to display in a loop. Any suggestions? At the end of the video a "Replay Video" button is displayed. I need to click it with a "macro" or something so it will play over and over.
They can click the "start" button to get the video started, they just need the "Replay Video" button clicked over and over.
Upvotes: 1
Views: 7394
Reputation: 7720
I use to do it with any program that automate Mouse clicks such as Automouse clicker. The problem is that your computer has to stay turned on, and the web page has to be visible, you can't do other things.
Does anybody know an easy way to do it from a free public web site (forum o web provider) with a script or something like that? Maybe writing the clicks as a macro. I would like to simulate clicks at random periods from 9am to 9pm.
Upvotes: 0
Reputation: 199215
Ok, this is a programming Question/Answer site, so I'm going to provide a programming answer,
Since there is no target programming language I'm going to use java of course.
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class ClickAgain {
public static void main( String [] args ) throws AWTException {
final Robot robot = new Robot();
int x = Integer.parseInt( args[0] );
int y = Integer.parseInt( args[1] );
long duration = Long.parseLong( args[2] );
Timer timer = new Timer();
timer.schedule( new TimerTask(){
public void run(){
robot.mouseMove( x, y );
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
}
}, 5000, duration );
}
}
What that program does, is click every N seconds ( milliseconds actually ) in the same place.
You just invoke it as:
java ClickAgain 300 400 60000
To click on coordinates 300,400 of the screen and click again every minute ( 1 min = 60000 milliseconds )
Upvotes: 2
Reputation: 36494
The easiest approach I can think of to specifically simulate repeated clicking is an AutoIt v3 script something like this:
While True
MouseClick("primary", 160, 120) ; button, x, y
Sleep(60000) ; milliseconds
WEnd
The script will conveniently create a tray icon from which you can pause or kill it.
That said, downloading the video and playing it stand-alone is better, and obtaining a higher quality video specifically for signage use is probably way better.
Upvotes: 0
Reputation: 6329
If you really want to display it in a browser, rather than using a media player as Simon suggests, you could take a look at iMacros, which does browser scripting for a number of platforms including Firefox and IE. I haven't tried it with Flash animations, though.
Upvotes: 0
Reputation: 145950
Right click this to download the video (this link is your actual fitness video) and then use Adobe Media Player to play it.
I used Fiddler to capture the URL for the video.
But if you're actually working for these people you really ought to be able to get a higher quality video from them directly.
Automatically clicking 'replay' is a terrible idea... I'd suggest two screens. One playing the video and the other showing the website.
Upvotes: 2