However, no matter what I tried, I failed to integrate this code with functions and run Chrome Apps.
Code: Select all
#F1::
{
If WinExist("Translate")
If WinActive()
WinMinimize
Else WinActivate
Else
Run '"C:\Program Files (x86)\Google\Chrome\Application\chrome_proxy.exe" --profile-directory="Profile 1" --app-id=hojgkbboeffaoafihofamffoahaekkkk'
}
Thanks!
when I run this path (the same as above) with windows run command Google Trabslate starts.
"C:\Program Files (x86)\Google\Chrome\Application\chrome_proxy.exe" --profile-directory="Profile 1" --app-id=hojgkbboeffaoafihofamffoahaekkkk
The following code, and many similar, is running smoothly:
Code: Select all
+Esc::toggleWindow('C:\Program Files\AutoHotkey\SciTE\SciTE.exe', 'ahk_class SciTEWindow')
toggleWindow(appNameOrPath, winTitle) {
If WinExist(winTitle)
If WinActive()
WinMinimize(), MouseGetPos(,, &hWnd), WinActivate(hWnd)
Else WinActivate
Else runApp(appNameOrPath)
}
runApp(appNameOrPath) {
If !FileExist(appNameOrPath) {
For app in ComObject('Shell.Application').NameSpace('shell:AppsFolder').Items
(app.Name = appNameOrPath) && RunWait('explorer shell:appsFolder\' app.Path)
} Else Run(appNameOrPath)
}