Jump to content
Sign in to follow this  
Metti

sendkey on sound

Recommended Posts

Metti

hi Pros

is it possible to send a Key when a prog (world of warcraft) plays a sound?

cant find something that does that...

plz help

metti

Share this post


Link to post
Share on other sites
Metti

sure Blizzard's Warden is present but used that script for long time...

i use that to find splash of bobber while fishing:

Func Find_Splash($float_x, $float_y)

$sear_left = $float_x - 32

$sear_righ = $sear_left + 52

$sear_top = $float_y - 32

$sear_bott = $sear_top + 64

While TimerDiff($star_time) < $wait_time

$pos = PixelSearch($sear_left, $sear_top, $sear_righ, $sear_bott, $spla_colo, $tolerance, $sear_step)

If @error Then

SetError(0)

Else

MouseClick("right", $pos[0], $pos[1], 1, 2)

Sleep(5500)

ExitLoop

EndIf

Sleep(100)

WEnd

Cast_Pole()

EndFunc

that is not bad he detects every 4th time when a fish is on bobber.

If it's possible to detect the use of certain soundfile I could send a rightklick after playing sound

Share this post


Link to post
Share on other sites
Metti

maybe somebody else can help me :P

Share this post


Link to post
Share on other sites
Metti

I've tryed that befor....

same answer like helpfile

you find play sound onclick sound onkey...

but no key onsound func -.-

Share this post


Link to post
Share on other sites
JustinReno

There is not a function to do this. So stop "pushing" it.

Share this post


Link to post
Share on other sites
Metti

so just sry there is no func so I don'T need to push

and i push so often I want you not my mommy!

Share this post


Link to post
Share on other sites
crislivinitup

Yes there is a way. It is a matter of hooking api's though and that gets into reverse engineering. You'd need a program like ollydbg and then you'd need to find the right api to set a breakpoint on - the api that calls sounds to play. See games use windows apis to perform certain basic, low leveling programming tasks, like reading or writing to memory, moving the mouse, etc. etc. There are a different many bunch of .dll's that contain these functions. For example kernel32.dll contains the functions for reading and writing memory and user32.dll contains the functions for moving the mouse. What you should do is do some research to find the right api to hook that the game uses to run sounds. I'm assuming it'll use a windows api. And from there set a breakpoint on it with ollydbg then trace it back to where the call was made in the program. From that call to the api function you could change it to a call to your program and then return to it's called function of playing the sound. To do this you would need good knowledge of ASM and working with api's and good knowledge of debuggers. In my opinion, your best course of action is to think around this... think about what circumstances make that sounds play and try to find something else more concrete you can work this.... Don't get me wrong, it's possible, but it's a much harder method then there should be.

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  

×