Sweet! I had to reinstall windows but this got me to search thrue my backup folders to find my spotify script, since i no longer have premium i would love the anti-commercial functions.
So here is my code.. steal anything u want if u find something usefull haha.
It also includes all spotify hotkeys if u want to create new commands for anything, my way to make things and yeah.
Notifies when new song starts to play(and what song)
also has hotkey to rapidly type Spotify - Nightwish – Bye Bye Beautiful - Live (example)
Custom hotkeys to switch songs even if spotify is minimized... and hidden..
Hotkey to focus on seachfield in spotify and yeah.. i think i made it pretty self explaining, but was a long time ago and I am and wasnt the nr1 scripter really:p
Hopefully we can merge this into one ultra cool spotify script:D
Code:
#Persistent
#SingleInstance force
SetTitleMatchMode RegEx
DetectHiddenWindows On
SendMode InputThenPlay
Menu, Tray, icon
Menu, Tray, NoDefault
Menu, Tray, Add, Open Settings, OpenSettings
Menu, Tray, Add,Readme, OpenReadme
Menu, Tray, Add, Exit This Shit, ExitThisShit
oldTitle =
SetTimer, Current, 50 ;Tweak Parameter 2 to change response time
FileInstall, settings.ini, settings.ini
FileInstall, readme.txt, readme.txt, 1
TheIniFile = settings.ini
ConfigFilePath := "settings.ini"
updateConfigFile(Path, ByRef Content)
{
FileDelete, %Path%
FileAppend, %Content%, %Path%
Return
}
anykey_SingleInput()
{
Input, AnyKey, L1 , {LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Space}{Enter}{Pause}
Traytip
if Instr(errorlevel, "EndKey")
anykey := SubStr(errorlevel, 8)
Return %AnyKey%
}
load := Spotikeys_Activate(TheIniFile)
Progress, m2 b fs18 zh0 w700 CWGreen CTSilver, Spotikeys by Ithion `n Part of #winDrini project-2010 testVersion 1.1`n`n When You Have Started Spotikeys use: `n`n F3-- To see a List of the Hotkeys Controlling Spotify from anywhere! `n`n Press F4-- To restart Spotikeys if needed `n`n Presse Escape-- rapidly two times to exit Spotikeys `n`n Press Ctrl-Insert {or Win-v) to Instantly write the currently playing song info into any text field`n`n The Same info will be seen whenever a new song starts to play in a "TrayTip" `n `n There is an usefull readme.txt `n `n Press Ctrl-TAB to dismiss this screen and at anytimee press Win-Home to see gui!, , , Courier New
KeyWait Ctrl, D
KeyWait, TAB, D
Progress, Off
ini_updateConfigFile(Path, ByRef Content)
{
FileDelete, %Path%
FileAppend, %Content%, %Path%
Return
}
Traytip, SpotiKeys, You can right click here but go listen to some music instead! `n Change Settings.ini if you want change SpotiKeys
Loop %ini_spotify0%
{
var := ini_spotify%A_index%
var := ini_spotify_%var%
if a_index = 1
{
spotifypath := var
hotkey, %ini_spotify_spotistart%, spotistart
continue
}
needle := "(L|R)?(C|c)trl.*&|(L|R)?(S|s)hift.*&|(L|R)?(A|a)lt.*&"
var2 := RegExMatch(var,needle,result)
needle := "Ctrl|Shift|Alt"
RegExMatch(result,needle,onlyModifier)
length := strlen(result)
length++
var4 := SubStr(var, length)
If onlyModifier = Ctrl
InterferenceFixedHotkey = ^%var4%
If onlyModifier = Shift
InterferenceFixedHotkey = +%var4%
If onlyModifier = Alt
InterferenceFixedHotkey = !%var4%
StringReplace,WithOutSpaces,InterferenceFixedHotkey ,%A_space%
label := ini_spotify%A_index%
Hotkey, %WithOutSpaces%, %label%
;Msgbox %WithOutSpaces%, %label%
}
Hotkey, F3, listKeys
~Esc::
doublepress := Keymagic_double()
if doublepress
MsgBox, 4,,Sure you want To Exit Spotikeys? (Yes/NO)
IfMsgBox, YES
Goto, ExitThisShit
return
#Home::
;tabdoublepress := Keymagic_double()
;if tabdoublepress
spotikeys_gui(open)
Return
F4::
Reload
return
#v::
Ctrl & Insert::
SendInput %spotifytitle%
return
OpenSettings:
Run, settings.ini
spotikeys_gui(open)
return
OpenReadme:
Run, readme.txt
return
spotikeys:
MsgBox %a_thisHotkey%
;sspotikeys_cmd(A_ThisHotkey)
return
ListKeys:
fileread, ini, %theIniFile%
list := ini_getSection(ini,"Spotify")
MsgBox, %list%
return
Current:
WinGetTitle, SpotifyTitle, Spotify
if oldtitle != %spotifytitle%
{
Traytip, Currently Playing:,%SpotifyTitle%,10,1
oldtitle = %spotifyTitle%
SetTimer, RemoveTrayTip, 5000
}
Return
Searchfield:
ControlSend, ahk_parent, ^l, ahk_class SpotifyMainWindow
RemoveTrayTip:
SetTimer, RemoveTrayTip, Off
TrayTip
return
OnExit:
ExitThisShit:
ExitApp
return
; List of spotify commands
; Function Windows Mac
; Create new playlist Ctrl-N Cmd-N
; Cut Ctrl-X Cmd-X
; Copy Ctrl-C Cmd-C
; Copy (alternative link) Ctrl-Alt-C Cmd-Alt-C
; Paste Ctrl-V Cmd-V
; Delete Del Del, Backspace
; Select all Ctrl-A Cmd-A
; Select none Ctrl-Shift-A Cmd-Shift-A
; Play/pause Space Space
; Next track Ctrl-Right Ctrl-Cmd-Right
; Previous track Ctrl-Left Ctrl-Cmd-Left
; Volume up Ctrl-Up Cmd-Up
; Volume down Ctrl-Down Cmd-Down
; Mute Ctrl-Shift-Down Cmd-Shift-Down
; Show help F1 Cmd-?
; Give focus to address/search field Ctrl-L Cmd-Alt-F, Cmd-L
; Go back (browse) Alt-Left Cmd-Alt-Left, Cmd-[
; Go forward (browse) Alt-Right Cmd-Alt-Right, Cmd-]
; Play selected row Enter Enter
; Browse to album of selected row Ctrl-Shift-Enter Cmd-Shift-Enter
; Browse to artist of selected row Ctrl-Alt-Enter Cmd-Alt-Enter
; Preferences Ctrl-P Cmd-,
; Logout active user Ctrl-Shift-W Cmd-Shift-W
; Quit Alt-F4 Cmd-Q
; Hide window - Cmd-H
; Hide other applications’ windows - Cmd-Alt-H
; Close window - Cmd-W
; Minimize window - Cmd-M
; Restore window (from hidden state) - Cmd-Alt-1
Download link (settingsfile,ahk script file,read me and compiled working .exe)
http://www.autohotkey.net/~Drini/spotiKeys.zip