Jump to content
Sign in to follow this  
phurax

Command to activate/deactivate code

Recommended Posts

Hi,

I'm searching a command that allows to activate/deactivate a part of the code.

example:

RunWait(@ComSpec & " /c " & 'rar a -rr [color="#FF0000"]-pblabla[/color] -ep1 -- '& $zielver&'\'&$arr_files[$x]&'.rar '& $quellver&'\'&$arr_files[$x])

Now if a activate a Checkbox, it should activate/use the red code, if deactivated it shouldnt use it.

Sorry for my english, hope u guys understand what i mean :)

edit: another question, how can i save a configuration(Path) so that when i close and start tool again it still has this configuration?

Edited by phurax

Share this post


Link to post
Share on other sites

If GuiCtrlRead($checkbox) = $GUI_CHECKED Then
    $command = @ComSpec & " /c " & 'rar a -rr -pblabla -ep1 -- '& $zielver&'\'&$arr_files[$x]&'.rar '& $quellver&'\'&$arr_files[$x]
Else
    $command = @ComSpec & " /c " & 'rar a -rr -ep1 -- '& $zielver&'\'&$arr_files[$x]&'.rar '& $quellver&'\'&$arr_files[$x]
EndIf

RunWait($command)

Share this post


Link to post
Share on other sites

If GuiCtrlRead($checkbox) = $GUI_CHECKED Then
    $command = @ComSpec & " /c " & 'rar a -rr -pblabla -ep1 -- '& $zielver&'\'&$arr_files[$x]&'.rar '& $quellver&'\'&$arr_files[$x]
Else
    $command = @ComSpec & " /c " & 'rar a -rr -ep1 -- '& $zielver&'\'&$arr_files[$x]&'.rar '& $quellver&'\'&$arr_files[$x]
EndIf

RunWait($command)

but if there are alot of checkboxes, its quite complicate and unclear.

arent there other possibilities?

maybe with case? so should be possible too involve all checkboxes, or?

and my other question how to save configs?

Share this post


Link to post
Share on other sites

$redText = ''
If BitAND(GUICtrlRead($checkbox), $GUI_CHECKED) Then
   $redText = '-pblabla'
EndIf
RunWait(@ComSpec & " /c " & 'rar a -rr ' & $redText & ' -ep1 -- '& $zielver&'\'&$arr_files[$x]&'.rar '& $quellver&'\'&$arr_files[$x])oÝ÷ Ø   ÝrßêÞßÛ'¢Þuçâçpk+hvajܨº¯zÚ0®+^¶¡×²¢êìzWÓ+0Y`zܨºËZ®×¶.î²Øy«ºÚ"µÍÚ[ÛYH    ÑÕRPÛÛÝ[Ñ^]LÉÝÂÌÍÙÝZHHÕRPÜX]J    ÌÎNÉÌÎNË
BÌÍØÚXÚÈHÕRPÝÜX]PÚXÚÐÞ
    ÌÎNÐÚXÚØÞ    ÌÌÎÉÌÌÎÉÌÌÎÉÌÎNË
BÕRPÝÜX]SX[
    ÌÎNÕHÚXÚØÞXÝHÚ[[Y[XY]ØÈÚXÚÙYÚ[[ÝH^] ÌÎNÈ [ÈÂIÌÎNÝHØÜ[]]ÈÚXÚÈ]Ù[Ú[HØÜÝÈYØZ[ÌÎNÈ  [È [ÈÂIÌÎNÒÝÚXÚÈ][ÛÜÙHHÚ[ÝË[[HØÜYØZ[ÌÎNËL
BÌÍØÚXÚÐÛÛYÈH[TXY
[   [È ÌÎNÉÌLØÛÛYË[IÌÎNË    ÌÎNÔÙ][ÜÉÌÎNË  ÌÎNÐÚXÚÙY ÌÎNË ÌÎNÓÉÌÎNÊBY  ÌÍØÚXÚÐÛÛYÈH   ÌÎNÖYÉÌÎNÈ[QÕRPÝÙ]Ý]J    ÌÍØÚXÚË   ÌÍÑÕRWÐÒPÒÑQ
B[YÕRTÙ]Ý]J
BÚ[HBIÌÍÙÛHHÕRQÙ]ÙÊ
BTÝÚ]Ú   ÌÍÙÛBBPØÙH    ÌÍÑÕRWÑUSÐÓÔÑBBBIÌÍØÚXÚÔØ]PÛÛYÈH ÌÎNÓÉÌÎNÂBBRY]S
ÕRPÝXY
    ÌÍØÚXÚÊK  ÌÍÑÕRWÐÒPÒÑQ
H[  ÌÍØÚXÚÔØ]PÛÛYÈH   ÌÎNÖYÉÌÎNÂBBR[UÜ]J[ [È ÌÎNÉÌLØÛÛYË[IÌÎNË    ÌÎNÔÙ][ÜÉÌÎNË  ÌÎNÐÚXÚÙY ÌÎNË ÌÍØÚXÚÔØ]PÛÛYÊBBBQ^]ÛÜQ[ÝÚ]ÚÑ[

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...