Jump to content

Peggy

Members
  • Posts

    13
  • Joined

  • Last visited

Recent Profile Visitors

101 profile views

Peggy's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi Melba23, That is the fuction I want, thank you for helping me so much ,I'm so happy!! About this program, this is the process of class scheduling .I just say for an example:eating fruit, that will be easy to understand for you. Thank you very very much !!!!!You're the best person I've ever seen~!!
  2. Hi Melba23, Thanks for your reply!!!I feel very moved!! - Every person eating a fruit, and each times one person can eat the same fruit (or random fruit): each round one person can eat the same fruit,but next time one person can't eat previous eaten fruit(Unless the previous have all finished). - If the previous round fruits are finished, the remaining number can pick one randomly: This function can be deleted, if the previous finish, behind may be left blank.(If that can to do, can be randomly selected) As shown below [Rule]1. A start would be to get this excel spreadsheet, people called the group, a total divided into two groups: Mary, Sam, Jack , Jason, Susan 1. Round 1: each one Random choice.(Each one can choose the same fruit) 2. Round 2: each one Random choice.(each one can't eat Previous fruit Unless all eaten up) 3. Round 3,4,5,6: And so on,  each one Random choice.(each one can't eat Previous fruit Unless all eaten up,This feature is not essential) Thanks for your great help!! p.s. If name more than the amount of fruits (Ex: name x7, fruit max: 5), than someone will be blank at previous round, we hope to end with five round. we hope result is .. Thanks for your great help!!
  3. [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!!
  4. [Solved]
  5. I have a excel file(),original Variable as below: $aData[][] = [["Mary", 5, "Apple", "Banana", "Tomato", "Watermelon", "Strawberry"], _ ["Sam", 3, "Apple", "Tomato", "Strawberry"], _ ["Jack", 3, "Banana", "Watermelon", "Strawberry"]] I want to use one Variable to represent each Variable as below:(Easy to expand the number) $aData[][] = [$Name, $amount , $fruit] But I don't know how to code,It really baffles me,I want to ask for your assistance~~ Thank you very very much!!!!!!!!!!
  6. Sorry, I was quite busy some time ago. Thanks for your help!! This Help me solve a large problem, really thank you for your help!!!!!!
  7. Hi Melba23, Thanks for your help very much!!!! If I want to add new name and Fruit,how can i to do? Thank you very much!!!!
  8. [Rule] 1. A start would be to get this excel spreadsheet, people called the group, a total divided into two groups: Mary, Sam 2. Every person eating a fruit, but each times can not eat the same fruit 3. Last eaten fruit can not eat 4. so be scheduled Picture: 1. The first time Mary eat Apple, Sam can not eat Apple, so Sam chose to eat tomato 2. The second Mary eat Banana, Sam choose to eat Apple 3. Third Mary eat tomato, Sam for the first time has been eaten tomato, so Sam chose to eat Strawberry 4. Fourth Mary eat watermelon, Sam all eat so do not choose 5. Fifth Mary eat Strawberry, Sam all eat so do not choose 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!
  9. initially I will receive excel file in the following figure His class species is divided into two categories: Fruit and Fruit-AB When the re-ranking process, the first group of the first search Fruit and Fruit-AB first group, but because the first two groups are all Apple, so Fruit-AB group automatically search the next, and in the next column to make a X, shown below. So such a rule, after the completion of the following figure. I would like to ask each for how to coding? Thank you very much !!!!
  10. I want to coding a excel sort,scheduling system. When I input orgin file,and choose times(example is 7 times(A -->G)) system will output excel. (rule: 1 time include 1 Name ,but Food can't Repeat. secend's Food can't overlap with previous) How to codng of it ?!!!! Thank you veryvery much!!!!!! test.xlsx
  11. Thank you ,orbs!!! I tried to modify hothey and plus $ set at the top of my script, when I use right key is OK,but use left key,this program can't run. Thank you for your help! My code right know is: #include <GUIConstants.au3> Dim $Pick[5], $pics = 4 Global $set $Form1 = GUICreate("NextImage", 414, 305, 246, 194) $Pick[1]= GUICtrlCreatePic(@ScriptDir&"\pic\Desert.jpg", 8, 8, 393, 233) $Pick[2]= GUICtrlCreatePic(@ScriptDir&"\pic\Jellyfish.jpg", 8, 8, 393, 233) GUICtrlSetState( -1, $GUI_HIDE) $Pick[3]= GUICtrlCreatePic(@ScriptDir&"\pic\Tulips.jpg", 8, 8, 393, 233) GUICtrlSetState( -1, $GUI_HIDE) $Pick[4]= GUICtrlCreatePic(@ScriptDir&"\pic\Lighthouse.jpg", 8, 8, 393, 233) GUICtrlSetState( -1, $GUI_HIDE) $notice = GUICtrlCreateLabel("Picture #1", 20, 258, 100, 30) GUICtrlSetFont( -1, 15, 700) $Back= GUICtrlCreateButton("Back", 160, 256, 97, 41) $Next = HotKeySet("{RIGHT}" , "RIGHT") GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = -3 ExitLoop Case $msg = $Back $set = -1 get_pic($set) Case $msg = $Next $set = 1 get_pic($set) Case Else EndSelect WEnd Exit Func get_pic($t) For $x = 1 to $pics $State = GUICtrlGetState($pick[$x]) If $State = 80 Then If $x = 1 And $t = -1 Then Return If $x = $pics And $t = 1 Then Return Guictrlsetstate($Pick[$x], $GUI_HIDE) Guictrlsetstate($Pick[$x + $set], $GUI_SHOW) GUICtrlSetData($notice, "Picture #" & $x + $set) Return EndIf Next EndFunc Func LEFT() MsgBox(1,'title',$Back) $msg = $Back EndFunc Func RIGHT() $msg = $Next EndFunc
  12. I want to create simple picture viewer (use Direction keys (left right) to next image), but can't run. What happen with this program?!!! Thanks everyone!!!! #include <GUIConstants.au3> Dim $Pick[5], $pics = 4 $Form1 = GUICreate("NextImage", 414, 305, 246, 194) $Pick[1]= GUICtrlCreatePic(@ScriptDir&"\pic\Desert.jpg", 8, 8, 393, 233) $Pick[2]= GUICtrlCreatePic(@ScriptDir&"\pic\Jellyfish.jpg", 8, 8, 393, 233) GUICtrlSetState( -1, $GUI_HIDE) $Pick[3]= GUICtrlCreatePic(@ScriptDir&"\pic\Tulips.jpg", 8, 8, 393, 233) GUICtrlSetState( -1, $GUI_HIDE) $Pick[4]= GUICtrlCreatePic(@ScriptDir&"\pic\Lighthouse.jpg", 8, 8, 393, 233) GUICtrlSetState( -1, $GUI_HIDE) $notice = GUICtrlCreateLabel("Picture #1", 20, 258, 100, 30) GUICtrlSetFont( -1, 15, 700) $Back= GUICtrlCreateButton("Back", 160, 256, 97, 41) $Next = GUICtrlCreateButton("Next", 264, 256, 97, 41) HotKeySet("{RIGHT}" , "RIGHT()") HotKeySet("{LEFT}" , "LEFT()") GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = -3 ExitLoop Case $msg = $Back $set = -1 get_pic($set) Case $msg = $Next $set = 1 get_pic($set) Case HotKeySet("{down}") $set = -1 get_pic($set) Case Else EndSelect WEnd Exit Func get_pic($t) For $x = 1 to $pics $State = GUICtrlGetState($pick[$x]) If $State = 80 Then If $x = 1 And $t = -1 Then Return If $x = $pics And $t = 1 Then Return Guictrlsetstate($Pick[$x], $GUI_HIDE) Guictrlsetstate($Pick[$x + $set], $GUI_SHOW) GUICtrlSetData($notice, "Picture #" & $x + $set) Return EndIf Next EndFunc Func LEFT() $set = -1 get_pic($set) EndFunc Func RIGHT() $set = 1 get_pic($set) EndFunc
×
×
  • Create New...