michcio Posted May 20, 2009 Share Posted May 20, 2009 (edited) I've made a short script that's using _IsPressed, Beep and some whiles: #Include <Misc.au3> While True press("5A", 261.63) press("53", 277.18) WEnd Func press($name, $freq) While _IsPressed($name) Beep($freq,100) WEnd EndFunc but while running it and holding down "s" or "z" it seems like the beep sound pauses like 1 ms between each beep :S...why is that? It couldn't be that it takes 1 ms to run through 2 while loops :S right? thankfull for answers michcio Edited May 20, 2009 by michcio Link to comment Share on other sites More sharing options...
martin Posted May 20, 2009 Share Posted May 20, 2009 I've made a short script that's using _IsPressed, Beep and some whiles: #Include <Misc.au3> While True press("5A", 261.63) press("53", 277.18) WEnd Func press($name, $freq) While _IsPressed($name) Beep($freq,100) WEnd EndFunc but while running it and holding down "s" or "z" it seems like the beep sound pauses like 1 ms between each beep :S...why is that? It couldn't be that it takes 1 ms to run through 2 while loops :S right? thankfull for answers michcioI think you will find the same if you had while 1 instead of While _IsPressed. It's just the way beep works rather than anything else. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
michcio Posted May 20, 2009 Author Share Posted May 20, 2009 I think you will find the same if you hadwhile 1instead of While _IsPressed.It's just the way beep works rather than anything else.yes it's the same thing as I change it to while 1...weird ...isn't there a way to fix it so when a button is hold it'll beep until it's released...aren't there for example any _IsClicked _isReleased functions?? Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 20, 2009 Share Posted May 20, 2009 there is primaryup and primarydown.... can't remember right now what the actually variables are called.. i don't have the helpfile handy [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] 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