piccaso Posted October 7, 2004 Share Posted October 7, 2004 I just played arount with DllCall ... func kernel32_Beep ($freq,$duration) ; Win95 ignores duration parameter ; freq : 37 -> 32767 [HZ] $r = dllcall("kernel32.dll","long","Beep","long",$freq,"long",$duration) if @error = 1 Then SetError(1) Return Else Return $r[0] EndIf EndFunc This function truly makes autoit powerfull (i mean dllcall not mine :"> ) if you miss something the api supports, you can just code it.... want to hear some funny noise? try this one for $i = 0 to 250 kernel32_Beep(Random(37,32767),1) Next CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
ezzetabi Posted October 7, 2004 Share Posted October 7, 2004 (edited) Or ever funnier, adding some silence and randomize duration even more: While 1 kernel32_Beep(Random(37,32767),Int(Random(1,6))) If Int(Random(0,60)) = 0 Then Sleep(Int(Random(10,1001))) If Int(Random(0,600)) = 0 Then ExitLoop Wend Edited October 7, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
Konan--M Posted October 9, 2004 Share Posted October 9, 2004 Do you have to do something special to do a dllcall, cause i'm getting an error: "unknown Funktion Name (dllcall)" Link to comment Share on other sites More sharing options...
piccaso Posted October 9, 2004 Author Share Posted October 9, 2004 use the latest unstable version of autoit CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Konan--M Posted October 10, 2004 Share Posted October 10, 2004 (edited) use the latest unstable version of autoit<{POST_SNAPBACK}>I got ver: AutoIt v. 3.0.102.0Do i need the AutoItX Beta, cause i think this is newest version and i still get the error ( from Syntax check..)ERROR: DllCall(): undefined function. $r = DllCall("kernel32.dll","long","Beep","long",$freq,"long",$duration) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ >Exit code: 2 Time: 0.380 Edited October 10, 2004 by Konan--M Link to comment Share on other sites More sharing options...
lte5000 Posted October 10, 2004 Share Posted October 10, 2004 Unstable. Link to comment Share on other sites More sharing options...
Digetal Posted October 17, 2005 Share Posted October 17, 2005 (edited) yeah unstable enough to use. You guys could always just use something else. This has got to best compiler for scripts I've ever found, anyone got anything different. Edited October 17, 2005 by Digetal Link to comment Share on other sites More sharing options...
Mikon Posted October 17, 2005 Share Posted October 17, 2005 if you have to use latest beta anyways, what about using the "Beep" function implemented in AutoIt take a look at the helpfile and look for the funtion "Beep" syntax: Beep ( [ Frequency [, Duration ]] ) Mikon Link to comment Share on other sites More sharing options...
ryeguy Posted October 17, 2005 Share Posted October 17, 2005 You guys realize this thread is a year old... Link to comment Share on other sites More sharing options...
layer Posted October 17, 2005 Share Posted October 17, 2005 (edited) Doesn't matter, my function (Beep, in the latest BETA) was recognized ! Edited October 17, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
gamerman2360 Posted October 17, 2005 Share Posted October 17, 2005 (edited) Never hurts to look a old threads, usually I get old threads when I search Google... Then when I post w/o looking at the date everyone kinda does that "wth?" thing. Anyway. I've never seen Beep() b4. How do you add functions to Autoit? Is it hard? If I knew how I would make a way to have BlockInput() accept hotkeys. Edit: Beep() dosn't use the default keyword . Beep(default) does nothing and returns 1. Edited October 17, 2005 by gamerman2360 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