I want to pull out the current track information from Spotify windows client using autohotkey.
Although this question Hotkey for next song in Spotify solved some of the problems (the media playback issues) in the commonly used ahk script (can be found in this question: Newest Spotify update: Autohotkeys script broke and below), the track info shortcut still does not work.
^Down::
{
DetectHiddenWindows, On
SetTitleMatchMode 2
WinGetTitle, now_playing, ahk_class SpotifyMainWindow
;StringTrimLeft, playing, now_playing, 10
DetectHiddenWindows, Off
clipboard = %playing%`r`n
return
}
This will give me "Spotify free" no matter what song I am playing.
The main problem is that the tray icon and the task bar icon stopped showing the currently played song information after this update. Only text Windows spy can find from the task bar icon is now "Spotify Free".
So, I tried to get all controllist and extract texts in each of them by following the example in this question: How to obtain textual contents from a window
But, I could only find two controls ("Chrome_WidgetWin_01" and "Chrome_RenderWidgetHostHWND1") and Window spy can find text "Chrome Legacy Window" and this is all it finds.
Is there a way to dig into this further? I noticed in the Windows Task Manager there are 3 spotify.exe instances. Would looking into other processes help?
PS
AHK Window Info 1.7 (http://www.autohotkey.com/board/topic/8204-ahk-window-info-17/) is not available for download at moment. so i could only use Ahk Window Spy 1.3.3 by Decarlo.
Oh, I found the code for AHK Window Info pasted as spoiler at http://www.autohotkey.com/board/topic/8204-ahk-window-info-17/page-6
But it did not help. information found was not more than Ahk Window Spy.
(edit)
UISpy from microsoft gives me a bit more info but it's not possible to get texts in Spotify client. And, I realized that it's a good thing in terms of security (otherwise malware can read my email password etc). So, unless Spotify client wants to expose this information, it would be hard or not possible to do this by ahk. Is this correct or any cleaver way around in this particular case?
EDIT: This solution is no longer needed. The song artist and title have been added back to the Window Title.
The best solution is to downgrade Spotify to a 0.9 version from FileHorse. Then do the following:
Go to C:\Users\YOURUSERNAME\Appdata\Roaming\Spotify
Make a new empy text file
Name it Spotify_new.exe
Right click the file and make the file read-only
Copy this file and name the new one Spotify_new.exe.sig
Spotify needs to delete these files to do an automatic upgrade. The read-only flag on both of these files will prevent upgrading from happening.
I haven't had any issues running an old version at this point in time.
Related
I am trying to automate a web process using selenium.
The process clicks an "upload image" button and then sends the file name to a Windows File Explorer Window.
My solution as of now is to use selenium to click the "upload image" button and then to use a VBscript, via the sendKeys command, to send the file name to the active windows file explorer window.
As others have noted this causes some issues, foremost of which is that accidently focusing on another window sends the keys to it instead of file explorer.
I'm trying to make this process less "hacky".
I know MS Edge uses a Windows Utilities subprocess to open the file explorer window.
As of now, I can get the Id of this subprocess, but in a round about way, namely, by finding the most recently created subprocess managed by the browser. Obviously, this is a far cry from automation.
Using windows PowerShell, I've I have not managed to locate any information about this subprocess that could help with my automation task. For example, I could not get any unique identifying characteristics of the subprocess other than its process Id and I can't access its standard input. So far, all I can do is kill the sub process.
What I'm looking for is a rough outline (no code, just an architectural overview) of what it would take to do in PowerShell, what MS edge does after invoking the Windows Utility subprocess to upload a file to a website.
If someone has any suggestions on books I can read, I'd appreciate that as well.
Just looking for someone to point me in the right direction, really.
I am wondering if something is wrong with my computer (or myself), because I can't seem to drag & drop a file into Visual Studio Code to open it in the editor. Closing an opened folder first doesn't make a difference. VSCode always shows me the 'stop sign', in every spot I tried (the editor, the opened tab bar, an existing opened file, ...).
Why does VSCode block this ?
(I have experienced this in earlier versions as well. Currently on v1.6 on Windows 7.)
Searching for a solution, I stumbled on this page, where one commenter explains:
I think you are running into the security issue where lower permission processes cannot send messages to higher permission processes. Explorere.exe, running at normal permission levels, cannot send the window message to winword.exe, running elevated.
I am indeed always running VSCode as Administrator, but not my Explorer windows.
When I run VSCode in non-administrator mode (so just my regular user), drag-and-drop works fine.
I feel silly as I lost 15 minutes looking into this. In case it helps:
Make sure you are not trying to open files from a zip file...
Cheers.
I am developing in PHP with Xdebug and for some reason every now and then the debug session stops working, so i click again the debug button but it gives me this error all the time "Web launch already running", so i have to go to Debug Perspective and click "Terminate and Relaunch".
Is there a way to make eclipse automatically terminate and relaunch or launch two sessions or don't show this popup, for 2 years this popup has been bugging me xD
As noted in response to questions like this one and this one, the best current solution appears to be binding "Terminate and Relaunch" to a keyboard shortcut.
Not automatic, but at least a lot less clicking around.
I have taken care of pesky popups in Eclipse with AutoHotkey script which have worked very well. I could create an AutoHotkey script which sends specific keystrokes automatically every time there is a specific pop-up.
So the flow I had in mind was as follows :
You click on the debug button -> The Error popup appears and as soon as that happens the AutoHotKey script kicks in and automatically does what you have to do manually.
If you think that might be worth looking into then we can talk more in a Chat session somewhere. I would need some information about the Pop up using the AU3_Spy.exe bundled with the AutoHotkey Installer.
Searching on Google, I found that many people have the same problem.
Bellow are some links that help you, I think:
https://aptanastudio.tenderapp.com/discussions/questions/123-definitive-installation-guide-for-php-debugging-on-linuxubuntu
A good article: http://www.latenightpc.com/blog/archives/2008/05/24/a-complete-lamp-development-environment-xampp-eclipse-pdt-and-xdebug
See this, too: http://www.eclipse.org/forums/index.php/m/57493/
Take a look here, too: Getting error in XDEBUG
So, read and try, read and try.
We are currently evaluating install4j and things are going pretty well, however I have a question about auto-update.
Currently I see options and documentation around 3 options for auto-update and the third one (no version check) seems
to be the closest to what we need. However it sounds as though it still prompts the user to actually start the download/install. Is there
any way to get around this? We are targeting our software as a service on many windows boxes in a server room, so there isn't a user
to click continue for that last step. I believe we can roll our own service to monitor for upgrades that will do a command line
install with an answers file to prevent prompting, but I'd love to know if I missed something that would allow me to utilize
install4j's auto-update.
When you go to Installer->Screens & Actions, click on the "Add" button and choose "Add application", you can choose from a number of pre-defined templates. However, they are just templates and after adding them you can change them completely.
If the updater should be automatic but still show a progress dialog, you can just set the "Default execution mode" property of the updater application to "Unattended mode with progress dialog". In that case, no screens will be shown at all.
I have an issue on a client machine that seems to be interferring with a word addin that ive built.
When any word document opens on the client machine, a second blank document opens also.
Ive seen this issue on a number of different machines but havent seen an explanation as to why.
Has anyone else seen this behaviour in word and have you managed to stop the second document opening?
Cheers
If this issue is happening regardless of whether or not your addin is installed, perhaps the user has a strange macro running in their default template file (normal.dot)?
You could try replacing normal.dot with a version from a machine which doesn't have the problem to see if that helps!?
If you are delivering your addin as a .dot, it is very easy to accidentally set it up to have a document in it that opens. This, of course, assumes that the problem follows the addin. If it does not follow the addin then you don't have a programming problem.
It happens to me in Windows Explorer when the preview pane is enabled on it.
If you double-click a word document then 2 instances of Word open, one of them is with empty document.
Disabling the preview pane eliminates the problem.