Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog with Combolist
#1
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
#2
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?
#3
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

Code:
Copy      Help
\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

Code:
Copy      Help
str controls = "4"
str cb4
cb4= "www.google.com[]www.quickmacros.com[]www.yahoo.com"
if(!ShowDialog("Websites2" &Websites2 &controls)) ret
#4
Websites2
Code:
Copy      Help
;\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
pi
#5
with favorites icon:

Websites2
Code:
Copy      Help
;\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
pi
#6
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?
#7
Do you mean such as, hitting the OK button and then it opening the website?
Taking on Quick Macros one day at a time
#8
yes
#9
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
#10
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.
#11
OK, got ya. It works now thanks.
Taking on Quick Macros one day at a time
#12
Is this what you wanted?


Attached Files
.qml   Websites.qml (Size: 1.15 KB / Downloads: 365)
Taking on Quick Macros one day at a time


Forum Jump:


Users browsing this thread: 1 Guest(s)