Jump to content

Recommended Posts

Posted

I am stuck and was wondering if anyone could help me out. Right now I am trying to have two programs interact where the trigger would be the playing of a wav file(which is where I am having trouble). How could I have the prog listen and wait for the wav file to be played to activate the autoit to then perform the functions i already have coded?

Posted

  fflaque said:

I am stuck and was wondering if anyone could help me out.  Right now I am trying to have two programs interact where the trigger would be the playing of a wav file(which is where I am having trouble).  How could I have the prog listen and wait for the wav file to be played to activate the autoit to then perform the functions i already have coded?

<{POST_SNAPBACK}>

You might use WinWaitActive()

The script is going to go on only when he'll see a window poped up with a specified name

Posted

  Lakesat said:

You might use WinWaitActive()

The script is going to go on only when he'll see a window poped up with a specified name

<{POST_SNAPBACK}>

k thanks, i'll try that and see if it works :ph34r:
Posted

  fflaque said:

k thanks, i'll try that and see if it works :ph34r:

<{POST_SNAPBACK}>

little problem, i just realized that when the wav file is played it is not opened separately in windows media but through the program i am using, is there a way to check if a file(like a wav file) is being accessed by a program.
Guest BlackDiablo110
Posted

Why don't u just use the Sleep () command? Just set it to sleep for like 10 seconds if your thing is really slow or whatever.

Posted

  BlackDiablo110 said:

Why don't u just use the Sleep () command? Just set it to sleep for like 10 seconds if your thing is really slow or whatever.

<{POST_SNAPBACK}>

sleep? the problem i am having is identifying if a wav file is being accessed or not.
Guest BlackDiablo110
Posted

Oh, sorry, please ignore me.

Posted

  Larry said:

try looping fileopen() on the file. if fileopen fails, perhaps you can assume the file is open, and playing...

While FileOpen("file.mp3") <> -1

  Sleep(5000)

Wend

if the mp3 is shorter than 5 seconds this may fail... this is only a theory... no idea if it is applicable.

LAr.

<{POST_SNAPBACK}>

Thanks Larry I'll try that and see if it works, hopefully it will.

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...