# Some Checkbox Efficiency

## Recommended Posts

Im just wondering if there are any little tricks to make this checkbox stuff I have going on a little more efficient:

Heres how I compare what the checkboxes mean, at the bottom of this snippet is how I compare whether to procede:

```Func Pixels()
If \$cbstr Then
\$str_check = PixelSearch(107, 305, 117, 310, 0xD3D01E, 30)
If Not @error And \$cbstr
Then \$str = 1
EndIf
EndIf
If \$cbint Then
\$int_check = PixelSearch(107, 327, 117, 334, 0xD5E143, 30)
If Not @error Then
\$int = 1
EndIf
EndIf
If \$cbdex Then
\$dex_check = PixelSearch( 107, 349, 117, 353, 0xB4CA25, 30)
If Not @error Then
\$dex = 1
EndIf
EndIf
If \$cbcon Then
\$con_check = PixelSearch( 107, 371, 117, 377, 0xD7DB47, 30)
If Not @error Then
\$con = 1
EndIf
EndIf
If \$cbwis Then
\$wis_check = PixelSearch( 107, 392, 117, 399, 0xB3C522, 30)
If Not @error Then
\$wis = 1
EndIf
EndIf
If \$cbcha Then
\$cha_check = PixelSearch( 107, 412, 117, 420, 0xD0BF1E, 30)
If Not @error Then
\$cha = 1
EndIf
EndIf

Sleep(100)
\$total = \$str + \$int + \$dex + \$con + \$wis + \$cha
Sleep(100)
If \$total = \$cbtotal Then Box()oÝ÷ Øw«zÈhÀ^µêæw°'!rº1zÌ­ç!yÉu«­¢+Ø\$%
ÍÀÌØíµÍôÀÌØí    ÕÑÑ½¹|Äà(\$\$%%U%
ÑÉ±I ÀÌØí
¡­½á|ÄÀ¤ôÀÌØíU%}
!
-Q¡¸ÀÌØíÍÑÈôÄ(\$\$%%U%
ÑÉ±I ÀÌØí
¡­½á|ÄÄ¤ôÀÌØíU%}
!
-Q¡¸ÀÌØí¥¹ÐôÄ(\$\$%%U%
ÑÉ±I ÀÌØí
¡­½á|ÄÈ¤ôÀÌØíU%}
!
-Q¡¸ÀÌØíàôÄ(\$\$%%U%
ÑÉ±I ÀÌØí
¡­½á|ÄÌ¤ôÀÌØíU%}
!
-Q¡¸ÀÌØí½¸ôÄ(\$\$%%U%
ÑÉ±I ÀÌØí
¡­½á|ÄÐ¤ôÀÌØíU%}
!
-Q¡¸ÀÌØíÝ¥ÌôÄ(\$\$%%U%
ÑÉ±I ÀÌØí
¡­½á|ÄÔ¤ôÀÌØíU%}
!
-Q¡¸ÀÌØí¡ôÄ(\$\$\$ÀÌØíÑ½Ñ°ôÀÌØíÍÑÈ¬ÀÌØí¥¹Ð¬ÀÌØíà¬ÀÌØí½¸¬ÀÌØíÝ¥Ì¬ÀÌØí¡```

I only ask about efficiency because sometimes I notice that it skips past Box() sometimes, and I assume the pixel search is what is consuming time.

##### Share on other sites

For it to skip, must only mean one thing, that the value isn't = to the other. For us to test the full functionality, it is needed that we have a full script to test with... =)

##### Share on other sites

Well I was actually just interested in how other people use the checkboxes

## Create an account

Register a new account

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...