Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Automatically select and open files


  • Please log in to reply
5 replies to this topic
ThreePenceCoin
  • Members
  • 5 posts
  • Last active: Jul 24 2014 06:35 PM
  • Joined: 10 Jul 2014

Hi, ahk noob here. I mostly take other people's scripts here and change it slightly to work for me, so I can't do very much. 

 

I have a script that will pause windows media player if it is playing, and if not, will open a folder in my documents. The last thing I wanted to add was a way to automatically select everything in the opened folder, hit enter (to open them in media player) and then close the opened file explorer window. 

 

XButton2::
 
IfWinExist, Windows Media Player 
     Send, {Media_Play_Pause} 
IfWinNotExist, Windows Media Player 
     run, D:\Playlist 
                                               <-- Here is where i'd like it to select everything, hit enter, close the file explorer window, and then minimize windows media                                                                               player.
 
 
 
 
 
 
 
 
 
Any suggestions would be greatly appreciated. 


Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012

Send ^a (ctrl + A) to select all then send {enter} to run them


Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About

ThreePenceCoin
  • Members
  • 5 posts
  • Last active: Jul 24 2014 06:35 PM
  • Joined: 10 Jul 2014

I should have thought of that, thanks!



ThreePenceCoin
  • Members
  • 5 posts
  • Last active: Jul 24 2014 06:35 PM
  • Joined: 10 Jul 2014

It's one step closer to working, but I think I'm missing something. Nothing after sending enter works. I don't seem to be able to close the file explorer window, or minimize the media player. Any tips?

 

XButton2::
 
IfWinExist, Windows Media Player 
     Send, {Media_Play_Pause} 
IfWinNotExist, Windows Media Player 
     run D:\Playlist
     WinSetTitle Explorer
     sleep 100
     Send ^a
     sleep 10
     Send {Enter}   <--
     sleep 30
     WinClose Explorer
     WinMinimize, Windows Media Player
 
Return


Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012
First try with more sleep after the enter
Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About

ThreePenceCoin
  • Members
  • 5 posts
  • Last active: Jul 24 2014 06:35 PM
  • Joined: 10 Jul 2014

I have, 30, 65, 100, 300 and 600 all give no different result. Am I using WinSetTittle wrong, or another command? It's the first script i've tried to write.