AlmarM Posted May 23, 2009 Share Posted May 23, 2009 (edited) Hi,guess what. I was bored again and this time I made a small flash piano udf.PianoUDF.au3expandcollapse popup#include-once Opt("MouseCoordMode", 2) Opt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) Func Piano_Start() $GUI = GUICreate("Piano", 600, 153) $oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICtrlCreateObj($oFlash, 0, 0, 600, 153) GUISetState() With $oFlash .Movie = "http://just-a-box.com/files/keyboard.swf" .Loop = True .wmode = "opaque" .bgcolor = "#FFFFFF" EndWith Sleep(1000) EndFunc Func F1($Dur = 0) MouseClick("left", 15, 90, 1, 0) Sleep($Dur) EndFunc Func F1_($Dur = 0) MouseClick("left", 30, 40, 1, 0) Sleep($Dur) EndFunc Func G1($Dur = 0) MouseClick("left", 45, 90, 1, 0) Sleep($Dur) EndFunc Func G1_($Dur = 0) MouseClick("left", 60, 40, 1, 0) Sleep($Dur) EndFunc Func A1($Dur = 0) MouseClick("left", 80, 90, 1, 0) Sleep($Dur) EndFunc Func A1_($Dur = 0) MouseClick("left", 95, 40, 1, 0) Sleep($Dur) EndFunc Func B1($Dur = 0) MouseClick("left", 110, 90, 1, 0) Sleep($Dur) EndFunc Func C1($Dur = 0) MouseClick("left", 140, 90, 1, 0) Sleep($Dur) EndFunc Func C1_($Dur = 0) MouseClick("left", 160, 40, 1, 0) Sleep($Dur) EndFunc Func D1($Dur = 0) MouseClick("left", 175, 90, 1, 0) Sleep($Dur) EndFunc Func D1_($Dur = 0) MouseClick("left", 190, 40, 1, 0) Sleep($Dur) EndFunc Func E1($Dur = 0) MouseClick("left", 205, 90, 1, 0) Sleep($Dur) EndFunc Func F2($Dur = 0) MouseClick("left", 235, 90, 1, 0) Sleep($Dur) EndFunc Func F2_($Dur = 0) MouseClick("left", 250, 40, 1, 0) Sleep($Dur) EndFunc Func G2($Dur = 0) MouseClick("left", 267, 90, 1, 0) Sleep($Dur) EndFunc Func G2_($Dur = 0) MouseClick("left", 283, 40, 1, 0) Sleep($Dur) EndFunc Func A2($Dur = 0) MouseClick("left", 300, 90, 1, 0) Sleep($Dur) EndFunc Func A2_($Dur = 0) MouseClick("left", 315, 40, 1, 0) Sleep($Dur) EndFunc Func B2($Dur = 0) MouseClick("left", 330, 90, 1, 0) Sleep($Dur) EndFunc Func C2($Dur = 0) MouseClick("left", 360, 90, 1, 0) Sleep($Dur) EndFunc Func C2_($Dur = 0) MouseClick("left", 380, 40, 1, 0) Sleep($Dur) EndFunc Func D2($Dur = 0) MouseClick("left", 395, 90, 1, 0) Sleep($Dur) EndFunc Func D2_($Dur = 0) MouseClick("left", 410, 40, 1, 0) Sleep($Dur) EndFunc Func E2($Dur = 0) MouseClick("left", 425, 90, 1, 0) Sleep($Dur) EndFunc Func F3($Dur = 0) MouseClick("left", 460, 90, 1, 0) Sleep($Dur) EndFunc Func F3_($Dur = 0) MouseClick("left", 475, 40, 1, 0) Sleep($Dur) EndFunc Func G3($Dur = 0) MouseClick("left", 490, 90, 1, 0) Sleep($Dur) EndFunc Func G3_($Dur = 0) MouseClick("left", 505, 40, 1, 0) Sleep($Dur) EndFunc Func A3($Dur = 0) MouseClick("left", 520, 90, 1, 0) Sleep($Dur) EndFunc Func A3_($Dur = 0) MouseClick("left", 535, 40, 1, 0) Sleep($Dur) EndFunc Func B3($Dur = 0) MouseClick("left", 550, 90, 1, 0) Sleep($Dur) EndFunc Func C3($Dur = 0) MouseClick("left", 580, 90, 1, 0) Sleep($Dur) EndFuncSong: Crazy Frog - Axel Fhttp://www.youtube.com/watch?v=ad93KD6tWOkTell me what you think.AlmarMEDIT: Typo Edited May 23, 2009 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
martin Posted May 23, 2009 Share Posted May 23, 2009 Have you missed out the example AlmarM? 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...
Mat Posted May 23, 2009 Share Posted May 23, 2009 Yes he has. But it was still fun though!! An idea for next time you have way too much time on your hands... See if you can work out how sibelius saves files, and create a .sib to flash piano player converter. That would be fun!!You could even have bass parts if you make a riff, and use adlib enable. The new adlib functions. And then press stuff over the top.Do you reckon they will let me do my GCSE composition on this?MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
AlmarM Posted May 23, 2009 Author Share Posted May 23, 2009 (edited) Ups, srry! I added the example now. AlmarMEDIT: @MDiesel,Im planing to make record function using my _Mouse_Capture() function. See my sig. Edited May 23, 2009 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. 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