After clicking start menu, Fastkeys isn't focusing the background app to run the expected command
Posted: Feb 11th, ’20, 18:20
Hi,
I'd appreciate your help.
By clicking Fastkeys start menu having Chrome as the last used app, I was expecting the command below to run, copying to the clipboard the URL and webpage title with the following formatting:
FastKeys Automation Software
https://www.fastkeysautomation.com/
However, it seems after clicking the start menu, Fastkeys isn't focusing on Chrome again to run the expected command:
I tried to set "Sleep 150" expecting for Fastkeys menu to disappear and Chrome be focused again.
When I run the script as a "shortcut" it works properly, so I'm considering the issue is related to performing the script from the menu.
=> How to get this command to run properly from Fastkeys start menu?
Thank you very much,
Carlos
I'd appreciate your help.
By clicking Fastkeys start menu having Chrome as the last used app, I was expecting the command below to run, copying to the clipboard the URL and webpage title with the following formatting:
FastKeys Automation Software
https://www.fastkeysautomation.com/
However, it seems after clicking the start menu, Fastkeys isn't focusing on Chrome again to run the expected command:
Code: Select all
#If WinActive("ahk_class Chrome_WidgetWin_1")
Sleep 150 ;wait for Fastkeys menu to disappear and the window on background be focused
WinGetActiveTitle, WinTitle
Send, {Ctrl Down}l{Ctrl Up}
Clipboard := ""
Sleep 50
Send, {Ctrl Down}c{Ctrl Up}
ClipWait, 1
Clipboard := StrReplace(WinTitle, " - Google Chrome") . "`n" . Clipboard
#If
When I run the script as a "shortcut" it works properly, so I'm considering the issue is related to performing the script from the menu.
=> How to get this command to run properly from Fastkeys start menu?
Thank you very much,
Carlos