views:

588

answers:

4

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.

+2  A: 

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.

Simon_Weaver
Video quality comment reminded me of this: http://imgs.xkcd.com/comics/supported_features.png
Sneakyness
That worked great but the client wants the "text" as well as the video. Doing it in the browser isn't my first choice. I would like the webpage with the video to be displayed and played over and over. Sorry I didn't mention needing the text was well.
no prob. thats why i suggested two screens. or maybe print out a poster of the website? make sure what they think they want is what they really want. oh and good luck to whoever is going to have to sit through this 1 minute video about 1000 times for the duration of the show :-) i hope theyre not insisting on loud speakers too!
Simon_Weaver
A: 

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.

David Claridge
A: 

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.

Jeffrey Hantin
Nothing says professional like compression artifacts!
Sneakyness
A: 

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 )

OscarRyz
this wont work for different screen resolutions
Learner
That's why x and y are parameters and not hard coded. Anyway, this would be an start for a small application. I think Donald is looking in the wrong place ( this is not a programming question )
OscarRyz