Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smart Dialog
#1
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.
#2
anyone have any ideas?
#3
ok maybe if i post my code it will help...

Code:
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?
#4
like this?

Code:
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
#5
would i insert this into the dialog just like that?
#6
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
#7
ok ill try to make a quick one for a reference
#8
OK, i made a quick idea of what i wanted:

Macro "Website Starter"

Code:
Copy      Help
str controls = "3"
str cb3
cb3="www.quickmacros.com[]www.google.com[]www.yahoo.com"
if(!ShowDialog("Websites" &Websites &controls)) ret


then Function/Dialog "Websites"

Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;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"
;END DIALOG
;DIALOG EDITOR: "" 0x2020005 "" ""


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

sel message
,case WM_INITDIALOG
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1
#9
To insert such code can be used "Text" or "Window" dialog from the floating toolbar.
#10
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.
#11
Code:
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:

Code:
Copy      Help
_s.getwintext(win)
_s.setwintext(id(6 win("Form" "#32770")))
#12
ok thanks... what type of box should i use to set the window text in, inside the dialog?
#13
Static is OK. Or Edit.
#14
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?
#15
Dialog Help again please.


Forum Jump:


Users browsing this thread: 1 Guest(s)