switchToApp.ahk 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. NumberOfParameters = %0%
  2. Loop, %NumberOfParameters%
  3. {
  4. Parameter := %A_Index%
  5. if ( !IsLabel( Parameter ) )
  6. {
  7. ;MsgBox, Parameter "%Parameter%" Not Recognized.
  8. Return
  9. }
  10. GoSub, %Parameter%
  11. }
  12. return
  13. KODI:
  14. ;MsgBox,Kodi
  15. Process, Close, spotify.exe
  16. Process, Close, vlc.exe
  17. Process, Close, MediaMonkey.exe
  18. Run "C:\Program Files\Kodi\kodi.exe"
  19. return
  20. SPOTIFY:
  21. ;MsgBox,Spotify
  22. Process, Close, kodi.exe
  23. Process, Close, MediaMonkey.exe
  24. Process, Close, vlc.exe
  25. Run "C:\Users\Flo\AppData\Roaming\Spotify\Spotify.exe"
  26. return
  27. MEDIAMONKEY:
  28. ;MsgBox,Spotify
  29. Process, Close, kodi.exe
  30. Process, Close, spotify.exe
  31. Process, Close, vlc.exe
  32. Run "C:\Program Files (x86)\MediaMonkey\MediaMonkey.exe"
  33. return
  34. VLC:
  35. ;MsgBox,Spotify
  36. Process, Close, kodi.exe
  37. Process, Close, spotify.exe
  38. Process, Close, MediaMonkey.exe
  39. Run "C:\Program Files\VideoLAN\VLC\vlc.exe"
  40. return