daedlus Posted August 12, 2006 Share Posted August 12, 2006 What I am trying to do is give a preview of the JPG on the right hand of the screen according to the selection on the Left hand of the screen... This works, but the images keep flashing. Some one please help I know this shouldnt be this hard. expandcollapse popup#include <GUIConstants.au3> GUICreate ("Test",580,400) GUISetFont(14,600) GUICtrlCreateLabel("Testing",50,5) GUISetFont(9,400) $APP1_RADIO = GUICtrlCreateRadio("Blue",50,55,100,20) $APP2_RADIO = GUICtrlCreateRadio("Silver",50,75,100) $APP3_RADIO = GUICtrlCreateRadio("Green",50,95,100) $APP4_RADIO = GUICtrlCreateRadio("Black",50,115,100) $APP5_RADIO = GUICtrlCreateRadio("Gold",50,135,100) $EXIT = GUICtrlCreateButton("Exit",330,350,120,20) $RUN = GUICtrlCreateButton("Run >>",450,350,120,20) GUISetState() Do $msg = GUIGetMsg() $status1 = GUICtrlRead($APP1_RADIO) $status2 = GUICtrlRead($APP2_RADIO) $status3 = GUICtrlRead($APP3_RADIO) $status4 = GUICtrlRead($APP4_RADIO) $status5 = GUICtrlRead($APP5_RADIO) if $status1 = 1 then GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) if $status2 = 1 then GUICtrlCreatePic("D:\Files\Silver.jpg",200, 50,0,0) if $status3 = 1 then GUICtrlCreatePic("D:\Files\Green.jpg",200, 50,0,0) if $status4 = 1 then GUICtrlCreatePic("D:\Files\Black.jpg",200, 50,0,0) if $status5 = 1 then GUICtrlCreatePic("D:\Files\Gold.jpg",200, 50,0,0) Until $msg = $EXIT or $msg = $RUN If $msg = $EXIT then Exit IF $status1 = 1 then call ("APP_1") IF $status2 = 1 then call ("APP_2") IF $status3 = 1 then call ("APP_3") IF $status4 = 1 then call ("APP_4") IF $status5 = 1 then call ("APP_5") Call ("END_APP") Func APP_1() EndFunc Func APP_2() EndFunc Func APP_3() EndFunc Func APP_4() EndFunc Func APP_5() EndFunc Func END_APP() MsgBox(4096,"Complete","Completed") EndFunc Link to comment Share on other sites More sharing options...
NELyon Posted August 12, 2006 Share Posted August 12, 2006 Try this: expandcollapse popup#include <GUIConstants.au3> GUICreate ("Test",580,400) WinSetTrans("Test", "", 255) GUISetFont(14,600) GUICtrlCreateLabel("Testing",50,5) GUISetFont(9,400) $APP1_RADIO = GUICtrlCreateRadio("Blue",50,55,100,20) $APP2_RADIO = GUICtrlCreateRadio("Silver",50,75,100) $APP3_RADIO = GUICtrlCreateRadio("Green",50,95,100) $APP4_RADIO = GUICtrlCreateRadio("Black",50,115,100) $APP5_RADIO = GUICtrlCreateRadio("Gold",50,135,100) $EXIT = GUICtrlCreateButton("Exit",330,350,120,20) $RUN = GUICtrlCreateButton("Run >>",450,350,120,20) GUISetState() Do $msg = GUIGetMsg() $status1 = GUICtrlRead($APP1_RADIO) $status2 = GUICtrlRead($APP2_RADIO) $status3 = GUICtrlRead($APP3_RADIO) $status4 = GUICtrlRead($APP4_RADIO) $status5 = GUICtrlRead($APP5_RADIO) if $status1 = 1 then GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) if $status2 = 1 then GUICtrlCreatePic("D:\Files\Silver.jpg",200, 50,0,0) if $status3 = 1 then GUICtrlCreatePic("D:\Files\Green.jpg",200, 50,0,0) if $status4 = 1 then GUICtrlCreatePic("D:\Files\Black.jpg",200, 50,0,0) if $status5 = 1 then GUICtrlCreatePic("D:\Files\Gold.jpg",200, 50,0,0) Until $msg = $EXIT or $msg = $RUN If $msg = $EXIT then Exit IF $status1 = 1 then APP_1() IF $status2 = 1 then APP_2() IF $status3 = 1 then APP_3() IF $status4 = 1 then APP_4() IF $status5 = 1 then APP_5() END_APP() Func APP_1() EndFunc Func APP_2() EndFunc Func APP_3() EndFunc Func APP_4() EndFunc Func APP_5() EndFunc Func END_APP() MsgBox(4096,"Complete","Completed") EndFunc I cleared up your Call(). Call is evil. Link to comment Share on other sites More sharing options...
daedlus Posted August 12, 2006 Author Share Posted August 12, 2006 Try this:I cleared up your Call(). Call is evil.Same thing Link to comment Share on other sites More sharing options...
NELyon Posted August 12, 2006 Share Posted August 12, 2006 hmm... then i have no idea Link to comment Share on other sites More sharing options...
daedlus Posted August 12, 2006 Author Share Posted August 12, 2006 hmm... then i have no ideaThanks for trying! Link to comment Share on other sites More sharing options...
Zib Posted August 12, 2006 Share Posted August 12, 2006 This is my solution. I changed a lot of code.. sorry. expandcollapse popup#include <GUIConstants.au3> GUICreate ("Test",580,400) GUISetFont(14,600) GUICtrlCreateLabel("Testing",50,5) GUISetFont(9,400) $APP_1_RADIO = GUICtrlCreateRadio("Blue",50,55,100,20) $APP_2_RADIO = GUICtrlCreateRadio("Silver",50,75,100) $APP_3_RADIO = GUICtrlCreateRadio("Green",50,95,100) $APP_4_RADIO = GUICtrlCreateRadio("Black",50,115,100) $APP_5_RADIO = GUICtrlCreateRadio("Gold",50,135,100) $EXIT = GUICtrlCreateButton("Exit",330,350,120,20) $RUN = GUICtrlCreateButton("Run >>",450,350,120,20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Exit Exit Case $msg = $RUN ExitLoop Case $msg = $APP_1_RADIO GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) Case $msg = $APP_2_RADIO GUICtrlCreatePic("D:\Files\Silver.jpg",200, 50,0,0) Case $msg = $APP_3_RADIO GUICtrlCreatePic("D:\Files\Green.jpg",200, 50,0,0) Case $msg = $APP_4_RADIO GUICtrlCreatePic("D:\Files\Black.jpg",200, 50,0,0) Case $msg = $APP_5_RADIO GUICtrlCreatePic("D:\Files\Gold.jpg",200, 50,0,0) Case Else ;;;;;;; EndSelect WEnd Select Case GUICtrlRead($APP_1_RADIO) = $GUI_CHECKED APP_1() Case GUICtrlRead($APP_2_RADIO) = $GUI_CHECKED APP_2() Case GUICtrlRead($APP_3_RADIO) = $GUI_CHECKED APP_3() Case GUICtrlRead($APP_4_RADIO) = $GUI_CHECKED APP_4() Case GUICtrlRead($APP_5_RADIO) = $GUI_CHECKED APP_5() Case Else ;;;; EndSelect END_APP() Func APP_1() EndFunc Func APP_2() EndFunc Func APP_3() EndFunc Func APP_4() EndFunc Func APP_5() EndFunc Func END_APP() MsgBox(4096,"Complete","Completed") EndFunc Link to comment Share on other sites More sharing options...
Danny35d Posted August 12, 2006 Share Posted August 12, 2006 Try this...expandcollapse popup#include <GUIConstants.au3> GUICreate ("Test",580,400) GUISetFont(14,600) GUICtrlCreateLabel("Testing",50,5) GUISetFont(9,400) $APP1_RADIO = GUICtrlCreateRadio("Blue",50,55,100,20) $APP2_RADIO = GUICtrlCreateRadio("Silver",50,75,100) $APP3_RADIO = GUICtrlCreateRadio("Green",50,95,100) $APP4_RADIO = GUICtrlCreateRadio("Black",50,115,100) $APP5_RADIO = GUICtrlCreateRadio("Gold",50,135,100) $Pic1 = GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic2 = GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic3 = GUICtrlCreatePic("D:\Files\Silver.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic4 = GUICtrlCreatePic("D:\Files\Green.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic5 = GUICtrlCreatePic("D:\Files\Gold.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $EXIT = GUICtrlCreateButton("Exit",330,350,120,20) $RUN = GUICtrlCreateButton("Run >>",450,350,120,20) GUISetState() Do $msg = GUIGetMsg() $status1 = GUICtrlRead($APP1_RADIO) $status2 = GUICtrlRead($APP2_RADIO) $status3 = GUICtrlRead($APP3_RADIO) $status4 = GUICtrlRead($APP4_RADIO) $status5 = GUICtrlRead($APP5_RADIO) if $status1 = 1 And GUICtrlGetState($Pic1) = 160 then _SetPic($Pic1) if $status2 = 1 And GUICtrlGetState($Pic2) = 160 then _SetPic($Pic2) if $status3 = 1 And GUICtrlGetState($Pic3) = 160 then _SetPic($Pic3) if $status4 = 1 And GUICtrlGetState($Pic4) = 160 then _SetPic($Pic4) if $status5 = 1 And GUICtrlGetState($Pic5) = 160 then _SetPic($Pic5) Until $msg = $EXIT or $msg = $RUN If $msg = $EXIT then Exit IF $status1 = 1 then call ("APP_1") IF $status2 = 1 then call ("APP_2") IF $status3 = 1 then call ("APP_3") IF $status4 = 1 then call ("APP_4") IF $status5 = 1 then call ("APP_5") Call ("END_APP") Func APP_1() EndFunc Func APP_2() EndFunc Func APP_3() EndFunc Func APP_4() EndFunc Func APP_5() EndFunc Func END_APP() MsgBox(4096,"Complete","Completed") EndFunc Func _SetPic($PicControlID) GUICtrlSetState($Pic1, $GUI_HIDE) GUICtrlSetState($Pic2, $GUI_HIDE) GUICtrlSetState($Pic3, $GUI_HIDE) GUICtrlSetState($Pic4, $GUI_HIDE) GUICtrlSetState($Pic5, $GUI_HIDE) GUICtrlSetState($PicControlID, $GUI_SHOW) EndFunc AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
daedlus Posted August 12, 2006 Author Share Posted August 12, 2006 This is my solution. I changed a lot of code.. sorry.I tryed that and it stops the flashing, but the pictures act weird. like if I click on "blue" it shows blue. Then I click on silver and it stays on the blue picture, unless I minimize the window. So I guess now its not refreshing the spot where the pic isdoes that make sense? Link to comment Share on other sites More sharing options...
daedlus Posted August 12, 2006 Author Share Posted August 12, 2006 (edited) Try this...expandcollapse popup#include <GUIConstants.au3> GUICreate ("Test",580,400) GUISetFont(14,600) GUICtrlCreateLabel("Testing",50,5) GUISetFont(9,400) $APP1_RADIO = GUICtrlCreateRadio("Blue",50,55,100,20) $APP2_RADIO = GUICtrlCreateRadio("Silver",50,75,100) $APP3_RADIO = GUICtrlCreateRadio("Green",50,95,100) $APP4_RADIO = GUICtrlCreateRadio("Black",50,115,100) $APP5_RADIO = GUICtrlCreateRadio("Gold",50,135,100) $Pic1 = GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic2 = GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic3 = GUICtrlCreatePic("D:\Files\Silver.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic4 = GUICtrlCreatePic("D:\Files\Green.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic5 = GUICtrlCreatePic("D:\Files\Gold.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $EXIT = GUICtrlCreateButton("Exit",330,350,120,20) $RUN = GUICtrlCreateButton("Run >>",450,350,120,20) GUISetState() Do $msg = GUIGetMsg() $status1 = GUICtrlRead($APP1_RADIO) $status2 = GUICtrlRead($APP2_RADIO) $status3 = GUICtrlRead($APP3_RADIO) $status4 = GUICtrlRead($APP4_RADIO) $status5 = GUICtrlRead($APP5_RADIO) if $status1 = 1 And GUICtrlGetState($Pic1) = 160 then _SetPic($Pic1) if $status2 = 1 And GUICtrlGetState($Pic2) = 160 then _SetPic($Pic2) if $status3 = 1 And GUICtrlGetState($Pic3) = 160 then _SetPic($Pic3) if $status4 = 1 And GUICtrlGetState($Pic4) = 160 then _SetPic($Pic4) if $status5 = 1 And GUICtrlGetState($Pic5) = 160 then _SetPic($Pic5) Until $msg = $EXIT or $msg = $RUN If $msg = $EXIT then Exit IF $status1 = 1 then call ("APP_1") IF $status2 = 1 then call ("APP_2") IF $status3 = 1 then call ("APP_3") IF $status4 = 1 then call ("APP_4") IF $status5 = 1 then call ("APP_5") Call ("END_APP") Func APP_1() EndFunc Func APP_2() EndFunc Func APP_3() EndFunc Func APP_4() EndFunc Func APP_5() EndFunc Func END_APP() MsgBox(4096,"Complete","Completed") EndFunc Func _SetPic($PicControlID) GUICtrlSetState($Pic1, $GUI_HIDE) GUICtrlSetState($Pic2, $GUI_HIDE) GUICtrlSetState($Pic3, $GUI_HIDE) GUICtrlSetState($Pic4, $GUI_HIDE) GUICtrlSetState($Pic5, $GUI_HIDE) GUICtrlSetState($PicControlID, $GUI_SHOW) EndFunc THIS WORKS! thank you very much though it was more complicated then I thought it would be Edited August 12, 2006 by daedlus Link to comment Share on other sites More sharing options...
Zib Posted August 13, 2006 Share Posted August 13, 2006 Adaptation of both methods. Although it could still be shortened. expandcollapse popup#include <GUIConstants.au3> GUICreate ("Test",580,400) GUISetFont(14,600) GUICtrlCreateLabel("Testing",50,5) GUISetFont(9,400) $APP_1_RADIO = GUICtrlCreateRadio("Blue",50,55,100,20) $APP_2_RADIO = GUICtrlCreateRadio("Silver",50,75,100) $APP_3_RADIO = GUICtrlCreateRadio("Green",50,95,100) $APP_4_RADIO = GUICtrlCreateRadio("Black",50,115,100) $APP_5_RADIO = GUICtrlCreateRadio("Gold",50,135,100) $EXIT = GUICtrlCreateButton("Exit",330,350,120,20) $RUN = GUICtrlCreateButton("Run >>",450,350,120,20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Exit Exit Case $msg = $RUN ExitLoop Case $msg = $APP_1_RADIO $Pic1 = GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) SetPic(1) Case $msg = $APP_2_RADIO $Pic2 = GUICtrlCreatePic("D:\Files\Silver.jpg",200, 50,0,0) SetPic(2) Case $msg = $APP_3_RADIO $Pic3 = GUICtrlCreatePic("D:\Files\Green.jpg",200, 50,0,0) SetPic(3) Case $msg = $APP_4_RADIO $Pic4 = GUICtrlCreatePic("D:\Files\Black.jpg",200, 50,0,0) SetPic(4) Case $msg = $APP_5_RADIO $Pic5 = GUICtrlCreatePic("D:\Files\Gold.jpg",200, 50,0,0) SetPic(5) Case Else ;;;;;;; EndSelect WEnd Select Case GUICtrlRead($APP_1_RADIO) = $GUI_CHECKED APP_1() Case GUICtrlRead($APP_2_RADIO) = $GUI_CHECKED APP_2() Case GUICtrlRead($APP_3_RADIO) = $GUI_CHECKED APP_3() Case GUICtrlRead($APP_4_RADIO) = $GUI_CHECKED APP_4() Case GUICtrlRead($APP_5_RADIO) = $GUI_CHECKED APP_5() Case Else ;;;; EndSelect END_APP() Func SetPic($sp_Num) For $i = 1 To 5 If $i <> $sp_Num Then GUICtrlSetState(Eval("Pic" & $i), $GUI_DISABLE) Next EndFunc Func APP_1() EndFunc Func APP_2() EndFunc Func APP_3() EndFunc Func APP_4() EndFunc Func APP_5() EndFunc Func END_APP() MsgBox(4096,"Complete","Completed") EndFunc Link to comment Share on other sites More sharing options...
Danny35d Posted August 13, 2006 Share Posted August 13, 2006 Adaptation of both methods. Although it could still be shortened.@Zib The only problem with the script is if you keep switching between selection (Blue, Silver, Black, etc...) you will see the picture flashing. This is the reason why I create all the pictures first and then disable and hide. After selecting, SetPic() function will hide all the pictures and show the selected picture. Try this example and compare with your script. expandcollapse popup#include <GUIConstants.au3> GUICreate ("Test",580,400) GUISetFont(14,600) GUICtrlCreateLabel("Testing",50,5) GUISetFont(9,400) $APP_1_RADIO = GUICtrlCreateRadio("Blue",50,55,100,20) $APP_2_RADIO = GUICtrlCreateRadio("Silver",50,75,100) $APP_3_RADIO = GUICtrlCreateRadio("Green",50,95,100) $APP_4_RADIO = GUICtrlCreateRadio("Black",50,115,100) $APP_5_RADIO = GUICtrlCreateRadio("Gold",50,135,100) $Pic1 = GUICtrlCreatePic("D:\Files\Blue.jpg",200, 50,0,0) $Pic2 = GUICtrlCreatePic("D:\Files\Silver.jpg",200, 50,0,0) $Pic3 = GUICtrlCreatePic("D:\Files\Green.jpg",200, 50,0,0) $Pic4 = GUICtrlCreatePic("D:\Files\Black.jpg",200, 50,0,0) $Pic5 = GUICtrlCreatePic("D:\Files\Gold.jpg",200, 50,0,0) For $i = 1 To 5 GUICtrlSetState(Eval("Pic" & $i), $GUI_DISABLE + $GUI_HIDE) Next $EXIT = GUICtrlCreateButton("Exit",330,350,120,20) $RUN = GUICtrlCreateButton("Run >>",450,350,120,20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Exit Exit Case $msg = $RUN ExitLoop Case $msg = $APP_1_RADIO SetPic(1) Case $msg = $APP_2_RADIO SetPic(2) Case $msg = $APP_3_RADIO SetPic(3) Case $msg = $APP_4_RADIO SetPic(4) Case $msg = $APP_5_RADIO SetPic(5) Case Else ;;;;;;; EndSelect WEnd Select Case GUICtrlRead($APP_1_RADIO) = $GUI_CHECKED APP_1() Case GUICtrlRead($APP_2_RADIO) = $GUI_CHECKED APP_2() Case GUICtrlRead($APP_3_RADIO) = $GUI_CHECKED APP_3() Case GUICtrlRead($APP_4_RADIO) = $GUI_CHECKED APP_4() Case GUICtrlRead($APP_5_RADIO) = $GUI_CHECKED APP_5() Case Else ;;;; EndSelect END_APP() Func SetPic($sp_Num) For $i = 1 To 5 GUICtrlSetState(Eval("Pic" & $i), $GUI_HIDE) Next GUICtrlSetState(Eval("Pic" & $sp_Num), $GUI_SHOW) EndFunc Func APP_1() EndFunc Func APP_2() EndFunc Func APP_3() EndFunc Func APP_4() EndFunc Func APP_5() EndFunc Func END_APP() MsgBox(4096,"Complete","Completed") EndFunc AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Zib Posted August 13, 2006 Share Posted August 13, 2006 @Zib The only problem with the script is if you keep switching between selection (Blue, Silver, Black, etc...) you will see the picture flashing. This is the reason why I create all the pictures first and then disable and hide. After selecting, SetPic() function will hide all the pictures and show the selected picture. Try this example and compare with your script.Ah, I get where you were going now. I didn't understand the point of disabling them at the time. That definitely makes more sense. Link to comment Share on other sites More sharing options...
daedlus Posted August 17, 2006 Author Share Posted August 17, 2006 I have taken the script and put it into a parent/child GUI and now the pictures are not showing up at all... expandcollapse popup#NoTrayIcon #include <GuiConstants.au3> Dim $show = 0, $Child_[14], $children = 13 $Main = GuiCreate("Gui",580,400, (@DesktopWidth-516)/2, (@DesktopHeight-323)/2) $Button_1 = GuiCtrlCreateButton("&Next >", 490, 370, 80, 25) $Button_2 = GuiCtrlCreateButton("< &Back", 409, 370, 80, 25) $Button_3 = GuiCtrlCreateButton("&Exit", 309, 370, 80, 25) GuiSetState() ;################################################################################################################################# 1 $Child_[1] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("1",50,60) GUISetState() ;################################################################################################################################# 2 $Child_[2] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("2",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 3 $Child_[3] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("3",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 4 $Child_[4] = GuiCreate("", 573,360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("4",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 5 $Child_[5] = GuiCreate("", 573,360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("5",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 6 $Child_[6] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("6",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 7 $Child_[7] = GuiCreate("", 573,360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("7",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 8 $Child_[8] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreatePic("Files\banner8.jpg",0,-3,575,58) $APP8_1_RADIO = GUICtrlCreateRadio("Blue",50,55,100,20) $APP8_2_RADIO = GUICtrlCreateRadio("Silver",50,75,100) $APP8_3_RADIO = GUICtrlCreateRadio("Green",50,95,100) $APP8_4_RADIO = GUICtrlCreateRadio("Black",50,115,100) $APP8_5_RADIO = GUICtrlCreateRadio("Gold",50,135,100) $Pic8_1 = GUICtrlCreatePic("Files\Blue.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic8_2 = GUICtrlCreatePic("Files\Silver.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic8_3 = GUICtrlCreatePic("Files\Green.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic8_4 = GUICtrlCreatePic("Files\Black.jpg",200, 50,0,0) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $Pic8_5 = GUICtrlCreatePic("Files\Gold.jpg",200, 50,345,220) GUICtrlSetState(-1, $GUI_DISABLE + $GUI_HIDE) $file8_1 = ("Files\Temp3.txt") FileOpen($file8_1,1) Func APP8_1() EndFunc Func APP8_2() EndFunc Func APP8_3() EndFunc Func APP8_4() EndFunc Func APP8_5() EndFunc Func END8_APP() EndFunc Func _SetPic($PicControlID) GUICtrlSetState($Pic8_1, $GUI_HIDE) GUICtrlSetState($Pic8_2, $GUI_HIDE) GUICtrlSetState($Pic8_3, $GUI_HIDE) GUICtrlSetState($Pic8_4, $GUI_HIDE) GUICtrlSetState($Pic8_5, $GUI_HIDE) GUICtrlSetState($PicControlID, $GUI_SHOW) EndFunc GuiSetState(@SW_HIDE) ;################################################################################################################################# 9 $Child_[9] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("9",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 10 $Child_[10] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("10",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 11 $Child_[11] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("11",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 12 $Child_[12] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) GUICtrlCreateLabel("12",50,60) GuiSetState(@SW_HIDE) ;################################################################################################################################# 13 $Child_[13] = GuiCreate("", 573, 360, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Button_9 = GuiCtrlCreateButton("GO", 486, 330, 80, 25) GuiSetState(@SW_HIDE) ;################################################################################################################################# END While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_3 ExitLoop Case $msg = $Button_1 Set_Next() Case $msg = $Button_2 Set_Back() Case $msg = $Button_9 Set_GO() ;;;; EndSelect WEnd Func Set_Next() For $x = 1 to $children -1 $Nwin = WinGetState( $child_[$x] ) If $Nwin > 5 Then GuiSetState( @SW_HIDE, $child_[$x]) GuiSetState( @SW_SHOW, $child_[$x +1]) Return EndIf Next EndFunc Func Set_Back() For $x = $children To 1 Step -1 $Nwin = WinGetState( $child_[$x] ) If $Nwin > 5 Then GuiSetState( @SW_HIDE, $child_[$x]) GuiSetState( @SW_SHOW, $child_[$x -1]) Return EndIf Next EndFunc Func Set_GO() GUISetFont (9,900) Do $msg = GUIGetMsg() ;888888888888888888888888888888888888888888888888888888888888888888 $status8_1 = GUICtrlRead($APP8_1_RADIO) $status8_2 = GUICtrlRead($APP8_2_RADIO) $status8_3 = GUICtrlRead($APP8_3_RADIO) $status8_4 = GUICtrlRead($APP8_4_RADIO) $status8_5 = GUICtrlRead($APP8_5_RADIO) ;ENDENDENDENDENDENDENDENDENDENDENDENDENDENDENDENDENDENDENDENDENDEND Until $msg = $Button_1 or $msg = $Button_3 or $GUI_EVENT_CLOSE If $msg = $Button_3 then Exit ;888888888888888888888888888888888888888888888888888888888888888888 IF $status8_1 = 1 then call ("APP8_1") IF $status8_2 = 1 then call ("APP8_2") IF $status8_3 = 1 then call ("APP8_3") IF $status8_4 = 1 then call ("APP8_4") IF $status8_5 = 1 then call ("APP8_5") IF $status8_1 = 1 And GUICtrlGetState($Pic8_1) = 160 then _SetPic($Pic8_1) IF $status8_2 = 1 And GUICtrlGetState($Pic8_2) = 160 then _SetPic($Pic8_2) IF $status8_3 = 1 And GUICtrlGetState($Pic8_3) = 160 then _SetPic($Pic8_3) IF $status8_4 = 1 And GUICtrlGetState($Pic8_4) = 160 then _SetPic($Pic8_4) IF $status8_5 = 1 And GUICtrlGetState($Pic8_5) = 160 then _SetPic($Pic8_5) Call ("END8_APP") ;999999999999999999999999999999999999999999999999999999999999999999 EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now