Jump to content

Auto IT bug


Recommended Posts

If you use this in one line , after checkbox80 cannot understand the commands . I think it has to do with the size of line.

Any ideas how to make it shorter ? :evil:

I want to have checkbox1 & checkbox152 always checked

and if other checkboxes from 2 to 151 is unckecked to msgbox something

Thanks :)

If (GUICtrlRead($CheckBox[2]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[3]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[4]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[5]) == $GUI_UNCHECKED)  And  (GUICtrlRead($CheckBox[6]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[7]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[8]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[9]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[10]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[11]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[12]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[13]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[14]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[15]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[16]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[17]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[18]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[19]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[20]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[21]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[22]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[23]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[24]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[25]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[26]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[27]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[28]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[29]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[30]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[31]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[32]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[33]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[34]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[35]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[36]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[37]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[38]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[39]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[40]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[41]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[42]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[43]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[44]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[45]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[46]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[47]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[48]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[49]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[50]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[51]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[52]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[53]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[54]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[55]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[56]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[57]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[58]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[59]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[60]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[61]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[62]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[63]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[64]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[65]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[66]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[67]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[68]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[69]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[70]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[71]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[72]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[73]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[74]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[75]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[76]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[77]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[78]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[79]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[80]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[81]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[82]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[83]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[84]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[85]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[86]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[87]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[88]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[89]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[90]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[91]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[92]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[93]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[94]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[95]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[96]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[97]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[98]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[99]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[100]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[101]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[102]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[103]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[104]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[105]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[106]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[107]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[108]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[109]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[110]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[111]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[112]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[113]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[114]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[115]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[116]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[117]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[118]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[119]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[120]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[121]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[122]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[123]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[124]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[125]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[126]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[127]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[128]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[129]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[130]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[131]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[132]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[133]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[134]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[135]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[136]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[137]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[138]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[139]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[140]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[141]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[142]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[143]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[144]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[145]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[146]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[147]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[148]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[149]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[150]) == $GUI_UNCHECKED) And  (GUICtrlRead($CheckBox[151]) == $GUI_UNCHECKED) Then 

MsgBox(0, "test", "2-151 are unckecked!!")

Link to comment
Share on other sites

You could do it this way...

$Temp = 0
For $I = 2 To 151
   If GUICtrlRead($CheckBox[$I]) = $GUI_UNCHECKED Then
      $Temp = $Temp + 1
   EndIf
Next

If $Temp = 150 Then MsgBox(0, "test", "2-151 are unckecked!!")
Edited by Burrup

qq

Link to comment
Share on other sites

What iam doing wrong ?

;TEST SELECTED

Case $msg = $Test

$Temp = 0

For $I = 2 To 151

  If (BitAnd(GUICtrlRead($CheckBox[$I]),$GUI_UNCHECKED)) Then

      $Temp = $Temp + 1

  EndIf

Next

If $Temp = 150 Then MsgBox(0, "test", "2-151 are unckecked!!")

  for $i = 1 to $CheckBox[0]

  If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_CHECKED)) Then RunWait($Installs[$i]) ; Installs selected checkboxes

            Next

   

    Case Else

Link to comment
Share on other sites

Everything???

Firstly, wtf, BitAnd??? Why?

If (BitAnd(GUICtrlRead($CheckBox[$I]),$GUI_UNCHECKED)) Then

Use my code above...

Secondly,

For $i = 1 to $CheckBox[0]

$CheckBox[0]???? Checkbox zero doesnt contain the number of checkbox's it is a control...

Use the code above but change it...

I think you mean to do this or something similiar.

$Temp = 0
For $I = 2 To 151
   If GUICtrlRead($CheckBox[$I]) = $GUI_CHECKED Then
      RunWait($Installs[$I])
   EndIf
Next

qq

Link to comment
Share on other sites

Thanks burrup. I will try it.

BidAnd because of this :

Hulger wrote :

Bug report is wrong cause it's not a bug.

Replace your line:

CODE

If (GUICtrlRead($CheckBox[$i]) == $GUI_CHECKED) Then RunWait($Installs[$i])

with this:

CODE

If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_CHECKED)) Then RunWait($Installs[$i])

For your info: The last focused item also has the state $GUI_FOCUS so you have to check it only against $GUI_CHECKED with BitAnd()

Regards

Holger

Edited by ioctl
Link to comment
Share on other sites

Thanks burrup. I will try it.

BidAnd because of this :

Hulger wrote :

Bug report is wrong cause it's not a bug.

Replace your line:

CODE

If (GUICtrlRead($CheckBox[$i]) == $GUI_CHECKED) Then RunWait($Installs[$i])

with this:

CODE

If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_CHECKED)) Then RunWait($Installs[$i])

For your info: The last focused item also has the state $GUI_FOCUS so you have to check it only against $GUI_CHECKED with BitAnd()

Regards

Holger

<{POST_SNAPBACK}>

That was for a ListView items with checkboxes, not regular checkboxes.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

I forgot to mention that i use listview items with checkboxes :).

Another question with these checkboxes.

Normal condition :

$Checkbox[1] = GuiCtrlCreateCheckbox("PreMessages", 1, 1, 1, 1)

GUICtrlSetState(-1, $GUI_CHECKED + $GUI_HIDE + $GUI_DISABLE) ;<-- works

$Checkbox[152] = GuiCtrlCreateCheckbox("FinishMessages", 1, 1, 1, 1)

GUICtrlSetState(-1, $GUI_CHECKED + $GUI_HIDE + $GUI_DISABLE) ; <-- works

Special condition:

If "something" Then

GUICtrlSetState($Checkbox[1], $GUI_CHECKED) ;<-- works

GUICtrlSetState($Checkbox[2], $GUI_DISABLE) ;<-- NOT works

GUICtrlSetState($Checkbox[3], $GUI_HIDE) ;<-- NOT works

EndIf

Do you know why ?? Thanks

Link to comment
Share on other sites

Can't disable a single item in a listview or the checkbox in a item of listview at this time.

Is the problem with CheckBox controls or CheckBoxes in a listview?

You show what works with a CheckBox Control, what isn't working is with what type of checkbox?

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Garfrost The problem is only with Checkboxes in a listview.

In normal checkboxes works ok:)

Iam still doing something wrong in this script :

What i want is , if no checkbox is selected not to run the "check & install" script.

Case $msg = $Test

;if all unchecked , msgbox something and return

$Temp = 0

For $i = 2 To 151

If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_UNCHECKED)) Then

$Temp = $Temp + 1

EndIf

Next

If $Temp > 41 Then MsgBox(0, test", "Nothing selected!")

; if checked at least one, install

For $i = 1 To 152

If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_CHECKED)) Then

RunWait($Installs[$i])

EndIf

Next

Case Else

Edited by ioctl
Link to comment
Share on other sites

Garfrost The problem is only with Checkboxes in a listview.

In normal checkboxes works ok:)

Iam still doing something wrong in this script :

What i want is , if no checkbox is selected not to run the "check & install" script.

Case $msg = $Test

;if all unchecked , msgbox something and return

$Temp = 0

For $i = 2 To 151

  If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_UNCHECKED)) Then

      $Temp = $Temp + 1

  EndIf

Next

If $Temp > 41 Then MsgBox(0, test", "Nothing selected!")

; if checked at least one, install

For $i = 1 To 152

  If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_CHECKED)) Then

    RunWait($Installs[$i])

  EndIf

Next

   

    Case Else

<{POST_SNAPBACK}>

Think you'll need to suupply the script or enought to be able to debug it at least

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

:)

; Script Start -->

#include <GuiConstants.au3>

; GUI

GUICreate("test  -  ATK",530,400,-1,-1,BitOr($WS_MINIMIZEBOX,$WS_GROUP,$WS_CAPTION,$WS_POPUP,$WS_SYSMENU))

GuiSetIcon(@SystemDir & "\mobsync.exe", 0)

;Buttons

$Test = GuiCtrlCreateButton("Install Selected", 380, 230, 100, 20)

$Settings = GUICtrlCreateButton ("Settings", 380, 255, 100, 20)

$Button_Checkall = GuiCtrlCreateButton("Check All", 380, 280, 100, 20)

$Button_Clearall = GuiCtrlCreateButton("Clear All", 380, 305, 100, 20)

$Readmebutton = GUICtrlCreateButton ("Readme",  380 ,330, 100, 20)

$Exit = GUICtrlCreateButton ("Exit",  380, 355, 100, 20)

Dim $Icon[9],$Checkbox[9],$Label[9],$Installs[9]

$Checkbox[0] = 8

$Installs[0] = 8

;INSTALLS

$Installs[1]      = "cmd.exe"

$Installs[2]    = "mspaint.exe"

$Installs[3]    = "notepad.exe"

$Installs[4]    = "cmd.exe"

$Installs[5]    = "calc.exe"

$Installs[6]    = "wordpad.exe"

$Installs[7]    = "mspaint.exe"

$Installs[8]    = "notepad.exe"

;TREE

$maingroup = GUICtrlCreateGroup ("Select your mode",5,10,180,195)

$maintree = GUICtrlCreateTreeView (15,30,160,165,BitOr($TVS_HASBUTTONS,$TVS_HASLINES,$TVS_LINESATROOT,$TVS_DISABLEDRAGDROP),$WS_EX_CLIENTEDGE)

$treeItem1 = GuiCtrlCreateTreeViewItem("OPEN", $maintree)

$OPEN_NO_ENCRYPTION = GuiCtrlCreateTreeViewItem("NO ENCRYPTION", $treeItem1)

;EMPTY BOX

$EMPTY_GROUP = GUICtrlCreateGroup ("",185,10,342,195)

$EMPTY_TREE  = GUICtrlCreateTreeView (192,30,328,165,BitOr($TVS_HASBUTTONS,$TVS_HASLINES,$TVS_LINESATROOT,$TVS_CHECKBOXES,$TVS_DISABLEDRAGDROP),$WS_EX_CLIENTEDGE)

$OPTIONS    = GUICtrlCreateGroup ("Options",360,210,140,172)

$DESC        = GUICtrlCreateGroup ("Description",5,210,342,172)

;Start - Finish Messages

$Checkbox[1] = GuiCtrlCreateCheckbox("INSTALL 1", 1, 1, 1, 1)

GUICtrlSetState(-1, $GUI_CHECKED + $GUI_HIDE + $GUI_DISABLE)

$Checkbox[8] = GuiCtrlCreateCheckbox("INSTALL 8", 1, 1, 1, 1)

GUICtrlSetState(-1, $GUI_CHECKED + $GUI_HIDE + $GUI_DISABLE)

;OPEN NO ENCRYPTION

$NO_ENCRYPTION_GROUP = GUICtrlCreateGroup ("PROGRAMS",185,10,342,195)

GUICtrlSetState (-1,$GUI_HIDE)

$NO_ENCRYPTION_TREE = GUICtrlCreateTreeView (192,30,328,165,BitOr($TVS_HASBUTTONS,$TVS_CHECKBOXES,$TVS_DISABLEDRAGDROP),$WS_EX_CLIENTEDGE)

GUICtrlSetState (-1,$GUI_HIDE)

$Checkbox[2] = GUICtrlCreateTreeViewItem ("INSTALL 2",$NO_ENCRYPTION_TREE)

$Checkbox[3] = GUICtrlCreateTreeViewItem ("INSTALL 3",$NO_ENCRYPTION_TREE)

$Checkbox[4] = GUICtrlCreateTreeViewItem ("INSTALL 4",$NO_ENCRYPTION_TREE)

$Checkbox[5] = GUICtrlCreateTreeViewItem ("INSTALL 5",$NO_ENCRYPTION_TREE)

$Checkbox[6] = GUICtrlCreateTreeViewItem ("INSTALL 6",$NO_ENCRYPTION_TREE)

$Checkbox[7] = GUICtrlCreateTreeViewItem ("INSTALL 7",$NO_ENCRYPTION_TREE)

; GUI MESSAGE LOOP

GuiSetState()

While 1

$msg = GUIGetMsg()

Select

 

Case $msg = $GUI_EVENT_CLOSE

        ExitLoop 

 

Case $msg = $Exit

ExitLoop

 

Case $msg = $treeItem1

GUIctrlSetState ($NO_ENCRYPTION_GROUP,$GUI_HIDE)

GUIctrlSetState ($NO_ENCRYPTION_TREE,$GUI_HIDE)

GUIctrlSetState ($EMPTY_GROUP,$GUI_SHOW)

GUIctrlSetState ($EMPTY_TREE,$GUI_SHOW)

Case $msg = $OPEN_NO_ENCRYPTION

GUIctrlSetState ($EMPTY_GROUP,$GUI_HIDE)

GUIctrlSetState ($EMPTY_TREE,$GUI_HIDE)

GUIctrlSetState ($NO_ENCRYPTION_GROUP,$GUI_SHOW)

GUIctrlSetState ($NO_ENCRYPTION_TREE,$GUI_SHOW)

 

; CHECK ALL BOXES 

 

Case $msg = $Button_Checkall

  for $i = 1 to $CheckBox[0]

GUICtrlSetState($Checkbox[$i], $GUI_CHECKED)

Next

; CLEAR ALL BOXES

Case $msg = $Button_Clearall

  for $i = 1 to $CheckBox[0]

GUICtrlSetState($Checkbox[$i], $GUI_UNCHECKED)

GUICtrlSetState($Checkbox[1], $GUI_CHECKED)

GUICtrlSetState($Checkbox[8], $GUI_CHECKED)

Next

;Settings

Case $msg = $Settings

  GUISetState ( @SW_HIDE )

  RunWait ("Settings\settings.exe")

  GUISetState ( @SW_SHOW )

;INSTALL SELECTED

Case $msg = $Test

$Temp = 0

For $i = 2 To 7

  If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_UNCHECKED)) Then

      $Temp = $Temp + 1

  EndIf

Next

If $Temp = 6 Then MsgBox(0, "test", "No Installs selected!")

For $i = 1 To 8

  If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_CHECKED)) Then

    RunWait($Installs[$i])

  EndIf

Next

     

    Case Else

  EndSelect

WEnd

Exit

Link to comment
Share on other sites

Hmm iam little confused :).

What i want exactly :

1 and 8 always checked! <-- ok

When nothing selected from 2 to 7 , 1 and 8 must not run but only a msg that says "nothing selected"

To understand better lets say that 1 = msgbox (0,"", Now starting installs from 2 to 7, depending which selected)

and 8 = msgbox (0,"", Installs from 2 to 7 finished, depending which selected)

So if from 2 to 7 nothing selected , just a msgbox "nothing selected".

If at least one selected from 2 to 7 . eg. selected only 5.

It must run 1,5,8.

I have headache :evil:

Edited by ioctl
Link to comment
Share on other sites

gotcha, try this

If $Temp = 6 Then 
    MsgBox(0, "test", "No Installs selected!") 
Else
    For $i = 1 To 8
        If (BitAnd(GUICtrlRead($CheckBox[$i]),$GUI_CHECKED)) Then
            RunWait($Installs[$i])
        EndIf
    Next
EndIf

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

  • Developers

:)

If $Temp = 6 Then
    MsgBox(0, "test", "No Installs selected!")
Else
    For $i = 1 To 8
        If (BitAND(GUICtrlRead($CheckBox[$i]), $GUI_CHECKED)) Then
            RunWait($Installs[$i])
        EndIf
    Next
EndIf

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...