04-15-2013, 04:08 AM
Oh one other question, is it possible to clear the contents of the rich text box while the macro is running and start scrolling new text again from the top? I tried doing it with a loop but was not sure how to get the cursor back the the start of the RTB, before clearing the contents.
This simply entered blank text after the 11th line (height of the RTB control) but I wanted it to clear it from the top.
Macro marquee2
Kind Regards
Matt
This simply entered blank text after the 11th line (height of the RTB control) but I wanted it to clear it from the top.
Macro marquee2
function hDlg
;SendMessage hDlg WM_APP 4 F"{num}"
;SendMessage hDlg WM_APP 5 ""
;SendMessage hDlg WM_APP 3 ""
int inc
int inc1
int number
int clearMarq=1
for inc 0 100
,number=RandomInt(0 2)
,sel number
,,case 0
,,SendMessage hDlg WM_APP 4 F"{number}"
,,SendMessage hDlg WM_APP 5 ""
,,SendMessage hDlg WM_APP 3 ""
,,case 1
,,SendMessage hDlg WM_APP 3 F"{number}"
,,SendMessage hDlg WM_APP 5 ""
,,SendMessage hDlg WM_APP 4 ""
,,case 2
,,SendMessage hDlg WM_APP 5 F"{number}"
,,SendMessage hDlg WM_APP 4 ""
,,SendMessage hDlg WM_APP 3 ""
,wait 1
,clearMarq=clearMarq+1
,if clearMarq=11
,,for inc1 0 11
,,,SendMessage hDlg WM_APP 4 ""
,,,SendMessage hDlg WM_APP 5 ""
,,,SendMessage hDlg WM_APP 3 ""
,,,clearMarq=1Kind Regards
Matt
