-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Launch a program at the current desktop #15
Comments
let me rephrase / did I understand correctly ? context: |
if OneNote is changing your virtual desktop, I can't prevent it though it is pretty much impossible since Start is by PID, a PID can have 2 windows, |
Ha, to clarify, here are two things I had in mind when opening this issue:
Towards the end of your most recent post, it looks like you found a way to identify the new OneNote window? That's great! |
thanks for the use cases 1. and 2., allows me to write functions based on use case, instead of functionality : Launch a program at the current desktop, which I would optimize wrongly, idk, maybe it's even better to have both functionality and use case @llinfeng run in VD.ahk, run in VD lock.ahk, I used https://chris.dziemborowicz.com/apps/hourglass/ to test, you should test using OneNote (which I didn't want to install) |
@FuPeiJiang I tested the syntax in
For this "OneNote for Windows 10" app, nope, all windows were opened in the current virtual desktop, with nothing forwarded to the intended destination. Here is the window information for those OneNote windows in case it may help us get dispatched to the intended VD.
|
it's to launch a new window in VD 2, and set focus at VD 3
Line 680 in c2a7e4b
for OneNote
can you send me full script that didn't work ? if you did it like this, I don't think it will work
from where can I install your version of OneNote ? |
To make the variable names self-explanatory, how about Here is the full script that opened four OneNote windows in the current desktop. These UWP apps are hard to run direclty through Folded script
And, yes, the OneNote app I use most often is the free one from the Microsoft Store as you linked. It does the best job of syncing, where the thing from Office subscription would run into sync issues very frequently for me. Here is another script where I was trying to see if I can dispatch 4 Folded script
Per its current state, |
VD.ahk/other examples/run in VD lock.ahk Lines 11 to 18 in 7b57051
this is the best I could do.. remember to update branch https://github.com/FuPeiJiang/VD.ahk/tree/run_in_VD before running |
Fantastic. The example you give works great. It is very thoughtful that you switch to VD1 and launch the first OneNote window there. Question: what does |
@FuPeiJiang Will you merge these back to the main branch? I assume it is It is a great pleasure to find this repo, and I'm planning to stay up-to-date as much as I can :) |
Motivation: The OneNote for Windows 10 windows are not managed by the Task View thing properly - if I have two Virtual Desktops (VD1 and VD2), with have one OneNote window opened in VD1, all new OneNote windows should open in VD1. That is, if I were at VD2 and try to start a new window of OneNote, VD1 is activated and the new OneNote window is started there. I cannot tell whether the new OneNote window starts first, or the switch of VD.
This behavior won't change whether I open OneNote through the Start menu, or using AHK's
run
command.A tentative solution is to have a
VD.run("exe_path", "VD_num")
function that directly starts something at the numbered virtual desktop. If the second argument is left empty, theVD.run
command makes sure the program is launched in the current desktop.As a side note, it also helps to have a function called
VD.goToPreviousDesktop()
. (Please let me know if this should be documented in a separate issue.) In a similar vein, based on what we have, it may also help to allow for arguments that move a window to the left/right.VD.MoveWindowToDesktopNum("A","+1")
, andVD.MoveWindowToDesktopNum("A","-1")
The text was updated successfully, but these errors were encountered: