Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scrolling
#1
i would like to create a window that has minimal screen realestate (maybe a thick edge for the nice 3d look) that would display a global variable in a scrolling manner. it would have to check the variable value every so often (about 1-5 seconds)....

any thoughts how i can do this?




:roll:
im such a post whore today!!!
#2
Use toolbar with hook function.

Toolbar TB_ShowVariable:
Code:
Copy      Help
;/hook TB_ShowVariable2

Hook function TB_ShowVariable2:
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_CREATE
,_s=g_var
,CreateControl 0 "Static" _s 0 0 0 50 20 hWnd 111
,SetTimer hWnd 21990 1000 0
,
,case WM_TIMER
,sel wParam
,,case 21990
,,_s=g_var; _s.setwintext(id(111 hWnd))

Test macro:
Code:
Copy      Help
int+ g_var
mac "TB_ShowVariable"
rep 10
,g_var+1
,1
#3
works great!

is there a way to show long string like about 50+ char?
thanks
#4
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_CREATE
,CreateControl 0 "Static" 0 0 0 0 50 20 hWnd 111
,SetTimer hWnd 21990 1000 0
,goto g1
,
,case WM_TIMER
,sel wParam
,,case 21990
,,;g1
,,_s.format("The g_var variable now is %i" g_var)
,,_s.setwintext(id(111 hWnd))
,
,case WM_SIZE
,RECT r; GetClientRect(hWnd &r)
,siz r.right r.bottom id(111 hWnd)


Forum Jump:


Users browsing this thread: 1 Guest(s)