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 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.
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:\Dir\program1.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:\Dir\program2.exe" WinWait, ahk_exe program2.exe WinMove, ahk_exe program2.exe,, -7, 61, 813, 516 TrayTip, openfrequentlyusedapps, ok, 1,
- 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
- 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