AutoHotkey Community

It is currently May 27th, 2012, 12:45 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: foobar2000 and ahk_class
PostPosted: September 30th, 2005, 4:49 pm 
Offline

Joined: January 11th, 2005, 7:27 pm
Posts: 13
Hello,
I want to controll foobar2000 with this script.

Code:
#Home::
class = {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}
IfWinNotExist, ahk_class %class%
  return
ControlSend, ahk_class %class%, x
return


The class I get with WinSpy, is ok. But the ControlSend-command sends no 'x' to foobar.

I have tested a script, thats checked the windowsname, this works correct, but normaly I can not use the Window-name, because it's the playing track.

Any hints?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2005, 5:28 pm 
Offline

Joined: September 25th, 2005, 4:31 pm
Posts: 610
Try:

Code:
ControlSend, %class%, x


or

Code:
ControlSend,, x, ahk_class %class%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2005, 5:36 pm 
Offline

Joined: January 11th, 2005, 7:27 pm
Posts: 13
Both didn't work


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2005, 5:53 pm 
Offline

Joined: July 29th, 2005, 5:32 pm
Posts: 179
For this-- it seems that you have to give the classNN of the actual control you are sending to-- but I don't believe you always have to do that for all programs..
Code:
#Home::
;ahk_class

;this is the class i found for the 'Playback-->Pause' option:
pause={2F1549DA-0A07-4812-8E26-1D94B8C3CA7D}1

;class = {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}
;the class i found for the window was different from yours for some reason..
class = ahk_class {DA7CD0DE-1602-45e6-89A1-C2CA151E008E}

IfWinNotExist, %class%
{
   msgbox, window does not exists..
   return
}
ControlSend, %pause%, x, %class%
return
That tested okay for me..

_________________
.o0[ corey ]0o.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 5th, 2005, 10:23 pm 
Offline

Joined: January 11th, 2005, 7:27 pm
Posts: 13
Your script doesn't work for me, because I didn't have your class.
But this works fine:

Code:
#Home::
DetectHiddenWindows, On
IfWinNotExist, ahk_class {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}
{
   return
}
ControlSend, ahk_parent , x
return


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, jrav, MSN [Bot] and 24 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