help me please i dont know how to arrange this....

Post here your macros, QM projects, solutions, etc.

help me please i dont know how to arrange this....

Postby Neal on Tue Jan 10, 2017 2:20 pm

i wanna put my macro on a dialog so it can be easy to use but i have no idea on it :cry: :cry:
this is the dialog i make...
Macro Macro3     ?
;
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 112 96 "NEALBOT"
;3 Button 0x54032000 0x0 6 74 48 14 "ON"
;4 Button 0x54032000 0x0 58 74 48 14 "OFF"
;5 ListBox 0x54230101 0x200 8 10 96 48 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040400 "*" "" "" ""

str controls = "5"
str lb5
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1



this is the macro i wanna put but i want to Start by clicking "ON" and stop it by clicking "OFF"...

Macro NEALBot Ver.3     ?
int w1=act(win("CABAL" "D3D Window"))
Speak "Nealbot. has been, activated!" 0.4
OnScreenDisplay "NealBot Activated" 2 0 0 0 30 450 4
wait 3
rep
,rig 871 601 w1 1 ;; 'CABAL'
,ifk(v) break ;;if pressed key v, exit the rep loop
,key z3x
,wait 2
,ifk(v) break ;;if pressed key v, exit the rep loop
,key 4x
,wait 2
,ifk(v) break ;;if pressed key v, exit the rep loop
,key z5x0
,wait 2
,ifk(v) break ;;if pressed key v, exit the rep loop

help me how to arrange this please.. :?: :?:
Neal
 
Posts: 7
Joined: Mon Jul 25, 2016 8:05 am

Re: help me please i dont know how to arrange this....

Postby Gintaras on Tue Jan 10, 2017 9:25 pm

Add below sel wParam.

,case 3
,mac "NEALBot Ver.3"
,case 4
,EndThread "NEALBot Ver.3"

Gintaras
Site Admin
 
Posts: 10369
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: help me please i dont know how to arrange this....

Postby Neal on Wed Jan 11, 2017 3:40 am

thnx sir it works but i can't turn it off because the dialog is close when i click the ON button and even i click e X button on top it starts the macro
what would i do not to close dialog even if macro is running??
sorry for my english.
Neal
 
Posts: 7
Joined: Mon Jul 25, 2016 8:05 am

Re: help me please i dont know how to arrange this....

Postby Neal on Wed Jan 11, 2017 3:58 am

Function Macro3     ?
;
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 112 96 "NEALBOT"
;3 Button 0x54032000 0x0 6 74 48 14 "ON"
;4 Button 0x54032000 0x0 58 74 48 14 "OFF"
;5 ListBox 0x54230101 0x200 8 10 96 48 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040400 "*" "" "" ""

str controls = "5"
str lb5
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,mac- "NealBot Ver.2"
,case 4
,EndThread "NealBot Ver.2"
sel wParam
,case IDOK
,case IDCANCEL
ret 1


what can i do so the dialog didn't close??
i cant turn the macro off
Neal
 
Posts: 7
Joined: Mon Jul 25, 2016 8:05 am

Re: help me please i dont know how to arrange this....

Postby Gintaras on Wed Jan 11, 2017 6:25 am

"NEALBot Ver.3" runs when "Macro3" ends because both are macros and don't have "Run simultaneously" property. Look in Properties. You can select "Run simultaneously" or convert to function.
Gintaras
Site Admin
 
Posts: 10369
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania

Re: help me please i dont know how to arrange this....

Postby Neal on Wed Jan 11, 2017 1:48 pm

THNX IT WORKS NOW SIR!!! :D :D :D :D :D :D
but i have still 1 more question :)
how can i make work of this where can i put another macro??
Function Macro3     ?
;
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 112 96 "NEALBOT"
;3 Button 0x54032000 0x0 6 74 48 14 "ON"
;4 Button 0x54032000 0x0 58 74 48 14 "OFF"
;5 ComboBox 0x54230243 0x0 8 14 96 213 ""
;6 Button 0x54012003 0x0 8 54 44 10 "AutoLoot"
;END DIALOG
;DIALOG EDITOR: "" 0x2040400 "*" "" "" ""

str controls = "5 6"
str cb5 c6Aut

cb5="&NEALBOT[]NEALAUTOLOOT[]NEALAUTOSHOUT"

if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,mac "NealBot_Ver_2"
,case 4
,EndThread "NealBot_Ver_2"
sel wParam
,case IDOK
,case IDCANCEL
ret 1


the other macro is this cb5="&NEALBOT[]NEALAUTOLOOT[]NEALAUTOSHOUT"
and also where can i put the macro of this 6 Button 0x54012003 0x0 8 54 44 10 "AutoLoot"
thnx sir more power!! :D :D :D
Neal
 
Posts: 7
Joined: Mon Jul 25, 2016 8:05 am

Re: help me please i dont know how to arrange this....

Postby Gintaras on Thu Jan 12, 2017 11:59 am

Macro Macro2766     ?
,case 3
,CB_SelectedItem id(5 hDlg) _s
,mac _s



Similar for EndThread.

and also where can i put the macro of this 6 Button 0x54012003 0x0 8 54 44 10 "AutoLoot"

In dialog editor select the control and click toolbar button "Events", OK.
Gintaras
Site Admin
 
Posts: 10369
Joined: Thu Dec 19, 2002 7:36 pm
Location: Lithuania


Return to My QM

Who is online

Users browsing this forum: No registered users and 1 guest