Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If A and B all same number. number increase?
#1
Function testss
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages


;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 48 64 48 14 "<<"
;4 Button 0x54032000 0x0 100 64 48 14 ">>"
;5 Edit 0x54030080 0x200 48 48 46 12 ""
;6 Edit 0x54030080 0x200 100 48 48 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040108 "" "" "" ""
str controls = "5 6"
str e5 e6
if(!ShowDialog("testss" &testss &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,str FirtPage.getwintext(id(5 hDlg))
,str SecondPage.getwintext(id(6 hDlg))
,int A = val(SecondPage)-val(FirtPage)
,int+ FirtPage_i=val(FirtPage)-A
,out FirtPage_i
,if FirtPage_i<=0
,,str NumZero=1
,,,NumZero.setwintext(id(5 hDlg))
,,,FirtPage.setwintext(id(6 hDlg))
,,,ret
,else
,,out FirtPage_i
,,str decrease=FirtPage_i
,,,decrease.setwintext(id(5 hDlg))
,;-----------------------------------------------
,,int+ SecondPage_i=val(FirtPage)
,,str decrease2=SecondPage_i
,,,decrease2.setwintext(id(6 hDlg))


,case 4
,str FirtPage2.getwintext(id(5 hDlg))
,str SecondPage2.getwintext(id(6 hDlg))
,int B = val(SecondPage2)-val(FirtPage2)
,int+ FirtPage_i2=val(SecondPage2)+B
,,str increase=FirtPage_i2
,,,increase.setwintext(id(6 hDlg))
;-----------------------------------------------
,int+ SecondPage_i2=val(SecondPage2)
,,str increase2=SecondPage_i2
,,,increase2.setwintext(id(5 hDlg))

,case IDOK
,case IDCANCEL
ret 1

Hello.
Thank you, who always helping.
Please help me to.

Ex:
5edit is number 12 and 6edit is the number 24.

In this case, it increases by 12

If the two numbers are the same

I want. 'A' and 'B' all the 1+ increase.

What should do i do?
#2
Just try this:
Function testss
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
;
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 48 64 48 14 "<<"
;4 Button 0x54032000 0x0 100 64 48 14 ">>"
;5 Edit 0x54030080 0x200 48 48 46 12 ""
;6 Edit 0x54030080 0x200 100 48 48 12 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040108 "" "" "" ""
str controls = "5 6"
str e5 e6
if(!ShowDialog("testss" &testss &controls)) ret
ret
int A B
str sP1 sP2 sP12 sP22 s0
str sInc sDec sInc2 sDec2
int+ iP1 iP2 iP12 iP22
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,sP1.getwintext(id(5 hDlg))
,sP2.getwintext(id(6 hDlg))
,iP2=val(sP2)
,A = iP2-val(sP1)
,iP1=val(sP1)-A
,out iP1
,if iP1=iP2
,,sP1 = iP1-1
,,sP1.setwintext(id(5 hDlg))
,,sP2 = iP2-1
,,sP2.setwintext(id(6 hDlg))
,else if iP1<=0
,,s0=1
,,s0.setwintext(id(5 hDlg))
,,sP1.setwintext(id(6 hDlg))
,,ret
,else
,,out iP1
,,sDec=iP1
,,sDec.setwintext(id(5 hDlg))
,;-----------------------------------------------
,,iP2=val(sP1)
,,sDec2=iP2
,,sDec2.setwintext(id(6 hDlg))

,case 4
,sP12.getwintext(id(5 hDlg))
,sP22.getwintext(id(6 hDlg))
,iP22=val(sP22)
,B = iP22-val(sP12)
,iP12=iP22+B
,if iP12=iP22
,,sInc=iP12+1
,,sInc.setwintext(id(6 hDlg))
,,sInc2=iP22+1
,,sInc2.setwintext(id(5 hDlg))
,else
,,sInc=iP12
,,sInc.setwintext(id(6 hDlg))
,;-----------------------------------------------
,,sInc2=iP22
,,sInc2.setwintext(id(5 hDlg))

,case IDOK
,case IDCANCEL
ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)