Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
setwintext against EditReplaceSel
#3
Gintaras, many thanks for a clear, as always, explanation. Let me ask one more question. I am in need to wait, in this dialog, the execution of an .exe (fortran) program, previously launched in the dialog, as in the function which it follows :

Function tempf12
Code:
Copy      Help
#sub mcapip v
function hDlg

EnableWindow(id(76, hDlg) 0)    
ShowWindow(id(2, hDlg) SW_HIDE)    
_s=F"Collecting Spectrum : {d_spfile}"
;_s.setwintext(id(9 hDlg))
EditReplaceSel(hDlg 9 _s 1)

run F"{d_exe}\mcapip.exe" "" "" "" 16
mac "ClepsydraSPU"
;
;WaitFor
opt waitmsg -1
int waitmax=120
int wt(waitmax*1000) t1(GetTickCount)
int swb
rep
,1
,int pid=ProcessNameToId("mcapip.exe" 0)
,if pid<=0; break
,if(wt>0 and GetTickCount-t1>=wt)
,,_s="Wait Timeout"
,,;out "<>%s : <open ''%s /%i''>%s</open> - %s" NowT si _error.place si _s
,,;mac "Warning_QM"
,,swb=1
,,ret

shutdown -6 0 "ClepsydraSPU"
if swb
,_s.setwintext(id(9 hDlg))
else
,_s=F"Spectrum is now collected, in : {d_spfile}"
_s.setwintext(id(9 hDlg))
EnableWindow(id(1, hDlg) 1)    
EnableWindow(id(77, hDlg) 1)    
DT_SetButtonIcon hDlg t_il F"1=15 77=18"
ret

Can you, please, suggest a more efficient way to do this?

I have successfully replaced the waitfor loop using a SetTimer hDlg 2 10000 0 statemnt. I hope this improved it.Please advise.


Messages In This Thread
setwintext against EditReplaceSel - by ssimop - 07-15-2018, 09:18 AM
RE: setwintext against EditReplaceSel - by ssimop - 07-15-2018, 10:20 AM
RE: setwintext against EditReplaceSel - by ssimop - 07-15-2018, 05:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)