fflaque Posted September 11, 2004 Share Posted September 11, 2004 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? Link to comment Share on other sites More sharing options...
Lakesat Posted September 11, 2004 Share Posted September 11, 2004 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 Link to comment Share on other sites More sharing options...
fflaque Posted September 11, 2004 Author Share Posted September 11, 2004 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 Link to comment Share on other sites More sharing options...
fflaque Posted September 16, 2004 Author Share Posted September 16, 2004 k thanks, i'll try that and see if it works <{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. Link to comment Share on other sites More sharing options...
Guest BlackDiablo110 Posted September 16, 2004 Share Posted September 16, 2004 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. Link to comment Share on other sites More sharing options...
fflaque Posted September 16, 2004 Author Share Posted September 16, 2004 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. Link to comment Share on other sites More sharing options...
Guest BlackDiablo110 Posted September 16, 2004 Share Posted September 16, 2004 Oh, sorry, please ignore me. Link to comment Share on other sites More sharing options...
fflaque Posted September 16, 2004 Author Share Posted September 16, 2004 Oh, sorry, please ignore me. <{POST_SNAPBACK}>its ok Link to comment Share on other sites More sharing options...
fflaque Posted September 17, 2004 Author Share Posted September 17, 2004 bump Link to comment Share on other sites More sharing options...
fflaque Posted September 17, 2004 Author Share Posted September 17, 2004 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. Link to comment Share on other sites More sharing options...
fflaque Posted September 17, 2004 Author Share Posted September 17, 2004 tested... doesn't work Lar. <{POST_SNAPBACK}>darn....thanks anyways Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now