Jump to content
Sign in to follow this  

Scripting a Ctrl+F5 keypress

Recommended Posts


This is my first post here. I hope someone can help a beginner!

I am trying to develop a script which will automatically process a file in the ePublisher application. i can load the file but cannot get the program to recognise the Ctrl+F5 keypress which starts the processing. ePublisher uses Ctrl+F5 as shortcut for its 'Generate All' action, which is exposed as a menu command and as a toolbar icon.

I have tried using 'AutoIt Window Info' to identify the toolbar button concerned but no joy.

Here's what I've got:

#cs ----------------------------------------------------------------------------

AutoIt Version:

Author: David Green

Script Function:

Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

Run("C:\Program Files\WebWorks\ePublisher Express\WebWorks.ePublisherExpress.exe") ;starts ePublisher application

WinWaitActive("WebWorks ePublisher Express") ;wait until app opens

Send("^o") ;File->Open

Send("D:\HTML\PROJECT2\PROJECT2.wrp") ;enter file to open

Send("!o") ;Alt+O to click Open button

Send("{esc}") ;dismiss a dialog which sometimes appears

Send("^{F5}") ;Ctrl+F5 to process the file I've opened

Any ideas why the last line isn't working would be much appreciated.

D Green

Share this post

Link to post
Share on other sites

Try adding Sleep(1000) between each Send() command unless you are very pressed for time. I find that fixes a vast majority of timing issues. Sometimes I wait 5 seconds or more, even.

Share this post

Link to post
Share on other sites

Thankyou both for your help!

I added Sleep(1000) before the last line and my Ctrl+F5 seems to be working.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this