AUTOHOTKEY | WinMove | Virtual Desktop of choice











up vote
0
down vote

favorite













UPDATED-STATEMENT: 20181118@205016@SUN A suggestion was made to manually focus the Virtual Desktop of my choice, but this eliminates me from doing other tasks on another Virtual Desktop. Still waiting for a valid take-care-ofitself solution.
UPDATED-STATEMENT: 20181118@210851@SUN There is no way autohotkey can work with moving apps to a specific Virtual Desktop on it's own without dll-calls (*see below*). In other words, the use of dll-files is required for the time being that is Windows language and not as convenient as an ahk-statement. Who knows, maybe ahk can implement this function someday to keep it lightweight and add it to their statement-library.



SPECIFICATION:
win10_1803_17134.407
autohotkeyahk_1.1.30.00_20180822



Speed is everything if it does affect you sitting on your chair in front of a computer screen.




WHY I USE AHK



Using Autohotkey in Windows 10 to open up frequently used apps which will not duplicate opening up a program if it has already launched (IfWinNotExist). Then, move them to where I prefer each app to be (WinMove). I have set a timer (Sleep) because some apps open up slower than others (I would be interested to know if there is a better way to do this). I like ahk for how lightweight it is, but there's Windows 10 related functions that aren't documented from them like Virtual Desktop involvement.



PROBLEM



Problem is that there isn't a way to use WinMove for specifying a Virtual Desktop for win10 to launch an application in. So I struggle running my frequentlyusedapps-script and going into another Virtual Desktop to open up other apps simultaneously. This is because what ever Virtual Desktop i'm focusing on is what my frequentlyusedapps-script will move the window to.



QUESTION



How to have autohotkey move an application to a Virtual Desktop of my choice? I don't think it's possible with ahk-WinMove If the virtualdesktop-number isn't created then the script will obviously fail to move the app, but this isn't my focus just yet. I could otherwise create the appropriate number of Virtual Desktops prior to launching my frequentlyusedapps-script. What I mean by having a way for ahk to achieve this is to be pure ahk code and not fork/branch that will probably be not updated for the unfortunate reasons. If it does have to come from a branched project then let's discuss what ahk elements they're using to involve Virtual Desktop to move windows to a specific one.




!^+o::
IfWinNotExist, ahk_exe program1.exe
Run "C:Dirprogram1.exe"
WinWait, ahk_exe program1.exe
WinMove, ahk_exe program1.exe,, 953, 61, 967, 1019
TrayTip, openfrequentlyusedapps, ok, 1,
IfWinNotExist, ahk_exe program2.exe
Run "C:Dirprogram2.exe"
WinWait, ahk_exe program2.exe
WinMove, ahk_exe program2.exe,, -7, 61, 813, 516
TrayTip, openfrequentlyusedapps, ok, 1,


SOLUTION




  • As per @miroxlav, "there is no way Autohotkey can do this with their current statements." Although not impossible, but requires more effort as it's now Windows language is using ahk w/ dll-calls.


    • It would help a lot of someone is able to show how this even works





NOTE


  • What is Virtual Desktop?

  • What is autohotkey?

  • What hotkeys can I use with ahk?

  • What is ahk-WinExist or IfWinNotExist?

  • What is ahk-Sleep?

  • What is ahk-WinMove?

  • Why use ahk-Sleep over ahk-WinWait to not do a single action until an app has been opened and ready to move via WinMove?


    • Good question as I wasn't aware, but i'm using WinWait now and it's so much more efficient












share|improve this question




















  • 1




    Try github.com/sdias/win-10-virtual-desktop-enhancer
    – user3419297
    2 days ago






  • 1




    I wanted to stick with the roots of ahk and not a branch away from it's core (due to branding). What do you think this yet another enhancer uses to move windows to another desktop? Because I noticed the use of dll-files which isn't lightweight anymore.
    – fohrums
    2 days ago












  • What's wrong with using dll-files to facilitate or even make possible the execution of tasks if they come from a secure site?. No program can execute all its functions and various features using its own modules or resources. And dll-files are files that contains specific code that many installed programs use and share.
    – user3419297
    yesterday










  • How do you even know those dll-files online are even secured? If getting dll-files from another software, then that only means you have to have the software which is impossible to obtain if you don't have it in the first place especially if you don't have internet at the time being. I really meant it when I talked about using ahk and it being "lightweight". I just need help on using dll-calls and what dll-files are required as dependencies to move windows to a specific virtual desktop.
    – fohrums
    yesterday















up vote
0
down vote

favorite













UPDATED-STATEMENT: 20181118@205016@SUN A suggestion was made to manually focus the Virtual Desktop of my choice, but this eliminates me from doing other tasks on another Virtual Desktop. Still waiting for a valid take-care-ofitself solution.
UPDATED-STATEMENT: 20181118@210851@SUN There is no way autohotkey can work with moving apps to a specific Virtual Desktop on it's own without dll-calls (*see below*). In other words, the use of dll-files is required for the time being that is Windows language and not as convenient as an ahk-statement. Who knows, maybe ahk can implement this function someday to keep it lightweight and add it to their statement-library.



SPECIFICATION:
win10_1803_17134.407
autohotkeyahk_1.1.30.00_20180822



Speed is everything if it does affect you sitting on your chair in front of a computer screen.




WHY I USE AHK



Using Autohotkey in Windows 10 to open up frequently used apps which will not duplicate opening up a program if it has already launched (IfWinNotExist). Then, move them to where I prefer each app to be (WinMove). I have set a timer (Sleep) because some apps open up slower than others (I would be interested to know if there is a better way to do this). I like ahk for how lightweight it is, but there's Windows 10 related functions that aren't documented from them like Virtual Desktop involvement.



PROBLEM



Problem is that there isn't a way to use WinMove for specifying a Virtual Desktop for win10 to launch an application in. So I struggle running my frequentlyusedapps-script and going into another Virtual Desktop to open up other apps simultaneously. This is because what ever Virtual Desktop i'm focusing on is what my frequentlyusedapps-script will move the window to.



QUESTION



How to have autohotkey move an application to a Virtual Desktop of my choice? I don't think it's possible with ahk-WinMove If the virtualdesktop-number isn't created then the script will obviously fail to move the app, but this isn't my focus just yet. I could otherwise create the appropriate number of Virtual Desktops prior to launching my frequentlyusedapps-script. What I mean by having a way for ahk to achieve this is to be pure ahk code and not fork/branch that will probably be not updated for the unfortunate reasons. If it does have to come from a branched project then let's discuss what ahk elements they're using to involve Virtual Desktop to move windows to a specific one.




!^+o::
IfWinNotExist, ahk_exe program1.exe
Run "C:Dirprogram1.exe"
WinWait, ahk_exe program1.exe
WinMove, ahk_exe program1.exe,, 953, 61, 967, 1019
TrayTip, openfrequentlyusedapps, ok, 1,
IfWinNotExist, ahk_exe program2.exe
Run "C:Dirprogram2.exe"
WinWait, ahk_exe program2.exe
WinMove, ahk_exe program2.exe,, -7, 61, 813, 516
TrayTip, openfrequentlyusedapps, ok, 1,


SOLUTION




  • As per @miroxlav, "there is no way Autohotkey can do this with their current statements." Although not impossible, but requires more effort as it's now Windows language is using ahk w/ dll-calls.


    • It would help a lot of someone is able to show how this even works





NOTE


  • What is Virtual Desktop?

  • What is autohotkey?

  • What hotkeys can I use with ahk?

  • What is ahk-WinExist or IfWinNotExist?

  • What is ahk-Sleep?

  • What is ahk-WinMove?

  • Why use ahk-Sleep over ahk-WinWait to not do a single action until an app has been opened and ready to move via WinMove?


    • Good question as I wasn't aware, but i'm using WinWait now and it's so much more efficient












share|improve this question




















  • 1




    Try github.com/sdias/win-10-virtual-desktop-enhancer
    – user3419297
    2 days ago






  • 1




    I wanted to stick with the roots of ahk and not a branch away from it's core (due to branding). What do you think this yet another enhancer uses to move windows to another desktop? Because I noticed the use of dll-files which isn't lightweight anymore.
    – fohrums
    2 days ago












  • What's wrong with using dll-files to facilitate or even make possible the execution of tasks if they come from a secure site?. No program can execute all its functions and various features using its own modules or resources. And dll-files are files that contains specific code that many installed programs use and share.
    – user3419297
    yesterday










  • How do you even know those dll-files online are even secured? If getting dll-files from another software, then that only means you have to have the software which is impossible to obtain if you don't have it in the first place especially if you don't have internet at the time being. I really meant it when I talked about using ahk and it being "lightweight". I just need help on using dll-calls and what dll-files are required as dependencies to move windows to a specific virtual desktop.
    – fohrums
    yesterday













up vote
0
down vote

favorite









up vote
0
down vote

favorite












UPDATED-STATEMENT: 20181118@205016@SUN A suggestion was made to manually focus the Virtual Desktop of my choice, but this eliminates me from doing other tasks on another Virtual Desktop. Still waiting for a valid take-care-ofitself solution.
UPDATED-STATEMENT: 20181118@210851@SUN There is no way autohotkey can work with moving apps to a specific Virtual Desktop on it's own without dll-calls (*see below*). In other words, the use of dll-files is required for the time being that is Windows language and not as convenient as an ahk-statement. Who knows, maybe ahk can implement this function someday to keep it lightweight and add it to their statement-library.



SPECIFICATION:
win10_1803_17134.407
autohotkeyahk_1.1.30.00_20180822



Speed is everything if it does affect you sitting on your chair in front of a computer screen.




WHY I USE AHK



Using Autohotkey in Windows 10 to open up frequently used apps which will not duplicate opening up a program if it has already launched (IfWinNotExist). Then, move them to where I prefer each app to be (WinMove). I have set a timer (Sleep) because some apps open up slower than others (I would be interested to know if there is a better way to do this). I like ahk for how lightweight it is, but there's Windows 10 related functions that aren't documented from them like Virtual Desktop involvement.



PROBLEM



Problem is that there isn't a way to use WinMove for specifying a Virtual Desktop for win10 to launch an application in. So I struggle running my frequentlyusedapps-script and going into another Virtual Desktop to open up other apps simultaneously. This is because what ever Virtual Desktop i'm focusing on is what my frequentlyusedapps-script will move the window to.



QUESTION



How to have autohotkey move an application to a Virtual Desktop of my choice? I don't think it's possible with ahk-WinMove If the virtualdesktop-number isn't created then the script will obviously fail to move the app, but this isn't my focus just yet. I could otherwise create the appropriate number of Virtual Desktops prior to launching my frequentlyusedapps-script. What I mean by having a way for ahk to achieve this is to be pure ahk code and not fork/branch that will probably be not updated for the unfortunate reasons. If it does have to come from a branched project then let's discuss what ahk elements they're using to involve Virtual Desktop to move windows to a specific one.




!^+o::
IfWinNotExist, ahk_exe program1.exe
Run "C:Dirprogram1.exe"
WinWait, ahk_exe program1.exe
WinMove, ahk_exe program1.exe,, 953, 61, 967, 1019
TrayTip, openfrequentlyusedapps, ok, 1,
IfWinNotExist, ahk_exe program2.exe
Run "C:Dirprogram2.exe"
WinWait, ahk_exe program2.exe
WinMove, ahk_exe program2.exe,, -7, 61, 813, 516
TrayTip, openfrequentlyusedapps, ok, 1,


SOLUTION




  • As per @miroxlav, "there is no way Autohotkey can do this with their current statements." Although not impossible, but requires more effort as it's now Windows language is using ahk w/ dll-calls.


    • It would help a lot of someone is able to show how this even works





NOTE


  • What is Virtual Desktop?

  • What is autohotkey?

  • What hotkeys can I use with ahk?

  • What is ahk-WinExist or IfWinNotExist?

  • What is ahk-Sleep?

  • What is ahk-WinMove?

  • Why use ahk-Sleep over ahk-WinWait to not do a single action until an app has been opened and ready to move via WinMove?


    • Good question as I wasn't aware, but i'm using WinWait now and it's so much more efficient












share|improve this question
















UPDATED-STATEMENT: 20181118@205016@SUN A suggestion was made to manually focus the Virtual Desktop of my choice, but this eliminates me from doing other tasks on another Virtual Desktop. Still waiting for a valid take-care-ofitself solution.
UPDATED-STATEMENT: 20181118@210851@SUN There is no way autohotkey can work with moving apps to a specific Virtual Desktop on it's own without dll-calls (*see below*). In other words, the use of dll-files is required for the time being that is Windows language and not as convenient as an ahk-statement. Who knows, maybe ahk can implement this function someday to keep it lightweight and add it to their statement-library.



SPECIFICATION:
win10_1803_17134.407
autohotkeyahk_1.1.30.00_20180822



Speed is everything if it does affect you sitting on your chair in front of a computer screen.




WHY I USE AHK



Using Autohotkey in Windows 10 to open up frequently used apps which will not duplicate opening up a program if it has already launched (IfWinNotExist). Then, move them to where I prefer each app to be (WinMove). I have set a timer (Sleep) because some apps open up slower than others (I would be interested to know if there is a better way to do this). I like ahk for how lightweight it is, but there's Windows 10 related functions that aren't documented from them like Virtual Desktop involvement.



PROBLEM



Problem is that there isn't a way to use WinMove for specifying a Virtual Desktop for win10 to launch an application in. So I struggle running my frequentlyusedapps-script and going into another Virtual Desktop to open up other apps simultaneously. This is because what ever Virtual Desktop i'm focusing on is what my frequentlyusedapps-script will move the window to.



QUESTION



How to have autohotkey move an application to a Virtual Desktop of my choice? I don't think it's possible with ahk-WinMove If the virtualdesktop-number isn't created then the script will obviously fail to move the app, but this isn't my focus just yet. I could otherwise create the appropriate number of Virtual Desktops prior to launching my frequentlyusedapps-script. What I mean by having a way for ahk to achieve this is to be pure ahk code and not fork/branch that will probably be not updated for the unfortunate reasons. If it does have to come from a branched project then let's discuss what ahk elements they're using to involve Virtual Desktop to move windows to a specific one.




!^+o::
IfWinNotExist, ahk_exe program1.exe
Run "C:Dirprogram1.exe"
WinWait, ahk_exe program1.exe
WinMove, ahk_exe program1.exe,, 953, 61, 967, 1019
TrayTip, openfrequentlyusedapps, ok, 1,
IfWinNotExist, ahk_exe program2.exe
Run "C:Dirprogram2.exe"
WinWait, ahk_exe program2.exe
WinMove, ahk_exe program2.exe,, -7, 61, 813, 516
TrayTip, openfrequentlyusedapps, ok, 1,


SOLUTION




  • As per @miroxlav, "there is no way Autohotkey can do this with their current statements." Although not impossible, but requires more effort as it's now Windows language is using ahk w/ dll-calls.


    • It would help a lot of someone is able to show how this even works





NOTE


  • What is Virtual Desktop?

  • What is autohotkey?

  • What hotkeys can I use with ahk?

  • What is ahk-WinExist or IfWinNotExist?

  • What is ahk-Sleep?

  • What is ahk-WinMove?

  • Why use ahk-Sleep over ahk-WinWait to not do a single action until an app has been opened and ready to move via WinMove?


    • Good question as I wasn't aware, but i'm using WinWait now and it's so much more efficient









windows-10 autohotkey virtual-desktop






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday

























asked 2 days ago









fohrums

76311




76311








  • 1




    Try github.com/sdias/win-10-virtual-desktop-enhancer
    – user3419297
    2 days ago






  • 1




    I wanted to stick with the roots of ahk and not a branch away from it's core (due to branding). What do you think this yet another enhancer uses to move windows to another desktop? Because I noticed the use of dll-files which isn't lightweight anymore.
    – fohrums
    2 days ago












  • What's wrong with using dll-files to facilitate or even make possible the execution of tasks if they come from a secure site?. No program can execute all its functions and various features using its own modules or resources. And dll-files are files that contains specific code that many installed programs use and share.
    – user3419297
    yesterday










  • How do you even know those dll-files online are even secured? If getting dll-files from another software, then that only means you have to have the software which is impossible to obtain if you don't have it in the first place especially if you don't have internet at the time being. I really meant it when I talked about using ahk and it being "lightweight". I just need help on using dll-calls and what dll-files are required as dependencies to move windows to a specific virtual desktop.
    – fohrums
    yesterday














  • 1




    Try github.com/sdias/win-10-virtual-desktop-enhancer
    – user3419297
    2 days ago






  • 1




    I wanted to stick with the roots of ahk and not a branch away from it's core (due to branding). What do you think this yet another enhancer uses to move windows to another desktop? Because I noticed the use of dll-files which isn't lightweight anymore.
    – fohrums
    2 days ago












  • What's wrong with using dll-files to facilitate or even make possible the execution of tasks if they come from a secure site?. No program can execute all its functions and various features using its own modules or resources. And dll-files are files that contains specific code that many installed programs use and share.
    – user3419297
    yesterday










  • How do you even know those dll-files online are even secured? If getting dll-files from another software, then that only means you have to have the software which is impossible to obtain if you don't have it in the first place especially if you don't have internet at the time being. I really meant it when I talked about using ahk and it being "lightweight". I just need help on using dll-calls and what dll-files are required as dependencies to move windows to a specific virtual desktop.
    – fohrums
    yesterday








1




1




Try github.com/sdias/win-10-virtual-desktop-enhancer
– user3419297
2 days ago




Try github.com/sdias/win-10-virtual-desktop-enhancer
– user3419297
2 days ago




1




1




I wanted to stick with the roots of ahk and not a branch away from it's core (due to branding). What do you think this yet another enhancer uses to move windows to another desktop? Because I noticed the use of dll-files which isn't lightweight anymore.
– fohrums
2 days ago






I wanted to stick with the roots of ahk and not a branch away from it's core (due to branding). What do you think this yet another enhancer uses to move windows to another desktop? Because I noticed the use of dll-files which isn't lightweight anymore.
– fohrums
2 days ago














What's wrong with using dll-files to facilitate or even make possible the execution of tasks if they come from a secure site?. No program can execute all its functions and various features using its own modules or resources. And dll-files are files that contains specific code that many installed programs use and share.
– user3419297
yesterday




What's wrong with using dll-files to facilitate or even make possible the execution of tasks if they come from a secure site?. No program can execute all its functions and various features using its own modules or resources. And dll-files are files that contains specific code that many installed programs use and share.
– user3419297
yesterday












How do you even know those dll-files online are even secured? If getting dll-files from another software, then that only means you have to have the software which is impossible to obtain if you don't have it in the first place especially if you don't have internet at the time being. I really meant it when I talked about using ahk and it being "lightweight". I just need help on using dll-calls and what dll-files are required as dependencies to move windows to a specific virtual desktop.
– fohrums
yesterday




How do you even know those dll-files online are even secured? If getting dll-files from another software, then that only means you have to have the software which is impossible to obtain if you don't have it in the first place especially if you don't have internet at the time being. I really meant it when I talked about using ahk and it being "lightweight". I just need help on using dll-calls and what dll-files are required as dependencies to move windows to a specific virtual desktop.
– fohrums
yesterday










1 Answer
1






active

oldest

votes

















up vote
1
down vote













Go with keyboard shortcuts.



Inside the script, when you sequentially start your apps, in the middle of your sequence simply switch to the next desktop by sending Ctrl+Win+:



;here you run and position your windows
Run app1
Move app1 'etc.
WinWait app1window 'wait until app window is open

;switch to next desktop* (see note below the code)
Send ^#{Right}

;opening apps on next desktop
Run app2
Move app2 'etc.


*) If you do not have that "next desktop" prepared at the time, send Ctrl+Alt+D instead to create and open it.



For more, see section Virtual desktops keyboard shortcuts in the official list of Windows keyboard shortcuts.





Update:



Functionality regarding other desktops as you request it is currently not present directly in AHK statements. You may be able to achieve it by using DLL calls from within the AHK.






share|improve this answer























  • That's an action after an action which only means I still have to be focused on the desktop I want the windows to so happen to land in once opened. This eliminates me from going into another virtual desktop simultaneously to do other tasks while I wait for slow apps to launch (but, thanks for letting me know about ahk-WinWait so I replaced ahk-Sleep with it instead).
    – fohrums
    yesterday










  • That's not a problem for me I don't know why it would be. Virtual Desktop is marvelous for being able to simulate working on multiple computers but using just a single rig. I don't know the limit of how many is workable, but I then would use another Virtual Desktop to continue opening up other apps. I hope this answers you're concern.
    – fohrums
    yesterday










  • Thanks for the help @miroxlav, I just needed to know that. I thought there was some hidden command that I had to dig up in order to achieve this, but it looks like it's farily new. I imagine AHK could make this possible some day as Windows 10 has been released for over 3-yrs now. Virtual Desktop doesn't seem like it's going to go away anytime soon so it's good I began this topic.
    – fohrums
    yesterday













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376182%2fautohotkey-winmove-virtual-desktop-of-choice%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













Go with keyboard shortcuts.



Inside the script, when you sequentially start your apps, in the middle of your sequence simply switch to the next desktop by sending Ctrl+Win+:



;here you run and position your windows
Run app1
Move app1 'etc.
WinWait app1window 'wait until app window is open

;switch to next desktop* (see note below the code)
Send ^#{Right}

;opening apps on next desktop
Run app2
Move app2 'etc.


*) If you do not have that "next desktop" prepared at the time, send Ctrl+Alt+D instead to create and open it.



For more, see section Virtual desktops keyboard shortcuts in the official list of Windows keyboard shortcuts.





Update:



Functionality regarding other desktops as you request it is currently not present directly in AHK statements. You may be able to achieve it by using DLL calls from within the AHK.






share|improve this answer























  • That's an action after an action which only means I still have to be focused on the desktop I want the windows to so happen to land in once opened. This eliminates me from going into another virtual desktop simultaneously to do other tasks while I wait for slow apps to launch (but, thanks for letting me know about ahk-WinWait so I replaced ahk-Sleep with it instead).
    – fohrums
    yesterday










  • That's not a problem for me I don't know why it would be. Virtual Desktop is marvelous for being able to simulate working on multiple computers but using just a single rig. I don't know the limit of how many is workable, but I then would use another Virtual Desktop to continue opening up other apps. I hope this answers you're concern.
    – fohrums
    yesterday










  • Thanks for the help @miroxlav, I just needed to know that. I thought there was some hidden command that I had to dig up in order to achieve this, but it looks like it's farily new. I imagine AHK could make this possible some day as Windows 10 has been released for over 3-yrs now. Virtual Desktop doesn't seem like it's going to go away anytime soon so it's good I began this topic.
    – fohrums
    yesterday

















up vote
1
down vote













Go with keyboard shortcuts.



Inside the script, when you sequentially start your apps, in the middle of your sequence simply switch to the next desktop by sending Ctrl+Win+:



;here you run and position your windows
Run app1
Move app1 'etc.
WinWait app1window 'wait until app window is open

;switch to next desktop* (see note below the code)
Send ^#{Right}

;opening apps on next desktop
Run app2
Move app2 'etc.


*) If you do not have that "next desktop" prepared at the time, send Ctrl+Alt+D instead to create and open it.



For more, see section Virtual desktops keyboard shortcuts in the official list of Windows keyboard shortcuts.





Update:



Functionality regarding other desktops as you request it is currently not present directly in AHK statements. You may be able to achieve it by using DLL calls from within the AHK.






share|improve this answer























  • That's an action after an action which only means I still have to be focused on the desktop I want the windows to so happen to land in once opened. This eliminates me from going into another virtual desktop simultaneously to do other tasks while I wait for slow apps to launch (but, thanks for letting me know about ahk-WinWait so I replaced ahk-Sleep with it instead).
    – fohrums
    yesterday










  • That's not a problem for me I don't know why it would be. Virtual Desktop is marvelous for being able to simulate working on multiple computers but using just a single rig. I don't know the limit of how many is workable, but I then would use another Virtual Desktop to continue opening up other apps. I hope this answers you're concern.
    – fohrums
    yesterday










  • Thanks for the help @miroxlav, I just needed to know that. I thought there was some hidden command that I had to dig up in order to achieve this, but it looks like it's farily new. I imagine AHK could make this possible some day as Windows 10 has been released for over 3-yrs now. Virtual Desktop doesn't seem like it's going to go away anytime soon so it's good I began this topic.
    – fohrums
    yesterday















up vote
1
down vote










up vote
1
down vote









Go with keyboard shortcuts.



Inside the script, when you sequentially start your apps, in the middle of your sequence simply switch to the next desktop by sending Ctrl+Win+:



;here you run and position your windows
Run app1
Move app1 'etc.
WinWait app1window 'wait until app window is open

;switch to next desktop* (see note below the code)
Send ^#{Right}

;opening apps on next desktop
Run app2
Move app2 'etc.


*) If you do not have that "next desktop" prepared at the time, send Ctrl+Alt+D instead to create and open it.



For more, see section Virtual desktops keyboard shortcuts in the official list of Windows keyboard shortcuts.





Update:



Functionality regarding other desktops as you request it is currently not present directly in AHK statements. You may be able to achieve it by using DLL calls from within the AHK.






share|improve this answer














Go with keyboard shortcuts.



Inside the script, when you sequentially start your apps, in the middle of your sequence simply switch to the next desktop by sending Ctrl+Win+:



;here you run and position your windows
Run app1
Move app1 'etc.
WinWait app1window 'wait until app window is open

;switch to next desktop* (see note below the code)
Send ^#{Right}

;opening apps on next desktop
Run app2
Move app2 'etc.


*) If you do not have that "next desktop" prepared at the time, send Ctrl+Alt+D instead to create and open it.



For more, see section Virtual desktops keyboard shortcuts in the official list of Windows keyboard shortcuts.





Update:



Functionality regarding other desktops as you request it is currently not present directly in AHK statements. You may be able to achieve it by using DLL calls from within the AHK.







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered yesterday









miroxlav

6,85842363




6,85842363












  • That's an action after an action which only means I still have to be focused on the desktop I want the windows to so happen to land in once opened. This eliminates me from going into another virtual desktop simultaneously to do other tasks while I wait for slow apps to launch (but, thanks for letting me know about ahk-WinWait so I replaced ahk-Sleep with it instead).
    – fohrums
    yesterday










  • That's not a problem for me I don't know why it would be. Virtual Desktop is marvelous for being able to simulate working on multiple computers but using just a single rig. I don't know the limit of how many is workable, but I then would use another Virtual Desktop to continue opening up other apps. I hope this answers you're concern.
    – fohrums
    yesterday










  • Thanks for the help @miroxlav, I just needed to know that. I thought there was some hidden command that I had to dig up in order to achieve this, but it looks like it's farily new. I imagine AHK could make this possible some day as Windows 10 has been released for over 3-yrs now. Virtual Desktop doesn't seem like it's going to go away anytime soon so it's good I began this topic.
    – fohrums
    yesterday




















  • That's an action after an action which only means I still have to be focused on the desktop I want the windows to so happen to land in once opened. This eliminates me from going into another virtual desktop simultaneously to do other tasks while I wait for slow apps to launch (but, thanks for letting me know about ahk-WinWait so I replaced ahk-Sleep with it instead).
    – fohrums
    yesterday










  • That's not a problem for me I don't know why it would be. Virtual Desktop is marvelous for being able to simulate working on multiple computers but using just a single rig. I don't know the limit of how many is workable, but I then would use another Virtual Desktop to continue opening up other apps. I hope this answers you're concern.
    – fohrums
    yesterday










  • Thanks for the help @miroxlav, I just needed to know that. I thought there was some hidden command that I had to dig up in order to achieve this, but it looks like it's farily new. I imagine AHK could make this possible some day as Windows 10 has been released for over 3-yrs now. Virtual Desktop doesn't seem like it's going to go away anytime soon so it's good I began this topic.
    – fohrums
    yesterday


















That's an action after an action which only means I still have to be focused on the desktop I want the windows to so happen to land in once opened. This eliminates me from going into another virtual desktop simultaneously to do other tasks while I wait for slow apps to launch (but, thanks for letting me know about ahk-WinWait so I replaced ahk-Sleep with it instead).
– fohrums
yesterday




That's an action after an action which only means I still have to be focused on the desktop I want the windows to so happen to land in once opened. This eliminates me from going into another virtual desktop simultaneously to do other tasks while I wait for slow apps to launch (but, thanks for letting me know about ahk-WinWait so I replaced ahk-Sleep with it instead).
– fohrums
yesterday












That's not a problem for me I don't know why it would be. Virtual Desktop is marvelous for being able to simulate working on multiple computers but using just a single rig. I don't know the limit of how many is workable, but I then would use another Virtual Desktop to continue opening up other apps. I hope this answers you're concern.
– fohrums
yesterday




That's not a problem for me I don't know why it would be. Virtual Desktop is marvelous for being able to simulate working on multiple computers but using just a single rig. I don't know the limit of how many is workable, but I then would use another Virtual Desktop to continue opening up other apps. I hope this answers you're concern.
– fohrums
yesterday












Thanks for the help @miroxlav, I just needed to know that. I thought there was some hidden command that I had to dig up in order to achieve this, but it looks like it's farily new. I imagine AHK could make this possible some day as Windows 10 has been released for over 3-yrs now. Virtual Desktop doesn't seem like it's going to go away anytime soon so it's good I began this topic.
– fohrums
yesterday






Thanks for the help @miroxlav, I just needed to know that. I thought there was some hidden command that I had to dig up in order to achieve this, but it looks like it's farily new. I imagine AHK could make this possible some day as Windows 10 has been released for over 3-yrs now. Virtual Desktop doesn't seem like it's going to go away anytime soon so it's good I began this topic.
– fohrums
yesterday




















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376182%2fautohotkey-winmove-virtual-desktop-of-choice%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕