# Help with many problems

## Recommended Posts

1. How to update a menuitem?

2. how can I shorten it:

\$1 = Random(1, \$e, 1)

Do

\$2 = Random(1, \$e, 1)

Until \$2 <> \$1

Do

\$3 = Random(1, \$e, 1)

Until \$3 <> \$1 And \$3 <> \$2

Do

\$4 = Random(1, \$e, 1)

Until \$4 <> \$1 And \$4 <> \$2 And \$4 <> \$3

Do

\$5 = Random(1, \$e, 1)

Until \$5 <> \$1 And \$5 <> \$2 And \$5 <> \$3 And \$5 <> \$4

\$6 = ""

\$7 = ""

\$8 = ""

\$9 = ""

\$10 = ""

EndIf

Do

\$6 = Random(1, \$e, 1)

Until \$6 <> \$1 And \$6 <> \$2 And \$6 <> \$3 And \$6 <> \$4 And \$6 <> \$5

\$7 = ""

\$8 = ""

\$9 = ""

\$10 = ""

EndIf

If GUICtrlRead(\$Combo1) = "Multi Lotek" Then

Do

\$7 = Random(1, \$e, 1)

Until \$7 <> \$1 And \$7 <> \$2 And \$7 <> \$3 And \$7 <> \$4 And \$7 <> \$5 And \$7 <> \$6

Do

\$8 = Random(1, \$e, 1)

Until \$8 <> \$1 And \$8 <> \$2 And \$8 <> \$3 And \$8 <> \$4 And \$8 <> \$5 And \$8 <> \$6 And \$8 <> \$7

Do

\$9 = Random(1, \$e, 1)

Until \$9 <> \$1 And \$9 <> \$2 And \$9 <> \$3 And \$9 <> \$4 And \$9 <> \$5 And \$9 <> \$6 And \$9 <> \$7 And \$9 <> \$8

Do

\$10 = Random(1, \$e, 1)

Until \$10 <> \$1 And \$10 <> \$2 And \$10 <> \$3 And \$10 <> \$4 And \$10 <> \$5 And \$10 <> \$6 And \$10 <> \$7 And \$10 <> \$8 And \$10 <> \$9

EndIf

;;;;sortowanie;;;;

\$11 = ""

\$22 = ""

\$33 = ""

\$44 = ""

\$55 = ""

\$66 = ""

\$77 = ""

\$88 = ""

\$99 = ""

\$100 = ""

If GUICtrlRead(\$Combo1) = "Expres Lotek" Then

If \$1 < \$2 and \$1 < \$3 and \$1 < \$4 and \$1 < \$5 Then

\$11 = \$1

Elseif \$1 > \$2 and \$1 < \$3 and \$1 < \$4 and \$1 < \$5 Then

\$22 = \$1

ElseIf \$1 < \$2 and \$1 > \$3 and \$1 < \$4 and \$1 < \$5 Then

\$22 = \$1

ElseIf \$1 < \$2 and \$1 < \$3 and \$1 > \$4 and \$1 < \$5 Then

\$22 = \$1

ElseIf \$1 < \$2 and \$1 < \$3 and \$1 < \$4 and \$1 > \$5 Then

\$22 = \$1

ElseIf \$1 > \$2 and \$1 > \$3 and \$1 < \$4 and \$1 < \$5 Then

\$33 = \$1

ElseIF \$1 > \$2 and \$1 < \$3 and \$1 > \$4 and \$1 < \$5 Then

\$33 = \$1

ElseIF \$1 > \$2 and \$1 < \$3 and \$1 < \$4 and \$1 > \$5 Then

\$33 = \$1

ElseIF \$1 < \$2 and \$1 > \$3 and \$1 > \$4 and \$1 < \$5 Then

\$33 = \$1

ElseIF \$1 < \$2 and \$1 > \$3 and \$1 < \$4 and \$1 > \$5 Then

\$33 = \$1

ElseIF \$1 < \$2 and \$1 < \$3 and \$1 > \$4 and \$1 > \$5 Then

\$33 = \$1

ElseIF \$1 > \$2 and \$1 > \$3 and \$1 > \$4 and \$1 < \$5 Then

\$44 = \$1

ElseIF \$1 > \$2 and \$1 > \$3 and \$1 < \$4 and \$1 > \$5 Then

\$44 = \$1

ElseIF \$1 > \$2 and \$1 > \$3 and \$1 < \$4 and \$1 < \$5 Then

\$44 = \$1

ElseIF \$1 > \$2 and \$1 < \$3 and \$1 > \$4 and \$1 > \$5 Then

\$44 = \$1

ElseIF \$1 < \$2 and \$1 > \$3 and \$1 > \$4 and \$1 > \$5 Then

\$44 = \$1

ElseIf \$1 > \$2 and \$1 > \$3 and \$1 > \$4 and \$1 > \$5 Then

\$55 = \$1

Else

MsgBox ( 16, "Error", "Blad w bibliotece sortowania. Prosze zlozyc raport na nr gg 5169464 ze w numerkach " & \$1 & ", " & \$2 & ", " & 3 & ", " & \$4 & " i " & \$5 & " wystapil ten blad")

endif

If \$2 < \$1 and \$2 < \$3 and \$2 < \$4 and \$2 < \$5 Then

\$11 = \$2

ElseIf \$2 > \$1 and \$2 < \$3 and \$2 < \$4 and \$2 < \$5 Then

\$22 = \$2

ElseIf \$2 < \$1 and \$2 > \$3 and \$2 < \$4 and \$2 < \$5 Then

\$22 = \$2

ElseIf \$2 < \$1 and \$2 < \$3 and \$2 > \$4 and \$2 < \$5 Then

\$22 = \$2

ElseIf \$2 < \$1 and \$2 < \$3 and \$2 < \$4 and \$2 > \$5 Then

\$22 = \$2

ElseIf \$2 > \$1 and \$2 > \$3 and \$2 < \$4 and \$2 < \$5 Then

\$33 = \$2

ElseIF \$2 > \$1 and \$2 < \$3 and \$2 > \$4 and \$2 < \$5 Then

\$33 = \$2

ElseIF \$2 > \$1 and \$2 < \$3 and \$2 < \$4 and \$2 > \$5 Then

\$33 = \$2

ElseIF \$2 < \$1 and \$2 > \$3 and \$2 > \$4 and \$2 < \$5 Then

\$33 = \$2

ElseIF \$2 < \$1 and \$2 > \$3 and \$2 < \$4 and \$2 > \$5 Then

\$33 = \$2

ElseIF \$2 < \$1 and \$2 < \$3 and \$2 > \$4 and \$2 > \$5 Then

\$33 = \$2

ElseIF \$2 > \$1 and \$2 > \$3 and \$2 > \$4 and \$2 < \$5 Then

\$44 = \$2

ElseIF \$2 > \$1 and \$2 > \$3 and \$2 < \$4 and \$2 > \$5 Then

\$44 = \$2

ElseIF \$2 > \$1 and \$2 > \$3 and \$2 < \$4 and \$2 < \$5 Then

\$44 = \$2

ElseIF \$2 > \$1 and \$2 < \$3 and \$2 > \$4 and \$2 > \$5 Then

\$44 = \$2

ElseIF \$2 < \$1 and \$2 > \$3 and \$2 > \$4 and \$2 > \$5 Then

\$44 = \$2

ElseIf \$2 > \$1 and \$2 > \$3 and \$2 > \$4 and \$2 > \$5 Then

\$55 = \$2

Else

MsgBox ( 16, "Error", "Blad w bibliotece sortowania. Prosze zlozyc raport na nr gg 5169464 ze w numerkach " & \$1 & ", " & \$2 & ", " & 3 & ", " & \$4 & " i " & \$5 & " wystapil ten blad")

endif

If \$3 < \$1 and \$3 < \$2 and \$3 < \$4 and \$3 < \$5 Then

\$11 = \$3

ElseIf \$3 > \$1 and \$3 < \$2 and \$3 < \$4 and \$3 < \$5 Then

\$22 = \$3

ElseIf \$3 < \$1 and \$3 > \$2 and \$3 < \$4 and \$3 < \$5 Then

\$22 = \$3

ElseIf \$3 < \$1 and \$3 < \$2 and \$3 > \$4 and \$3 < \$5 Then

\$22 = \$3

ElseIf \$3 < \$1 and \$3 < \$2 and \$3 < \$4 and \$3 > \$5 Then

\$22 = \$3

ElseIf \$3 > \$1 and \$3 > \$2 and \$3 < \$4 and \$3 < \$5 Then

\$33 = \$3

ElseIF \$3 > \$1 and \$3 < \$2 and \$3 > \$4 and \$3 < \$5 Then

\$33 = \$3

ElseIF \$3 > \$1 and \$3 < \$2 and \$3 < \$4 and \$3 > \$5 Then

\$33 = \$3

ElseIF \$3 < \$1 and \$3 > \$2 and \$3 > \$4 and \$3 < \$5 Then

\$33 = \$3

ElseIF \$3 < \$1 and \$3 > \$2 and \$3 < \$4 and \$3 > \$5 Then

\$33 = \$3

ElseIF \$3 < \$1 and \$3 < \$2 and \$3 > \$4 and \$3 > \$5 Then

\$33 = \$3

ElseIF \$3 > \$1 and \$3 > \$2 and \$3 > \$4 and \$3 < \$5 Then

\$44 = \$3

ElseIF \$3 > \$1 and \$3 > \$2 and \$3 < \$4 and \$3 > \$5 Then

\$44 = \$3

ElseIF \$3 > \$1 and \$3 > \$2 and \$3 < \$4 and \$3 < \$5 Then

\$44 = \$3

ElseIF \$3 > \$1 and \$3 < \$2 and \$3 > \$4 and \$3 > \$5 Then

\$44 = \$3

ElseIF \$3 < \$1 and \$3 > \$2 and \$3 > \$4 and \$3 > \$5 Then

\$44 = \$3

ElseIf \$3 > \$1 and \$3 > \$2 and \$3 > \$4 and \$3 > \$5 Then

\$55 = \$3

Else

MsgBox ( 16, "Error", "Blad w bibliotece sortowania. Prosze zlozyc raport na nr gg 5169464 ze w numerkach " & \$1 & ", " & \$2 & ", " & 3 & ", " & \$4 & " i " & \$5 & " wystapil ten blad")

endif

If \$4 < \$1 and \$4 < \$2 and \$4 < \$3 and \$4 < \$5 Then

\$11 = \$4

ElseIf \$4 > \$1 and \$4 < \$2 and \$4 < \$3 and \$4 < \$5 Then

\$22 = \$4

ElseIf \$4 < \$1 and \$4 > \$2 and \$4 < \$3 and \$4 < \$5 Then

\$22 = \$4

ElseIf \$4 < \$1 and \$4 < \$2 and \$4 > \$3 and \$4 < \$5 Then

\$22 = \$4

ElseIf \$4 < \$1 and \$4 < \$2 and \$4 < \$3 and \$4 > \$5 Then

\$22 = \$4

ElseIf \$4 > \$1 and \$4 > \$2 and \$4 < \$3 and \$4 < \$5 Then

\$33 = \$4

ElseIF \$4 > \$1 and \$4 < \$2 and \$4 > \$3 and \$4 < \$5 Then

\$33 = \$4

ElseIF \$4 > \$1 and \$4 < \$2 and \$4 < \$3 and \$4 > \$5 Then

\$33 = \$4

ElseIF \$4 < \$1 and \$4 > \$2 and \$4 > \$3 and \$4 < \$5 Then

\$33 = \$4

ElseIF \$4 < \$1 and \$4 > \$2 and \$4 < \$3 and \$4 > \$5 Then

\$33 = \$4

ElseIF \$4 < \$1 and \$4 < \$2 and \$4 > \$3 and \$4 > \$5 Then

\$33 = \$4

ElseIF \$4 > \$1 and \$4 > \$2 and \$4 > \$3 and \$4 < \$5 Then

\$44 = \$4

ElseIF \$4 > \$1 and \$4 > \$2 and \$4 < \$3 and \$4 > \$5 Then

\$44 = \$4

ElseIF \$4 > \$1 and \$4 > \$2 and \$4 < \$3 and \$4 < \$5 Then

\$44 = \$4

ElseIF \$4 > \$1 and \$4 < \$2 and \$4 > \$3 and \$4 > \$5 Then

\$44 = \$4

ElseIF \$4 < \$1 and \$4 > \$2 and \$4 > \$3 and \$4 > \$5 Then

\$44 = \$4

ElseIf \$4 > \$1 and \$4 > \$2 and \$4 > \$3 and \$4 > \$5 Then

\$55 = \$4

Else

MsgBox ( 16, "Error", "Blad w bibliotece sortowania. Prosze zlozyc raport na nr gg 5169464 ze w numerkach " & \$1 & ", " & \$2 & ", " & 3 & ", " & \$4 & " i " & \$5 & " wystapil ten blad")

endif

If \$5 < \$1 and \$5 < \$2 and \$5 < \$3 and \$5 < \$4 Then

\$11 = \$5

ElseIf \$5 > \$1 and \$5 < \$2 and \$5 < \$3 and \$5 < \$4 Then

\$22 = \$5

ElseIf \$5 < \$1 and \$5 > \$2 and \$5 < \$3 and \$5 < \$4 Then

\$22 = \$5

ElseIf \$5 < \$1 and \$5 < \$2 and \$5 > \$3 and \$5 < \$4 Then

\$22 = \$5

ElseIf \$5 < \$1 and \$5 < \$2 and \$5 < \$3 and \$5 > \$4 Then

\$22 = \$5

ElseIf \$5 > \$1 and \$5 > \$2 and \$5 < \$3 and \$5 < \$4 Then

\$33 = \$5

ElseIF \$5 > \$1 and \$5 < \$2 and \$5 > \$3 and \$5 < \$4 Then

\$33 = \$5

ElseIF \$5 > \$1 and \$5 < \$2 and \$5 < \$3 and \$5 > \$4 Then

\$33 = \$5

ElseIF \$5 < \$1 and \$5 > \$2 and \$5 > \$3 and \$5 < \$4 Then

\$33 = \$5

ElseIF \$5 < \$1 and \$5 > \$2 and \$5 < \$3 and \$5 > \$4 Then

\$33 = \$5

ElseIF \$5 < \$1 and \$5 < \$2 and \$5 > \$3 and \$5 > \$4 Then

\$33 = \$5

ElseIF \$5 > \$1 and \$5 > \$2 and \$5 > \$3 and \$5 < \$4 Then

\$44 = \$5

ElseIF \$5 > \$1 and \$5 > \$2 and \$5 < \$3 and \$5 > \$4 Then

\$44 = \$5

ElseIF \$5 > \$1 and \$5 > \$2 and \$5 < \$3 and \$5 < \$4 Then

\$44 = \$5

ElseIF \$5 > \$1 and \$5 < \$2 and \$5 > \$3 and \$5 > \$4 Then

\$44 = \$5

ElseIF \$5 < \$1 and \$5 > \$2 and \$5 > \$3 and \$5 > \$4 Then

\$44 = \$5

ElseIf \$5 > \$1 and \$5 > \$2 and \$5 > \$3 and \$5 > \$4 Then

\$55 = \$5

Else

MsgBox ( 16, "Error", "Blad w bibliotece sortowania. Prosze zlozyc raport na nr gg 5169464 ze w numerkach " & \$1 & ", " & \$2 & ", " & 3 & ", " & \$4 & " i " & \$5 & " wystapil ten blad")

endif

3. How to do imgsearch with half-transparent png file

Plz move that to general help

4. How to complite file with images and sound to 1 .exe file?

5. How to do a self-excracting file?

Edited by Dubler

##### Share on other sites

1. You probably want to use GuiCtrlSetData

4 and 5. Use FileInstall to include files into your exe (this will extract them to a location you specify when run)

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game

We're gonna need another Timmy!

##### Share on other sites

1. You probably want to use GuiCtrlSetData

4 and 5. Use FileInstall to include files into your exe (this will extract them to a location you specify when run)

1.

"Parameters

controlID The control identifier (controlID) as returned by a GUICtrlCreate... function.

data Combo, List, ListView, ListViewItem: An Opt("GUIDataSeparatorChar",...) separated list of items.

Progress: The percentage.

Slider: The value.

Group, Label, Button, Checkbox, Radio, Combo, List, Input, Edit, TabItem, TreeViewItem: Replaces the text.

Date : The date or time depending the style of the control.

Dummy: The value.

default [optional] Combo, List: The default value.

Edit, Input: If non-empty (""), the string is inserted at the current insertion point (caret).

"

thx for 4 and 5

##### Share on other sites

For #2

Really didn't understand your code's purpose but this may help point in right direction

```Local \$i = 1, \$max = 5, \$unique

If GUICtrlRead(\$Combo1) = "Duzy Lotek" Then
\$max = 6
ElseIf GUICtrlRead(\$Combo1) = "Multi Lotek" Then
\$max = 10
ElseIf GUICtrlRead(\$Combo1) = "Expres Lotek" Then
\$max = 50
EndIf

If \$e < \$max Then MsgBox(0,'','Error not possible')
Do
Do
\$unique = True
Assign(\$i,Random(1,\$e,1),1)
For \$n = 1 To \$i - 1
If \$i <> \$n And Eval(\$n) = Eval(\$i) Then \$unique = False
Next
Until \$unique
\$i += 1
Until \$i > \$max```

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

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