使用Autohotkey启动Onenote UWP

时间:2016-10-29 14:22:44

标签: cmd autohotkey onenote

我试图从autohotkey启动onenote UWP,但无法确定要启动的特定exe文件。我运行onenote uwp,发现名称为Microsoft.Office.OneNote_17.7466.57691.0_x64__8wekyb3d8bbwe,位置为C:\ Program Files \ WindowsApps \ Microsoft.Office.OneNote_17.7466.57691.0_x64__8wekyb3d8bbwe。但是使用以下代码,我打开了onenote 2016

#o::

run "C:\Program Files\WindowsApps\Microsoft.Office.OneNote_17.7466.57691.0_x64__8wekyb3d8bbwe"

return

任何人都可以帮我吗?

非常感谢!

杰森

3 个答案:

答案 0 :(得分:1)

试试这个(未经测试):

Run, onenote:

http://winsupersite.com/windows-10/how-open-windows-10-apps-using-shell-commands

修改

您还可以创建此应用的快捷方式,以便通过以下方式从您的脚本运行:

#o:: Run, %A_Desktop%\OneNote.lnk

http://www.laptopmag.com/articles/create-keyboard-shortcuts-windows-10

答案 1 :(得分:1)

此代码对我有用:

" Mode Indication -Prominent!
function! InsertStatuslineColor(mode)
  if a:mode == 'i'
    hi statusline ctermfg=red
  elseif a:mode == 'r'
    hi statusline ctermfg=blue
  else
    hi statusline ctermfg= magenta
  endif
endfunction

function! InsertLeaveActions()
  hi statusline ctermfg=green
  set nopaste
endfunction

au InsertEnter * call InsertStatuslineColor(v:insertmode)
au InsertLeave * call InsertLeaveActions()

" to handle exiting insert mode via a control-C
inoremap <c-c> <c-o>:call InsertLeaveActions()<cr><c-c>

" default the statusline to green when entering Vim
hi statusline ctermfg=green

" have a permanent statusline to color
set laststatus=2

此代码适用于打开 OF365 OneNote:

Run, onenote-cmd:// ; this opens windows 10 OneNote. 

答案 2 :(得分:0)

如果在单击onenote-cmd://磁性链接时已将OneNote UWP配置为默认应用程序,则可以编写AutoHotKey脚本来运行该磁性链接。

1。将OneNote UWP配置为用于打开OneNote磁铁链接的默认应用程序: Configure OneNote UWP as your default app for opening a OneNote magnet link

2。使用Windows + O打开OneNote UWP:

#o::
Run, onenote-cmd://
return

3。使用Windows + N打开OneNote UWP快速注释

#n::
Run, onenote-cmd://quicknote?onOpen=typing
return