AutoHotkey Community

It is currently May 27th, 2012, 3:55 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 90 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

Would you be interested to see this developed further?
Yes
No
You may select 1 option

View results
Author Message
 Post subject:
PostPosted: March 31st, 2011, 6:51 pm 
Offline

Joined: April 21st, 2010, 4:52 pm
Posts: 6
Location: Sweden
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

_________________
Also known as ithion (at irc)

learning ahk on my own for only 3-4 months= noob, be gentle.
Mad Props to everyone writing stuff and posting it here. Also <3 the helpfile.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Updates?
PostPosted: April 11th, 2011, 6:56 pm 
So, are you/some other ppl still working on this script? i really loved it, but got windows 7 now, and it doesnt seem to work ... honestly thinking about going back to windows xp :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 11th, 2011, 6:58 pm 
Offline

Joined: October 3rd, 2007, 9:32 pm
Posts: 157
Location: UK
Hi thanks for all your comments - sorry for having no time to respond to queries - I'm actually just doing a major update now so many things should be fixed. It's not working atm because after numerous Spotify updates the ClassNN of controls have changed, which the script relies on. This and many other issues will be fixed in the upcoming release so please keep watching this topic.

Thanks for your patience.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 11th, 2011, 7:34 pm 
Ah, awsome, just wanted to know if ur still up to it. i think i was one of the first to discover this awsome tool, 2 days after ur post ... and loved it from the very start, good to see ur still working on it :) i wish i could help, but i dont have any skill :/ i mean, no skills at all.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2011, 9:54 pm 
Offline

Joined: October 3rd, 2007, 9:32 pm
Posts: 157
Location: UK
Thanks for all your support. As promised, the long-overdue major update is out (version 0.110502.215000). This includes major design changes (see changelog).

Unfortunately, this has not incorporated the latest AHK_L syntax which was only released yesterday, allowing for more sophisticated class handling. That will have to be in the pipeline.

Thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2011, 4:12 pm 
Offline

Joined: October 3rd, 2007, 9:32 pm
Posts: 157
Location: UK
Minor update 0.110503.151500 - a few patches to the last major release.

Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2011, 12:11 pm 
Stopify stopped working for me with the latest Spotify client update to 0.5.0. It's just showing me the "Stopped" status or crashes.

I'm on Window 7 Home Premium 64bit and it used to work before. Will there be an update to fix this problem?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2011, 12:18 pm 
Offline

Joined: October 3rd, 2007, 9:32 pm
Posts: 157
Location: UK
Sure - but I'll have to try and reproduce the error to find a fix. Oddly enough I'm still on v0.4.10.100 so I may have to wait for the update first. It may be a 64-bit issue since I don't have any 64-bit machines on which to test it.

In the meantime, could you tell me precisely what you do cause the error? Please also provide some info such as installation folder etc. Also, when you say "it used to work before", was that before Stopify's recent May updates or simply before the 0.5.0 Spotify client update (with the latest version of Stopify)? Thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2011, 5:12 pm 
You can download the client from the Spotify homepage which is the new version to upgrade "manually".

Well, it used to work perfectly on my 64bit machine, I used your most recent version with the May updates. The Spotify update to 0.5.0. seems to have messed it up.

I installed Stopify to the default folder which in my case was "C:\Program Files (x86)\Stopify\".

It's easy to reproduce the error, just start Stopify and nothing will happen. I start Stopify and the app window loads --> "Spotify is closed" --> I start Spotify --> "Please wait..." --> "Stopped". When I start playing a song, it just stays in "Stopped" mode.

It makes no difference if I start Spotify or Stopify first.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2011, 10:04 pm 
Offline

Joined: October 3rd, 2007, 9:32 pm
Posts: 157
Location: UK
OK - I'll look into it, but it may be little while since I'm very busy this week.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2011, 10:25 am 
Thank you very much!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2011, 10:25 am 
Thank you very much!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2011, 10:27 am 
Thank you very much!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2011, 10:27 am 
Thank you very much!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2011, 12:41 pm 
I cant get it to work, It just says
#include file "classes\_Classes.ahk" cannot be opened

any idea's?


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 90 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 22 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group