Search the Community
Showing results for tags 'arrary'.
Found 3 results
I am unable compare two 1d arrays and to assign values to third array $aDSloc1, Please help me out Local $aDSloc1[$LastRow] For $i = 1 To $LastRow For $j = 1 To $LastRow1 If $aDSlist1[$i]== $aLocDS1[$j] Then $aDSloc1[$i] = $aDSloc1[$i]+"," + $aLocNr1[$j] EndIf Next Next
i have a file flower.txt with the name of the flowers and there picture location and information about that kind of flower. i wana cerat a gui that will display the flower picture and it information here is the script #include <Misc.au3> #include <EditConstants.au3> #include <Constants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <AVIConstants.au3> #include <TreeViewConstants.au3> #include <GuiComboBox.au3> #include <GuiTab.au3> #include <file.au3> #include <array.au3> Global $sfPath = 'flowers.txt' Global $aFlowers _FileReadToArray($sfPath,$aFlowers,$FRTA_NOCOUNT,'|') _ArrayColDelete($aFlowers,0) ;row 0 has no data so deleting $Form1 = GUICreate("Search Flower Name",320, 480) $input = GUICtrlCreateInput("", 60, 360, 209, 25) $idss = GUICtrlCreateButton("Search", 130, 400, 73, 65) GUISetState(@SW_SHOW) Func Searchf() Global $Fname = GUICtrlRead($input) For $iNo = 0 To UBound($aFlowers) - 1 ; if $Fname = $aFlowers[$iNo] then MsgBox($MB_SYSTEMMODAL, "","Flower nfo", ""& $aFlowers[$iNo] &"") pic() EndIf Next EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $nMsg = $idss Searchf() EndSwitch WEnd func pic() For $iNo = 0 To UBound($aFlowers) - 1 GUICtrlCreatePic($aFlowers[$iNo], 20, 30, 280, 280) Next EndFunc here is the flower.txt file |Hibiscus|Hibiscus is a hardy perennial which grows in variety of colors, sizes and fragrances. Actually they are tropical flowers which require ample sunlight and moisture to grow well. These flowers start blooming in late spring and continuously bloom through July and August.|C:\T-in\IMG\2.jpg |Lilies|There are different types of lily flowers which bloom in August including water lilies, tiger lilies and gold band lilies. Tiger lilies generate orange flowers having black spots. This lily blooms in delayed July and beginning of August. Gold band lily produce exotic white blooms. All varieties of lilies need enough space to grow and protection from summer sun.|C:\T-in\IMG\1.jpg |Turtlehead|Growing in humid areas, turtleheads are small flowers which bloom from July to September. They mostly produce flowers of white and pink color.|C:\T-in\IMG\3.jpg |Hydrangea|These are ever green bushes which produce flowers in different colors including white, purple, blue and pink. They are easy to grow bushes and can grow 3 to 10 feet tall. They require morning sun to grow but they should be protected from noon and afternoon sun.|C:\T-in\IMG\4.jpg |Dahlias|August proves to be the peak blooming season for dahlias. Dahlias come in colors like white, orange, yellow, red and purple. They can tolerate all types of soil and require full sun to grow.|C:\T-in\IMG\5.jpg am still trying to learn about how the ubound work and the _filereadtoarray
[Rule] 1. A start would be to get this excel spreadsheet, people called the group, a total divided into two groups: Mary, Sam, Jack 2. Every person eating a fruit, and each times one person can eat the same fruit (or random fruit) 3. Last eaten fruit can not eat 4. so be scheduled 5. If the previous round fruits are finished, the remaining number can pick one randomly 6. If I have more than 100 the number of Name(people), how can I to code it? Picture: 1. The first time Mary eat Apple, Sam can eat Apple(or random),and Jack chose random first to eat. 2. The second They are chose random first to eat. 3. Third They are chose random first to eat. 4. Fourth Sam chose tomato,because the previous round fruits are finished, the remaining number can pick one randomly ,Jack is too. 5. Fifth Sam chose tomato,because the previous round fruits are finished, the remaining number can pick one randomly ,Jack is too. Currently only think of using arrary and for next loop to write it, but I do not know to write Detailing, want to please help me, thank you very much !!!! Thank you!!