Posts: 111
Threads: 31
Joined: Apr 2007
Hello, how would i make it so when something from a combo list in a dialog is clicked it runs a specified macro?
plz help
qmr55
Posts: 111
Threads: 31
Joined: Apr 2007
if u need to see my dialog just tell me i will post it
and btw how do u guys make the colors of qm show up wen u post codes?
Posts: 111
Threads: 31
Joined: Apr 2007
hey i have this so far... it works kind of lol wen i click one of the three in the drop down list it opens them all? can i make it so it just opens the one i click?
Websites2
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
BEGIN DIALOG
0 "" 0x90C80A44 0x100 0 0 223 135 "Website's"
1 Button 0x54030001 0x4 48 114 48 14 "OK"
2 Button 0x54030000 0x4 120 114 48 14 "Cancel"
4 ComboBox 0x54230243 0x0 58 52 96 213 ""
3 Button 0x54020007 0x0 52 6 108 100 "Website's"
END DIALOG
DIALOG EDITOR: "" 0x202000A "" ""
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 CBN_SELENDOK<<16|4
_i=CB_SelectedItem(lParam)
mac "GOOGLE"
mac "UWE"
mac "IE"
case IDOK DT_Ok hDlg
case IDCANCEL DT_Cancel hDlg
ret 1
Macro
str controls = "4"
str cb4
cb4= "www.google.com[]www.quickmacros.com[]www.yahoo.com"
if(!ShowDialog("Websites2" &Websites2 &controls)) ret
Posts: 1,271
Threads: 399
Joined: Mar 2003
Websites2
;\Dialog_Editor
function # hDlg message wParam lParam
if (hDlg) goto messages
str sb_text
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Website's"
;1 Button 0x54030001 0x4 48 114 48 14 "OK"
;2 Button 0x54030000 0x4 120 114 48 14 "Cancel"
;4 ComboBox 0x54230243 0x0 58 52 96 213 ""
;3 Button 0x54020007 0x0 52 6 108 100 "Website's"
;END DIALOG
;DIALOG EDITOR: "" 0x202000A "" ""
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 CBN_SELENDOK <<16|4
,, CB_SelectedItem (id (4 hDlg) sb_text)
,, sel CB_SelectedItem (lParam)
,,, case 0;; google
,,,, out sb_text
,,, case 1;; UWE
,,,, out sb_text
,,, case 2;; IE
,,,, out sb_text
,,,,
, case IDOK DT_Ok hDlg
, case IDCANCEL DT_Cancel hDlg
ret 1
Posts: 1,271
Threads: 399
Joined: Mar 2003
with favorites icon:
Websites2
;\Dialog_Editor
function # hDlg message wParam lParam
if (hDlg) goto messages
str sb_text
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Website's"
;1 Button 0x54030001 0x4 48 114 48 14 "OK"
;2 Button 0x54030000 0x4 120 114 48 14 "Cancel"
;4 ComboBox 0x54230243 0x0 58 52 96 213 ""
;3 Button 0x54020007 0x0 52 6 108 100 "Website's"
;END DIALOG
;DIALOG EDITOR: "" 0x202000A "" ""
ret
;messages
if (message=WM_INITDIALOG ) DT_Init (hDlg lParam)
;int param=DT_GetParam(hDlg)
sel message
, case WM_INITDIALOG
,, int hicon=GetIcon ("$favorites$")
,, SendMessage hDlg WM_SETICON 0 hicon
, ret 1
, case WM_DESTROY DT_DeleteData (hDlg)
, case WM_COMMAND goto messages2
ret
;messages2
sel wParam
, case CBN_SELENDOK <<16|4
,, CB_SelectedItem (id (4 hDlg) sb_text)
,, sel CB_SelectedItem (lParam)
,,, case 0;; google
,,,, out sb_text
,,, case 1;; UWE
,,,, out sb_text
,,, case 2;; IE
,,,, out sb_text
,,,,
, case IDOK DT_Ok hDlg
, case IDCANCEL DT_Cancel hDlg
ret 1
Posts: 111
Threads: 31
Joined: Apr 2007
thank you that worked well...but how do i add so that it doesnt open the page untill i press a button in the dialog?
Posts: 473
Threads: 33
Joined: Aug 2007
Do you mean such as, hitting the OK button and then it opening the website?
Taking on Quick Macros one day at a time
Posts: 111
Threads: 31
Joined: Apr 2007
Posts: 473
Threads: 33
Joined: Aug 2007
Hmmm, i'm trying to help but for some reason when I copy the code form here and run the dialog, nothing happens, no dialog editor opens or not even the dialog itself. Any ideas why?
Taking on Quick Macros one day at a time
Posts: 12,239
Threads: 144
Joined: Dec 2002
QM Assistant Wrote: Hmmm, i'm trying to help but for some reason when I copy the code form here and run the dialog, nothing happens, no dialog editor opens or not even the dialog itself. Any ideas why?
Forum code must be pasted using menu -> Other formats -> paste escaped. When you copy code here, forum software for some reason adds space at the end of line.
Posts: 473
Threads: 33
Joined: Aug 2007
OK, got ya. It works now thanks.
Taking on Quick Macros one day at a time
Posts: 473
Threads: 33
Joined: Aug 2007
Is this what you wanted?
Attached Files
Websites.qml (Size: 1.15 KB / Downloads: 471)
Taking on Quick Macros one day at a time