Jump to content

Second button not getting pressed


Recommended Posts

I'm writing a script to call up Screamer Radio, press the "PLAY" button, then 20 seconds later, press the "REC" button..Not as elegant as I'd like, but I haven't figured out how to take advantage of the changing "Status Bar Text" change when a signal is received, so I just threw in a substantial pause. Problem is, the second MouseClick doesn't execute. Here is my code. How do I cause the second MouseClick to become active? - Mike

; This program will open the Screamer recorder and press REC.

;The MS scheduler will turn this script on/off.

run ("c:\progra~1\scream~1\screamer.exe")

WinWaitActive("Screamer Radio v0.3.8"); pauses the script until the window appears.

MouseClick ("left",474,196,2)

; need something here to cause a pause - what changes on window?

; the Status Bar Text shows status, can I key on that?

Sleep (20000)

MouseClick ( "left",445,188,2)

Link to comment
Share on other sites

that should work.. maby the program you are clicking on dont get the fast mouse move/click, try do a slowe mousemoce then click..just to look if it works

Sleep (20000)

MouseClick("left",445,188,2,10)

seen other programs act that way

Link to comment
Share on other sites

Just to provide some follow-up: I started by using coordinates to direct the cursor, but the window moved, so that idea went out the window(pun intended). Then I noticed if I pressed ENTER, the PLAY button was depressed, and it I hit TAB three times, I could get to REC. For some reason that didn't workwhen I coded it.

Then I noticed the underscore under Play and Record, so I tried alt-P and alt-R. Worked fine after I sent the correct controls.

Now, can anyone suggest a way to use the change in the Status Bar Text to act as a signal to begin recording? That would be a bit more sophisticated than simply waiting 10 seconds and hoping I've made the connection in that interval - Mike

Link to comment
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
 Share

  • Recently Browsing   0 members

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