BobiusMaximus Posted November 21, 2006 Share Posted November 21, 2006 I just got autoit, and I've been searching through files, looking at things etc. Anyway, I found this thing which made a beepy noise, so I wrote this script with information I got from other scripts(very basic stuff): MsgBox(0, "Beep", "This will play a beep with a frequency of 5000 for 1000 milliseconds, continue?") Beep(5000, 1000) It was fun, because I could annoy people, but if I wanted to make it higher frequency or longer I had to edit the script. Anyway, that got me thinking, perhaps I could make it with 2 sliders, 1 for frequency, 1 for length of time. Well, it went very bad, and I got stuck just trying to create it, so any help would be nice -Bob Photoshop User and Noob AutoIt user. Link to comment Share on other sites More sharing options...
Valuater Posted November 21, 2006 Share Posted November 21, 2006 (edited) Welcome to the forumsIt was fun, because I could annoy people...do you realize just how annoying that phrase is here at Autoit. its almost like you want to write malware, so why should we help you8) Edited November 21, 2006 by Valuater Link to comment Share on other sites More sharing options...
BobiusMaximus Posted November 21, 2006 Author Share Posted November 21, 2006 Welcome to the forumsdo you realize just how annoying that phrase is here at Autoit. its almost like you want to write malware, so why should we help you8)People=My brother when he's trying to read, lol.It's not as if I'm trying to delete files on someone elses computer or anything.-Bob Photoshop User and Noob AutoIt user. Link to comment Share on other sites More sharing options...
AutoChris Posted November 21, 2006 Share Posted November 21, 2006 I wrote a quick script for you so you can see how it is done: GUICreate("Beeper", 200, 200) GUICtrlCreateLabel("Frequency", 50, 10, 100, 20, 0x0001) $freq = GUICtrlCreateSlider(10, 30, 180, 20) GUICtrlSetLimit($freq, 1000, 10) GUICtrlCreateLabel("Duration", 50, 60, 100, 20, 0x0001) $dur = GUICtrlCreateSlider(10, 80, 180, 20) GUICtrlSetLimit($dur, 1000, 10) $btn = GUICtrlCreateButton("Beep", 75, 110, 50, 30) $bye = GUICtrlCreateButton("Close", 75, 160, 50, 30) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $btn Then Beep(GUICtrlRead($freq), GUICtrlRead($dur)) If $msg = $bye Then Exit WEnd Link to comment Share on other sites More sharing options...
BobiusMaximus Posted November 21, 2006 Author Share Posted November 21, 2006 I wrote a quick script for you so you can see how it is done:Thanks a lot.I just want to check a few things.GUICreate("Beeper", 200, 200) <-- That is the size of the window in pixels, right?GUICtrlCreateLabel("Frequency", 50, 10, 100, 20, 0x0001) <-- This means it says frequency?$freq = GUICtrlCreateSlider(10, 30, 180, 20) <-- If you need to refer to it you will type $freq?GUICtrlSetLimit($freq, 1000, 10) <-- The max and min it can go to, right?$btn = GUICtrlCreateButton("Beep", 75, 110, 50, 30) <-- A button titled 'Beep' at those coordinates? If you need to refer to it you type $btn?$bye = GUICtrlCreateButton("Close", 75, 160, 50, 30) <-- The same but with 'Close' and 'bye'?GUISetState() <-- No clue on thisWhile 1 $msg = GUIGetMsg() If $msg = $btn Then Beep(GUICtrlRead($freq), GUICtrlRead($dur)) <-- If you click 'Beep' it will do the sound Beep, reffering to $freq and $dur? If $msg = $bye Then Exit <-- Exits?WEnd -Bob Photoshop User and Noob AutoIt user. Link to comment Share on other sites More sharing options...
AutoChris Posted November 21, 2006 Share Posted November 21, 2006 The best thing to do is to look in the help file for the functions. It will explain everything there. Most of your guesses are correct but if you are brave enough, you can copy the script and run it. That will also show you what it does. Link to comment Share on other sites More sharing options...
ConsultingJoe Posted November 21, 2006 Share Posted November 21, 2006 Looks like you got the code you needed, good luck [center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center] 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