![]() This is because what ever Virtual Desktop i'm focusing on is what my frequentlyusedapps-script will move the window to. So I struggle running my frequentlyusedapps-script and going into another Virtual Desktop to open up other apps simultaneously. ![]() Problem is that there isn't a way to use WinMove for specifying a Virtual Desktop for win10 to launch an application in. 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. 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). Then, move them to where I prefer each app to be ( WinMove). 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). Virtual Desktops doesn't make navigation any easier, perhaps the clear view of the wallpaper will be enjoyed by some, but not me. UPDATED-TATEMENT: suggested sdias-win10virtualdesktopenhancer as a way to manage windows and virtual desktops.Īfter the 5-month idle time for this topic i've now stopped using virtual desktops. Who knows, maybe ahk can implement this function someday to keep it lightweight and add it to their statement-library. 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. UPDATED-STATEMENT: There is no way autohotkey can work with moving apps to a specific Virtual Desktop on it's own without dll-calls (*see below*). ![]() Still waiting for a valid take-care-ofitself solution. With this script, Cleaner is launched, after you close all Firefox instances (via the gosub) or whenever you hit your 'windows key and y' (or whatever hotkey you like).UPDATED-STATEMENT: 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. Of course, you could change these conditions in the script to whatever you want.īut to trigger the CCleaner section, whenever you want, you may add a hotkey (see ) at the end of your script. To trigger CCleaner, just all Firefox windows need to be closed - but at least one had to be existed before that, to trigger the WinWait. So opening "a new tab before I close Firefox to trigger the script" doesn't affect the WinWaitClose at all. Therefore CCleaner will never be launched, if any Firefox is still open. In these cases, you would use one of the wintitle alternatives you can study at ).īut because of the WinWaitClose, your script will wait until all windows that have 'Mozilla Firefox' in its title, are closed. (In theory, the condition for the window title could also be true, if you would open, for example, a textfile called "mozilla firefox.txt" in Notepad. So any open Firefox window will work, no matter which tab is selected. That seems to be generally true for all Firefox windows, even on a blank one. The window title of firefox you can see in the taskbar (it may be truncated there, but 'Mozilla Firefox' seems to be always at the end). Winwait waits for any window to exist that contains the words 'Mozilla Firefox' somewhere in its title ( somewhere because of SetTitlematchmode,2). Perhaps someone else comes up with a solution in the meantime. but I am no specialist in that field, anyway. I might have time to take a look at the program later. But that wouldn't be just one line in your script. You might be able to automate the normal window mode of privazer, though. I have googled, but so far, the Privazer developpers only seem to plan command line support for the future (although this info is a few months old). ![]() Sorry, I haven't used Privazer yet, but if you want to run it the background, you probably would have to look for 'command line mode' there, something like the /Auto switch for CCleaner. Run, "C:\Program Files\CCleaner\CCleaner.exe /Auto" If you have problems, you could try double quotes: Run, C:\Program Files\CCleaner\CCleaner.exe /Auto works for me. I guess, without that, this script is not very useful. _Edit:_ By the way, you left out the /Auto switch for CCleaner in your script. Take a look at the docs, especially for 'Winwait' and 'SetTitleMatchMode'. Run, C:\Program Files\CCleaner\CCleaner.exe WinWaitClose Wait for Mozilla Firefox to close Run, C:\Program Files (x86)\Mozilla Firefox\firefox.exe So your script is stuck there and WinWait and everything after it, never executes. Since you didn't include "SetTitleMatchMode,2" in your script, Winwait will probably wait forever for a window which has a title that exactly starts with " – Mozilla Firefox". Or you get something like "Google - Mozilla Firefox" when you have Google as a start page, for instance. When I start a new Firefox instance, the title of the new window is just "Mozilla Firefox", when started with an empty tab.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |