Is there anyway to deactivate a button's click function and then reactivate it. So the user clicks, the button is deactivated at the begininig of the subroutine and the last line reactivates the button.
Below is the subroutine for moving up (down is similar) if someone would like to use it.
Code: Select all
SRT>Move_Up
GetDialogProperty>RulesDialog,ruleslistbx,SelectedIndex,rn
Let>x=%rn%
If>%rn%=-1
MDL>No Rule is selected
Goto>end_of_up_sub
Endif
Endif
If>%rn%=0
MDL>This is the First Rule it cannot be moved up
Goto>end_of_up_sub
Endif
Let>rn=%rn%+1
ReadLn>%settinsdir%\%jname%.csv,rn,Line
ReadFile>%settinsdir%\%jname%.csv,rlist
StringReplace>%rlist%,%Line%%CRLF%,,nline
DeleteFile>%settinsdir%\temp.tmp
Let>WLN_NOCRLF=1
WriteLn>%settinsdir%\temp.tmp,result,nline
Let>WLN_NOCRLF=0
DeleteFile>%settinsdir%\%jname%.csv
Let>u=1
Label>start_move_up
ReadLn>%settinsdir%\temp.tmp,%u%,uline
If>uline=##EOF##,done_with_up
If>%u%=%x%
WriteLn>%settinsdir%\%jname%.csv,result,%Line%
WriteLn>%settinsdir%\%jname%.csv,result,%uline%
Else
WriteLn>%settinsdir%\%jname%.csv,result,%uline%
Endif
Let>u=u+1
Goto>start_move_up
Label>done_with_up
ReadFile>%settinsdir%\%jname%.csv,rlist
SetDialogProperty>RulesDialog,ruleslistbx,Text,%rlist%
Let>x=%x%-1
SetDialogProperty>RulesDialog,ruleslistbx,SelectedIndex,%x%
Label>end_of_up_sub
END>Move_Up