Hello, everyone, I'd be very grateful if someone could help me with the following (I don't know if it can be made to work):
I have two windows in the alb+tab menu - a "Word" document and a "Media Player Classic". Is it possible to make a script, that after alt+tabbing from the "Word" document to the MPC, also presses play ("space") in the player which is now the active window, and then presses stop ("space" again) when I alt+tab back to the "Word" document and the player becomes the inactive window.
Thank you very much in advance.
Can Alt+Tab (with two items in the menu) also press "play" in the new active window? Topic is solved
Re: Can Alt+Tab (with two items in the menu) also press "play" in the new active window?
I ran into a weird issue but this works for VLC ( just add your window titles )Kosmalak wrote:Hello, everyone, I'd be very grateful if someone could help me with the following (I don't know if it can be made to work):
I have two windows in the alb+tab menu - a "Word" document and a "Media Player Classic". Is it possible to make a script, that after alt+tabbing from the "Word" document to the MPC, also presses play ("space") in the player which is now the active window, and then presses stop ("space" again) when I alt+tab back to the "Word" document and the player becomes the inactive window.
Thank you very much in advance.
Whenever I bind Alt up, my alt tab menu goes old school (win7)
Code: Select all
#singleinstance force
Global altTabbed := False
Return
F10::
ExitApp
F9::Reload
$Alt up:: ; Removing 'up' from here fixes the Switch menu but doesn't send the {Space}
send {Alt up}
if(!GetKeyState("Alt", "P")) {
if(altTabbed) {
WinGetActiveTitle activeWindowTitle
if(InStr(activeWindowTitle, "VLC media player")) { ; filter window title
send {Space}
}
}
altTabbed := False
}
Return
$Tab::
if(GetKeyState("Alt", "P") AND !altTabbed) {
altTabbed := True
}
send {Tab}
Return
Re: Can Alt+Tab (with two items in the menu) also press "play" in the new active window?
Hello, 4GForce, thank you so very much!!! We're halfway there. I changed the active window title and it works for MPC too. I use Windows 7 anyway, so "the weird part" is not a problem.
Now, when I alt+tab from the "Word" document to the player, it starts playing the video! Just like I wanted it to. That's awesome. The problem is that when I alt+tab back to 'Word", the video keeps on playing, while I wanted it to get paused. Still, what you've sent me will save me thousands of movements per day (because of the nature of my work), but if you can get the second half of it to work too, that will be beyond perfect!
Thank you once again.
Now, when I alt+tab from the "Word" document to the player, it starts playing the video! Just like I wanted it to. That's awesome. The problem is that when I alt+tab back to 'Word", the video keeps on playing, while I wanted it to get paused. Still, what you've sent me will save me thousands of movements per day (because of the nature of my work), but if you can get the second half of it to work too, that will be beyond perfect!
Thank you once again.
Re: Can Alt+Tab (with two items in the menu) also press "play" in the new active window? Topic is solved
Oh, simple, check again when alt-tabbed is 1st activatedKosmalak wrote:Hello, 4GForce, thank you so very much!!! We're halfway there. I changed the active window title and it works for MPC too. I use Windows 7 anyway, so "the weird part" is not a problem.
Now, when I alt+tab from the "Word" document to the player, it starts playing the video! Just like I wanted it to. That's awesome. The problem is that when I alt+tab back to 'Word", the video keeps on playing, while I wanted it to get paused. Still, what you've sent me will save me thousands of movements per day (because of the nature of my work), but if you can get the second half of it to work too, that will be beyond perfect!
Thank you once again.
Code: Select all
#singleinstance force
Global altTabbed := False
Return
F10::
ExitApp
F9::Reload
$Alt up:: ; Removing 'up' from here fixes the Switch menu but doesn't send the {Space}
send {Alt up}
if(!GetKeyState("Alt", "P")) {
if(altTabbed) {
WinGetActiveTitle activeWindowTitle
if(InStr(activeWindowTitle, "VLC media player")) { ; filter window title
send {Space}
}
}
altTabbed := False
}
Return
$Tab::
if(GetKeyState("Alt", "P") AND !altTabbed) {
altTabbed := True
WinGetActiveTitle activeWindowTitle
if(InStr(activeWindowTitle, "VLC media player")) { ; filter window title
send {Space}
}
}
send {Tab}
Return
Re: Can Alt+Tab (with two items in the menu) also press "play" in the new active window?
YES! It works now. It was a matter of when I activated the script. If my "Word" document is open and the player is paused when I activate the script, it does exactly what I want. Thank you so much a million times, 4GForce. I'm eternally grateful for your help!