Jump to content

Recommended Posts

Posted

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: 3.3.6.1

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

Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...