Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Window
#1
My macro works on another program which is working in foreground. Macro passes keyboard clicks. I want to display some values on screen but if I create a new window it becomes active and the keyboard clicks are passed to my window. I want a toolbar type window. Macro is to be run only in EXE mode. Can I create a window/control which can be always on top so that it can help in display values also it should receive focus from any program.
#2
Macro
Code:
Copy      Help
mes "test" "" "n" ;;n - message box inactive
#3
Fine it remains on top non foucsed, how will I update the text in run time
#4
Function InfoWindow
Code:
Copy      Help
;/
function# [x] [y] [flags] [$title] ;;flags: 1 in this thread, 64 raw x y

;Shows inactive topmost window where macros can display text.
;Returns static text control handle. To display text, use setwintext.

;EXAMPLE
;int+ g_myinfowindow
;if(!IsWindow(g_myinfowindow)) g_myinfowindow=InfoWindow(-1 1 0 "xxxx")
;;...
;_s="1"; _s.setwintext(g_myinfowindow)
;3
;_s="2"; _s.setwintext(g_myinfowindow)


int h
if(flags&0x10001=0)
,mac "__InfoWindow" "" x y flags|0x10000 title &h
,rep() 0.01; if(h) break
else
,__InfoWindow x y flags title h
ret h

Function __InfoWindow
Code:
Copy      Help
;\Dialog_Editor
function x y flags $title &hwnd

str s1 s2
s1=
;BEGIN DIALOG
;0 "" 0x80C80840 0x8000188 0 0 223 136 "%s"
;3 Static 0x54000000 0x0 4 4 218 130 ""
;END DIALOG
;DIALOG EDITOR: "" 0x203000B "" "" ""
s2.format(s1 title)
opt waitmsg 2
_i=ShowDialog(s2 0 0 0 1|(flags&64) 0 0 0 x y)
hid- _i
hwnd=id(3 _i)
if(flags&0x10000) wait 0 -WC hwnd; err
#5
Great. How do I Place controls on the info window and resize window.
#6
in dialog editor
#7
I am able to resize and place controls. Now how do I use start button to start another macro and when stop clicked the started macro gets ended ?


Forum Jump:


Users browsing this thread: 1 Guest(s)