Jump to content

Cloud22

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Cloud22

  1. It does and it works with the keyboard hotkey. It just crashes if using the mouse hotkey.
  2. It still fails. Just press shift+alt+d to pause/play it, but it you press whelldown, then it crashes. #include <MouseSetOnEvent_UDF.au3> #include <iTunesUDF.au3> _iTunes_Start() HotKeySet("{Esc}", "quit") HotKeySet("+!d", "PausePlay") HotKeySet("{MEDIA_PLAY_PAUSE}", "PausePlay") HotKeySet("{MEDIA_NEXT}","trackNext") _MouseSetOnEvent( $MOUSE_WHELLDOWN_EVENT , "PausePlay") while 1 sleep (1000) WEnd Func PausePlay() $iTunesApp.PlayPause EndFunc Func trackNext() _iTunes_Next() EndFunc Func quit() _iTunes_Quit() _MouseSetOnEvent($MOUSE_WHELLDOWN_EVENT) Exit EndFunc
  3. So I am trying to code when the mouse wheel is clicked, it launches itunes play/pause command. I got it to work by hotkey, but not by mouse. It seems not to be able to find itunes app when the mouse hotkey tries to use it, but the keyboard works fine. iTunesUDF.au3 (68) : ==> The requested action with this object has failed.: $iTunesApp.PlayPause $iTunesApp.PlayPause^ ERROR CODE#include <MouseSetOnEvent_UDF.au3> #include <iTunesUDF.au3> _iTunes_Start() HotKeySet("{Esc}", "quit") HotKeySet("{MEDIA_PLAY_PAUSE}", "PausePlay") HotKeySet("{MEDIA_NEXT}","trackNext") _MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT , "PausePlay") while 1 sleep (1000) WEnd Func PausePlay() _iTunes_Play_Pause() EndFunc Func trackNext() _iTunes_Next() EndFunc Func quit() _iTunes_Quit() _MouseSetOnEvent($MOUSE_WHELLDOWN_EVENT) Exit(0) EndFunc
×
×
  • Create New...