idvorkin / Vim-Keybindings-For-Onenote

Replicate the vim keybindings in OneNote.
117 stars 18 forks source link

what is the up.exe and send.exe code? i have use them solve onenote up down perfectly #47

Closed snsnsjsn closed 3 years ago

snsnsjsn commented 3 years ago

i check the code of vim_onenote.ahk , it use the up.exe down.exe to solve up and down in onenote so i call from my script, it is very good to solve my up and down in onenote eveyday

thanks

so what is code in these two exe ?

BlueDrink9 commented 3 years ago

They are compiled AutoIT scripts, since that doesn't seem to have the same bug. See here for details

snsnsjsn commented 3 years ago

when my win10 update to 19042.630, ahk sendplay not work , my used code for down ,is numlock combinate with j `NumLock & j:: if GetKeyState("Tab")=0 { if getkeystate("shift") = 0 { if GetKeyState("alt")=0 SendPlay, {Down} else Send, {Blind}!{Down} Return }

Else
{
    if GetKeyState("alt")=0
               Send, {Blind}+{Down}
    else
        Send, {Blind}+!{Down}
    Return
}

} Else { if getkeystate("shift") = 0 { if GetKeyState("alt")=0 MouseMove, 0, +100, 0, R Return } Else { if GetKeyState("alt")=0 MouseMove, 0, +10, 0, R Return } }

but now , how can i get this function, when i press numlock + shift+ j to down select mutiple lines? just like this image

BlueDrink9 commented 3 years ago

Are you using the two exes? Other than those, the next best solution is using send ^down. Doesn't have the same behavior but seems to work where send down doesn't.

snsnsjsn commented 3 years ago

Are you using the two exes? Other than those, the next best solution is using send ^down. Doesn't have the same behavior but seems to work where send down doesn't.

yes , now if i need numlock + j can move cursor down from different line, i must use exe , but i could not use exe combinate numlock and shift and j to select mutiple lines .

if i press numlock + shift + j, it just move down the cursor , not select . just like numlock + j , so how can i get shift fuction?

BlueDrink9 commented 3 years ago

I'm sorry, I don't understand what you are asking. Perhaps it is a question better served for more general AHK forums

snsnsjsn commented 3 years ago

here is screen recorder to see what i describe

ahkonenotegithub

BlueDrink9 commented 3 years ago

Are you using the scripts in this repository? Or are you using your own? By default AHK doesn't combine modifiers (like shift) with existing shortcuts. You would have to create an additional shortcut that includes shift. There are several AHK forums that discuss this.

snsnsjsn commented 3 years ago

Are you using the scripts in this repository? Or are you using your own? By default AHK doesn't combine modifiers (like shift) with existing shortcuts. You would have to create an additional shortcut that includes shift. There are several AHK forums that discuss this.

yes i use my own shift ,but not work , i don't know how to combine the shift key with the fuction j() call the SendDown.exe

my own shift code is like this

`#if WinActive("ahk_exe" "ONENOTE.EXE") j(){ run %A_ScriptDir%\sendDown.exe } k(){ run %A_ScriptDir%\sendUp.exe } NumLock & j::j() return NumLock & k::k() return

if`

and my shift key script is here NumLock & j:: if GetKeyState("Tab")=0 { if getkeystate("shift") = 0 { if GetKeyState("alt")=0 Send, {Blind}{Down} else Send, {Blind}!{Down} Return } Else { if GetKeyState("alt")=0 Send, {Blind}+{Down} else Send, {Blind}+!{Down} Return } } Else { if getkeystate("shift") = 0 { if GetKeyState("alt")=0 MouseMove, 0, +100, 0, R Return } Else { if GetKeyState("alt")=0 MouseMove, 0, +10, 0, R Return } } how can i combine the shift plus j() fucntion? this is not work for me NumLock & j:: if GetKeyState("shift")=0 j() Else +j() Return NumLock & k:: if GetKeyState("shift")=0 k() Else +k() Return

BlueDrink9 commented 3 years ago

I'm sorry, this isn't a general purpose support forum. This is specific to this repo. Your code is formatted poorly and I don't understand your questions beyond the help I have already given you. You will have to ask on more general AHK support forums if you need more help.