Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. ; Automates adding a toolbar to the taskbar in Windows
  2. #SingleInstance force
  3. ; Change to the folder path to your toolbar
  4. toolbarPath=OneDrive\System\Actions
  5.  
  6. ControlGet, handle, Hwnd,, TrayClockWClass1,,Notification Area
  7. ControlClick, ,ahk_id %handle% ,,Right
  8.  
  9. WinWait,ahk_class #32768,,5
  10. if ErrorLevel
  11. {
  12. MsgBox,Context Menu not found after 5 seconds
  13. Exit
  14. }
  15.  
  16. Sleep,400
  17. Send,T{Enter}N
  18.  
  19. WinWaitActive,New Toolbar,,10
  20. if ErrorLevel
  21. {
  22. MsgBox,New Toolbar Window not found after 10 seconds
  23. Exit
  24. }
  25.  
  26. Sleep,400
  27. Send,!d ; ALT+D
  28. Send,%toolbarPath%
  29. Send,{Enter}
  30. Sleep,400
  31. Send,+{Tab}+{Tab} ; SHIFT+TAB, SHIFT+TAB
  32. Sleep,400
  33. Send,{Enter}
  34. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement