title: AutoScriptWriter Macro not working
body: <p>I created a little macro that was all mouse clicks with AutoScriptWriter that worked well immediately after I had created it, but later when I opened the program it was working in and started the macro, it showed up in my system tray, but nothing happened. I hadn't yet assigned a hotkey and was just clicking on macro to run it. What am I doing wrong?</p>
  
  <p>Thanks,
  Ellen</p>
  
  <pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  ; #Warn  ; Enable warnings to assist with detecting common errors.
  SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  
  run C:\Program Files\VinylStudio\VinylStudio.exe, , max
  
  #SingleInstance Force
  #installKeybdHook
  #Persistent
  
  SetTitleMatchMode, 2 ;  Allow more flexibility in matching the windows title.
  SetTimer, CloseScript, 1000
  Return ; stop the script here on startup
  
  CloseScript:
  IfWinExist ahk_class VinylStudio_main
      Return
  ExitApp
  
  #ifWinActive ahk_class VinylStudio_main
  
  ^h:: ; Here I assigned the hotkey [Ctrl]+h
  
  WinActivate, VinylStudio
  WinWait, VinylStudio, , 3 ; Wait for 3 seconds and then alert user
  if ErrorLevel
  {
      MsgBox, VinylStudio timed out.
      return
  }
  MouseClick, left,  479,  79 ; MouseClicks are less reliable than keyboard shortcuts or ControlSend/ControlClick.
  Sleep, 100
  MouseClick, left,  421,  40
  Sleep, 100
  MouseClick, left,  425,  443
  Sleep, 100
  WinWait, Filter Settings, , 3 ; Wait 3 seconds for pop-up else alert user
  if ErrorLevel
  {
      MsgBox, Filter Settings timed out.
      return
  }
  MouseClick, left,  29,  109
  Sleep, 100
  WinWait, Define Noise Sample, , 3 ; Wait 3 seconds for pop-up else alert user
  if ErrorLevel
  {
      MsgBox, Define Noise Sample timed out.
      return
  }
  MouseClick, left,  388,  168
  Sleep, 100
  MouseClick, left, -86,  660, 2
  ;MouseClick, left, -86,  660
  Sleep, 100
  WinWait, VinylStudio, , 3 ; Wait 3 seconds for pop-up else alert user
  if ErrorLevel
  {
      MsgBox, VinylStudio timed out.
      return
  }
  MouseClick, left,  200,  675, 2
  ;MouseClick, left,  200,  675
  Sleep, 100
  MouseClick, left,  200,  675, 2
  ;MouseClick, left,  200,  675
  Sleep, 100
  MouseClick, left,  201,  673
  Sleep, 100
  MouseClick, left,  203,  673, 2
  ;MouseClick, left,  203,  673
  Sleep, 100
  MouseClick, left,  203,  673
  Sleep, 100
  MouseClick, left,  787,  645
  Sleep, 100
  Return
  
  
  #ifwinactive
  </code></pre>