2012-10-03 2 views
1

내 스크립트에 아래의 SPSS 코드가 있습니다.SPSS에서 진행 상황을 사용자에게 알립니다.

MsgBox "Progressing" 
For iCaseCount = 1 To iNumberOfCases 
    'my code here 
Next 

MsgBox를 제거하고 'it'을 루프 안에 넣고 콘텐츠를 바꾸기를 원합니다. "진행 기록 :"& "of"& iNumberOfCases

내가 원하는 것을 얻을 수있는 방법이 있습니까?

답변

0

나는 Internet Explorer를 통해 진행 상황을 보여주는 방법을 마침내 발견했습니다.

아래는 VB 스크립트 코드입니다.

Dim objExplorer 
Set objExplorer = CreateObject("InternetExplorer.Application") 
objExplorer.navigate "about:blank" : objExplorer.Width = 350 : objExplorer.Height = 80 : objExplorer.toolbar = False : objExplorer.menubar = False : objExplorer.statusbar = False : objExplorer.Visible = True 

For iCaseCount = 1 To iNumberOfCases 
    DisplayProgress(objExplorer, iCaseCount, iNumberOfCases) 
    'my code here 
Next 

objExplorer.Quit 
Set objExplorer = Nothing 

방법이 진행에게

Sub DisplayProgress(ByVal x As Object, ByVal stage As Long, ByVal total As Long) 
    'in code, the colon acts as a line feed 
    x.Refresh 
    x.document.write "<font color=black face=Arial>" 
    x.document.write "Processing record " & stage & " of " & total 
    x.document.write "</font>" 
End Sub 
를 표시합니다
관련 문제