Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Vertical autoscroll attribute
#1
Hello ~ Gintaras ~~!

I try to make simple log window with vertical autoscroll attribute and make below function and macro

I added VScroll and VAutoScroll attributes to dlg_log function

but V Scroll doesn't seem to work

Thank you in advance!


Function dlg_log
Code:
Copy      Help
\Dialog_Editor

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 252 160 "LOGwin"
;3 Edit 0x54231044 0x200 8 8 238 144 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040500 "*" "" "" ""

str controls = "3"
str e3
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_TIMER
,SetTimer hDlg 0 1000 0
,case WM_TIMER
,sel wParam
,,case 0
,case WM_DESTROY
,case WM_COMMAND goto messages2
,
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

Macro Macro3
Code:
Copy      Help
int N
str newLog oldLog
str logfile = "d:\log.txt"
str tmplog = "d:\log.tmp"
int w toDEL

del- tmplog

N=0
rep
,N+1
,wait 1.5
,oldLog.getfile(tmplog);err
,if(N>5)
,,toDEL = find(oldLog ".")
,,oldLog.remove(0 toDEL+1)
,oldLog.trim()
,newLog.format("%s[]LOG - %i." oldLog N);newLog.trim()
,newLog.setfile(logfile 0 -1 1)
,newLog.setfile(tmplog 0 -1 1)
,w=win("LOGwin" "")
,if(w) newLog.setwintext(id(3 w))
#2
I cannot test, the code is invalid and difficult to read in this format.
#3
Oh~! I fixed them. I'll delete post if I solve this problem.

please check this if you could. Thank you~
#4
I still cannot test, error "cannot open file: The system cannot find the file specified", but what exactly means "V Scroll doesn't seem to work"? How it should work and how it works now?
#5
[Image: QWqgtd8.jpg]

[Image: RsOUd8v.jpg]

like this, scroll doesn't work.
#6
I edited upper source.

2 log files with 1 temporary (to setwintext to dlg_log id 3)

after 5lines, delete 1st line
#7
setwintext does not move the text cursor to the end.
One of ways to scroll to the bottom:
SendMessage id(3 hDlg) WM_VSCROLL SB_BOTTOM 0
#8
I got it and it works well.

Thank you Gintaras , for last 2 years with your help I make my life much better.

God bless you~~~


Forum Jump:


Users browsing this thread: 3 Guest(s)