Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Start Windows Store Apps in AutoHotKey?

Window Store apps are not like the classic Windows apps. The latter usually are installed at clear paths under C:\Program Files. So, AutoHotKey (AHK) scripts can simply run a classic app by "Run" with the path to the app executable. However, it seems there is no simple path to Windows Store app executables. So, how to start Windows Store apps in AutoHotKey scripts with a simple way?

like image 777
Meng-Yuan Huang Avatar asked Feb 01 '16 07:02

Meng-Yuan Huang


People also ask

How do I start an AutoHotkey in Windows?

To do this, find the AutoHotKey script you want to add to the startup, select it, hold the Alt key, and drag it to the same folder. Step 2: The above action will instantly create a shortcut to the script. If you wish, you can remove the “. ahk – shortcut” suffix from the shortcut name.

How do I create an AutoHotkey script from an exe?

Right-click: Within an open Explorer window, you can right-click any . ahk file and select "Compile Script" (only available if the script compiler option was chosen when AutoHotkey was installed). This creates an EXE file of the same base filename as the script, which appears after a short time in the same directory.


4 Answers

Assume the OS is Windows 10. The following steps are a simple way to start Windows Store app in AHK script:

  1. Create a folder, e.g. D:\WinStoreAppLinks
  2. Drag and drop a Windows Store app, e.g. OneNote (mobile), by mouse in All App List to D:\WinStoreAppLinks (through File Explorer). It will create a link there, OneNote. You can rename it as you want.
  3. The app can be run in AutoHotKey scripts (or Command Prompt), by e.g.:

Run, D:\WinStoreAppLinks\OneNote

like image 112
Meng-Yuan Huang Avatar answered Nov 15 '22 22:11

Meng-Yuan Huang


Run shell:AppsFolder\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App

Check shell:AppsFolder for full app names list

like image 32
ZashWarminder Avatar answered Nov 15 '22 22:11

ZashWarminder


Here is a more verbose answer that worked for me:

  1. In an Explorer window navigate to shell:AppsFolder. This is a directory with all your Windows apps
  2. Find the app you want to launch (in my case Windows Terminal), right click it, and select Create Shortcut
  3. Accept the prompt to create this shortcut on your desktop
  4. Put this shortcut somewhere other than your desktop (e.g. C:\Shortcuts). Rename if desired
  5. Add this to your AHK script:

    Run, "C:\Shortcuts\Windows Terminal"
    

Then simple reload your AHK script. Enjoy

like image 45
Damien Avatar answered Nov 15 '22 21:11

Damien


This autohotkey script https://github.com/JuanmaMenendez/AutoHotkey-script-Open-Show-Apps works perfectly with any kind of app.

In the specific case of Windows Store Apps, read the section Find AppUserModelID and use the Utility Function c)

like image 21
Juanma Menendez Avatar answered Nov 15 '22 21:11

Juanma Menendez