duketrapp Posted May 6, 2006 Share Posted May 6, 2006 (edited) hi folks... SORRY.. The Threadheader must be "Block Buttonclicks ""DURING"" Soundplay("file.wav",1)".. but i dont can change it anymore... ..i got a new prob... and no idea how i can easy clear that.. maybe u can give a helpin mind... prob: i play different .wav files in my script.. its a speakin voice, so if there are different words or phrases i use flag 1 that the next .wav dont kill the curent.. somethng like this: soundplay("a.wav",1) soundplay("b.wav",1) soundplay("c.wav",0) ..the problem is, during the script plays (for Example) "a.wav", i can click buttons on my gui and the script execute this button function after playin "c.wav"... Thats the problem.. It should work that the user clicks "1" time on "1" button.. and the script execute the function of this "1" button after playin "c.wav"... In my case the script collects all clicks and after playin "c.wav" it executes "ALL" clicks... Thats shit... ive tried to work with _IsPressed but it cant solve my prob cause i need to block the mouseclicks DURING the sound plays and pauses the script.. ..the only solution i found was BlockInput like this: BlockInput (1) soundplay("a.wav",1) soundplay("b.wav",1) soundplay("c.wav",0) BlockInput (0) ..or hold mouse in a mousetrap during soundplay... but this looks like trash too for me, because i dont want to get a fixed mousecursor durin soundplay... so is there a chance to block the buttons (not with DISABLE or HIDE.. geyout buttons look like shit and buttons must be visible..) or block more than 1 mouseclick (or all mouseclicks) on the buttons during soundplay?... Thanks for input.... Edited May 6, 2006 by duketrapp AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 6, 2006 Share Posted May 6, 2006 Hi, what about Soundplay( ..., 0) script goes on and then build a loop where _ispreesed() left mouse and right mouse is goning to do nothing. after a specific time, the loop breaks and the script goes on. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
duketrapp Posted May 6, 2006 Author Share Posted May 6, 2006 Hi,what about Soundplay( ..., 0)...?.. u didnt read that i use different sounds?... i need flag 1 for all sounds exep the last..like this:soundplay("a.wav",1)soundplay("b.wav",1)soundplay("c.wav",0)..If u use all flags 0 than only the last sound will be played.. so long.. AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 6, 2006 Share Posted May 6, 2006 (edited) ?.. u didnt read that i use different sounds?... i need flag 1 for all sounds exep the last..like this:soundplay("a.wav",1)soundplay("b.wav",1)soundplay("c.wav",0)..If u use all flags 0 than only the last sound will be played.. so long..HI,I don't think so. Because the next sound will start, when the _isPressed() loop breaks. That's why I thought you could use ,0 at every sound.It is not a very smooth solution, but it should work. Give it a try. All you have to do is putting a loop between the sounds in which _isPressed() avoids clicking.So long,Mega Edited May 6, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
duketrapp Posted May 6, 2006 Author Share Posted May 6, 2006 (edited) Because the next sound will start, when the _isPressed() loop breaks. ...putting a loop between the sounds in which _isPressed() avoids clicking...hm... but the sounds have different length values and i dont can get the length cause they r importet automatic by the script... so how i can tell the _isPressed() loop to stop exactly when the soundfile before ends, and play the next file? i dont know any function that can check the lenght of an .wav file in autoit... so long...maybe somethng like this would work?:Do; _isPressed() functionUntil soundplay("a.wav",1) Edited May 6, 2006 by duketrapp AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
Valuater Posted May 6, 2006 Share Posted May 6, 2006 (edited) WinSetState ( "title", "text", flag ) use disable after playing... use enable 8) Edited May 6, 2006 by Valuater Link to comment Share on other sites More sharing options...
duketrapp Posted May 6, 2006 Author Share Posted May 6, 2006 (edited) WinSetState ( "title", "text", flag )..its a simple way.. just what im searchin for.. .. BUT.. 1 button click should be possible for the user ... but its a good hint ... maybe i can use this in a different way... ..btw.. if u use the WinSetState solution u get an error beep when u try to click the window... is there a way to kill this sound?.. (not wave volume = 0 ... i need to hear the text wav... ).. Edited May 6, 2006 by duketrapp AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
Valuater Posted May 6, 2006 Share Posted May 6, 2006 no way to kill the sound as far as i know.. you could also "hide" the window dunno 8) Link to comment Share on other sites More sharing options...
Valuater Posted May 6, 2006 Share Posted May 6, 2006 maybe you could create an invisable gui to overlay your GUI... no buttons and no sound if clicked on 8) Link to comment Share on other sites More sharing options...
Simucal Posted May 6, 2006 Share Posted May 6, 2006 maybe you could create an invisable gui to overlay your GUI... no buttons and no sound if clicked on8)That sounds like the best idea. A transparent GUI overlayed to block user interaction. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
duketrapp Posted May 7, 2006 Author Share Posted May 7, 2006 (edited) That sounds like the best idea. A transparent GUI overlayed to block user interaction. ..y.. i thought about somethng like that .. but... still the same problem..like the solution with the DISABLED gui... 1 click on 1button = impossible... ... maybe i dont need the 1 click user interaction during soundplay.... ...until someone got another small simple good solution.. ..thks for ur help til now.. Edited May 7, 2006 by duketrapp AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
duketrapp Posted May 7, 2006 Author Share Posted May 7, 2006 ...but.. how must i realize an INVISIBLE blocking window?!?!... i tried some various windows but i dont reach a solution that is invisible and can block input to the buttons same time!!!... always i set to HIDE or TRANSPARENCY = 0 the window dont block input to the buttons under... AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
Valuater Posted May 7, 2006 Share Posted May 7, 2006 1 you can have a certain key pressed.. just make a message on the screen to press a certain key... and use the function _ispressed() 2 take a look at "VAULTER - PC LOCKOUT" , for the clear screen... in my sig below 8) Link to comment Share on other sites More sharing options...
duketrapp Posted May 7, 2006 Author Share Posted May 7, 2006 (edited) 8)Valuater ur da man.. BUT.. ive changed just 1 line in ur code for a better result in ur script: $SAFE = GUICreate('') GUISetState( $WS_EX_TRANSPARENT, $SAFE) $VAULT = GUICreate(" *VAULTER*", @DesktopWidth, @DesktopHeight, -1, -1, -1, -1, $SAFE) GUISetState() ToolTip("Protected by, *VAULTER* v" & $VER, 5, 5) WinSetOnTop(" *VAULTER*", "", 1) WinSetTrans(" *VAULTER*", "", 1) ..this result is near perfect cause it blocks all input like we all wish ..but when u look exactly u can see a millisecond of the trans window when its created.. when u change it to this: $SAFE = GUICreate('') GUISetState( $WS_EX_TRANSPARENT, $SAFE) $VAULT = GUICreate(" *VAULTER*", @DesktopWidth, @DesktopHeight, -1, -1, -1, -1, $SAFE) ToolTip("Protected by, *VAULTER* v" & $VER, 5, 5) WinSetOnTop(" *VAULTER*", "", 1) WinSetTrans(" *VAULTER*", "", 1) GUISetState() ; <----just set this at the end and works perfect ..u see nothng when the trans window is created so .. thanks a lot.. this works realy perfect for me ... i just put this code in my soundplay function and it work awsome... .. thnks again.. and thnks to all other users too for brainstorming... for all who are interested in "USER INPUT BLOCKED SOUNDPLAY" here is the workin code for the sound funktion: Func playwav($val,$duration) $winpos = WinGetPos ( $scriptname );<- $scriptname is ur main gui $SAFE = GUICreate('') GUISetState( $WS_EX_TRANSPARENT, $SAFE) $VAULT = GUICreate("avoider", $winpos[2], $winpos[3], $winpos[0], $winpos[1], -1, -1, $SAFE) WinSetOnTop("avoider", "", 1) WinSetTrans("avoider", "", 1) GUISetState() SoundPlay ( $wavsspath & $val & ".wav", $duration) GUIDelete($VAULT) GUIDelete($SAFE) Return EndFunc Edited May 7, 2006 by duketrapp AVIfileLength,WMPSendKeycontrolled,... Link to comment Share on other sites More sharing options...
Valuater Posted May 7, 2006 Share Posted May 7, 2006 Welcome... and i will change that line also 8) Link to comment Share on other sites More sharing options...
duketrapp Posted May 7, 2006 Author Share Posted May 7, 2006 (edited) yeeha... but.. .. i tested a bit now.. it runs fine but i noticed that when i hammer a sequence of near 10 clicks on the blocking trans window, sometimes i see ~10 milliseconds a non trans window with the phrase "no reply" in the header ( the message u get in window title when a program is freezed).. than after the milliseconds all runs normal and nothng to see... i dont know if its an error by the blocking script or a general overflow on input when u clicking verrrry fast on an window when a wav plays... but.. i dont thnk that someone will give the script clicks in that speed and duration when hes not stoned ..or maybe someone knows why this happends... salute... Edited May 7, 2006 by duketrapp AVIfileLength,WMPSendKeycontrolled,... 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