Alright, here's a little function that I threw together that seems to work great for waiting while the processor works, things load, and for a given window entitled $WINDOW to become active...
; Function to check CPU activity and mouse icon for use
Func _Busy( $WINDOW )
Do
Do
TrayTip ( "", "Waiting for " & $WINDOW, 1 )
Sleep ( 100 )
$CPU = StatusbarGetText ( "Windows Task Manager","",2 )
$CPU = StringTrimRight ( $CPU, 1) ; remove the %
$CPU = StringRight ( $CPU, 3 ) ; get the possible 3 digits
$CPU = Int ( StringReplace ( $CPU,":","" ) ) ; remove colon and convert to int.
TrayTip ( "CLEAR", "", 0 )
Until $CPU < 15
Do
TrayTip ( "", "Waiting for " & $WINDOW, 1 )
Sleep ( 100 )
TrayTip ( "CLEAR", "", 0 )
Until MouseGetCursor ( ) <> 15
WinActivate ( $WINDOW )
TrayTip ( "", "Waiting for " & $WINDOW, 1 )
$STATE = WinGetState ( $WINDOW )
TrayTip ( "CLEAR", "", 0 )
Until ( BitAND ( $STATE, 15 ) = 15 or BitAND ( $STATE, 13 ) = 13 or BitAND ( $STATE, 47 ) = 47 )
EndFunc ; --> _Busy