Il sabato 11 luglio 2009 23:58:03 Marc Carson ha scritto: > I would like to create a program that increments/decrements the system > master audio volume if the mouse's mousewheel is scrolled up/down, in > combination with a hotkey (like ctrl+shift+mousewheel). > > Is this possible in Gambas? I see that the mousewheel can be detected, > but I don't see anything about up or down. I also see volume-related > items in SDL but I'm not sure if this is necessary to use or if there's > some better component for the task. > > Thank you, > > Marc
PUBLIC SUB Form_MouseWheel() SELECT CASE Mouse.delta CASE 1 PRINT "mouse wheel up" CASE -1 PRINT "mouse wheel down" END SELECT END I don't know about sdl. You could use aumix. i.e SHELL "aumix -v +5" WAIT increase the current main volume by 5 points. SHELL "aumix -v -25" WAIT decrease the current main volume by 25 points. SHELL "aumix -v 100" WAIT set the volume to the maximum. Et cetera... See aumix --help and do some experiments. P.S. I'm not sure thet aumix is on all GNU/linux systems around ;-) Ciao. > > --------------------------------------------------------------------------- >--- Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user