Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5.  
  6. ; Start VM
  7. SetTitleMatchMode, 1
  8. IfWinNotExist, Workspace
  9. {
  10.     Run, "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm Workspace
  11. }
  12.  
  13. ; Move VM windows to the right screens
  14. WinWait, Workspace [Running] - Oracle VM VirtualBox : 1
  15. WinRestore, Workspace [Running] - Oracle VM VirtualBox : 1
  16. WinMove, Workspace [Running] - Oracle VM VirtualBox : 1, ,1366, -256
  17. WinMaximize, Workspace [Running] - Oracle VM VirtualBox : 1
  18.  
  19. WinWait, Workspace [Running] - Oracle VM VirtualBox : 2
  20. WinRestore, Workspace [Running] - Oracle VM VirtualBox : 2
  21. WinMove, Workspace [Running] - Oracle VM VirtualBox : 2, ,2646, -256
  22. WinMaximize, Workspace [Running] - Oracle VM VirtualBox : 2
  23.  
  24. ; Start browser
  25. SetTitleMatchMode, 2
  26. IfWinNotExist, Mozilla Firefox
  27. {
  28.     run, https://homepage
  29.     WinWait, Mozilla Firefox
  30.     WinRestore, Mozilla Firefox
  31.     WinMove, Mozilla Firefox, , 0, 0
  32.     WinMaximize, Mozilla Firefox
  33. }
  34.  
  35. ; Clear nonsense
  36. IfWinExist, Skype
  37. {
  38.     ; WinClose actually closes skype, this allows skype to minimize itself to the tray instead
  39.     PostMessage, 0x112, 0xF060,,, Skype  ; 0x112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement