Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smart Dialog
OK, I'm trying to make a dialog that will be able to show the active windows "Window Text", I made a seperate macro that gets window text, "If that is necessary", and now I just want it to put that window text into a blank space in the dialog.. Any idea on how to do this? I haven't made the dialog yet so I have no code for reference, but if you have any idea please let me know. Thanks.
anyone have any ideas?
ok maybe if i post my code it will help...

Copy      Help
act _s
str a
_s.getwintext(win("Internet Explorer"))
a.get(_s 0 12)
out a

this gets the window text i wanted from internet explorer but i want it to show up in a box i in the dialog? how can i do this?
like this?

Copy      Help
act _s
str a
_s.getwintext(win("Internet Explorer"))
a.get(_s 0 12)
out a
mes("%s" "Title of window goes here" "" a)
An old blog on QM coding and automation.

The Macro Hook
would i insert this into the dialog just like that?
depends on the dialog.
it's easier to show you if you already have a dialog.
An old blog on QM coding and automation.

The Macro Hook
ok ill try to make a quick one for a reference
OK, i made a quick idea of what i wanted:

Macro "Website Starter"

Copy      Help
str controls = "3"
str cb3
if(!ShowDialog("Websites" &Websites &controls)) ret

then Function/Dialog "Websites"

Copy      Help
function# hDlg message wParam lParam
if(hDlg) goto messages

;0 "" 0x90C80A44 0x100 0 0 197 107 "Form"
;1 Button 0x54030001 0x4 30 76 48 14 "OK"
;2 Button 0x54030000 0x4 108 76 48 14 "Cancel"
;3 ComboBox 0x54230243 0x0 16 22 96 213 ""
;6 Static 0x54000000 0x0 126 18 56 30 "Put Current Window Open Here"
;5 Button 0x54020007 0x0 120 2 70 54 ""
;4 Button 0x54020007 0x0 8 2 108 54 "Websites"
;DIALOG EDITOR: "" 0x2020005 "" ""

if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
;int param=DT_GetParam(hDlg)

sel message
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
To insert such code can be used "Text" or "Window" dialog from the floating toolbar.
could you maybe show me an example using the dialog ive shown... when i use those options in the floating toolbar i never can get it to work in the dialog ive already made.
Copy      Help
_s=""; _s.setwintext(id(6 win("Form" "#32770")))

To insert this code, I used Window dialog, selected Set Text, captured the control in the dialog using the second "Drag" image, OK. Also needs editing:

Copy      Help
_s.setwintext(id(6 win("Form" "#32770")))
ok thanks... what type of box should i use to set the window text in, inside the dialog?
Static is OK. Or Edit.
How do i get the dialog's tray icon to stay in the taskbar... I put AddTrayIcon... Is there something else i need to do... The tray icon shows up down there but then it will disappear when i hit the X in the top right corner... is it possible to make it so that when i hit the X it will still stay in the taskbar?
Dialog Help again please.

Forum Jump:

Users browsing this thread: 1 Guest(s)