I think you best try to find first why the script window "hangs".
  • Try to run the script or a copy interactive. Try to show the commands you run. Put some indicators in the script like:
     Code:
    ...
    ? "Step 1"
    ...
    ? "Step 2"
    ...
    ? "Step 3"
    ...
    

    so you see how long it takes to get there
  • Run the script in debug mode with:
    kix32.exe /d YourScript.kix
  • Put some
    ?@ERROR": "@SERROR
    in the script if you expect errors
  • Put
    Debug On
    in the script where you expect it to go wrong and continue step by step

etc...