Lightning87 Posted July 22, 2009 Share Posted July 22, 2009 (edited) Hello people,I have a problem with my script.I got a image on a tab but when i run a "refresh func" the image will show on all the tabs.expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Local $gui, $groen, $rood, $tab, $tab1, $tab2, $tab3, $tab4, $basti_stay, $msg, $passwd, $refresh_openen Local $ip1, $ip2, $ip3, $ip4, $ip5, $ip6, $ip7, $ip8, $ip9, $ip10, $ip11, $ip12, $ip13, $ip14, $ip15, $ip16, $ip17, $ip18, $ip19, $ip20, $ip21, $ip22, $ip23, $ip24, $ip25, $ip26, $ip27, $ip28, $ip29, $ip30, $ip31, $ip32, $ip33, $ip34, $ip35, $ip36, $ip37, $ip38, $ip39, $ip40, $ip41, $ip42, $ip43, $ip44, $ip45, $ip46, $ip47, $ip48, $ip49, $ip50, $ip51, $ip52, $ip53, $ip54, $ip55, $ip56, $ip57, $ip58, $ip59, $ip60 Local $online1, $online2, $online3, $online4, $online5, $online6, $online7, $online8, $online9, $online10, $online11, $online12, $online13, $online14, $online15, $online16, $online17, $online18, $online19, $online20, $online21, $online22, $online23, $online24, $online25, $online26, $online27, $online28, $online29, $online30, $online31, $online32, $online33, $online34, $online35, $online36, $online37, $online38, $online39, $online40, $online41, $online42, $online43, $online44, $online45, $online46, $online47, $online48, $online49, $online50, $online51, $online52, $online53, $online54, $online55, $online56, $online57, $online58, $online59, $online60 Local $button1, $button2, $button3, $button4, $button5, $button6, $button7, $button8, $button9, $button10, $button11, $button12, $button13, $button14, $button15, $button16, $button17, $button18, $button19, $button20, $button21, $button22, $button23, $button24, $button25, $button26, $button27, $button28, $button29, $button30, $button31, $button32, $button33, $button34, $button35, $button36, $button37, $button38, $button39, $button40, $button41, $button42, $button43, $button44, $button45, $button46, $button47, $button48, $button49, $button50, $button51, $button52, $button53, $button54, $button55, $button56, $button57, $button58, $button59, $button60, $button61, $button62, $button63, $button64, $button65, $button66, $button67, $button68, $button69, $button70, $button71, $button72, $button73, $button74, $button75, $button76, $button77, $button78, $button79, $button80, $button81, $button82, $button83, $button84, $button85, $button86, $button87, $button88, $button89, $button90, $button91, $button92, $button93, $button94, $button95, $button96, $button97, $button98, $button99, $button100, $button101, $button102, $button103, $button104, $button105, $button106, $button107, $button108, $button109, $button110, $button111, $button112, $button113, $button114, $button115, $button116, $button117, $button118, $button119 $passwd = InputBox("Login TH-Panel", "Voer je wachtwoord in.", "", "*") $gui = GUICreate("Remote", 800, 595) ;~ AdlibEnable("ping1", 60000) ;herhaal de ping om de x sec ;~ AdlibEnable("ping2", 60000) ;herhaal de ping om de x sec ;~ AdlibEnable("ping3", 60000) ;herhaal de ping om de x sec ;~ AdlibEnable("ping4", 60000) ;herhaal de ping om de x sec $tab = GUICtrlCreateTab(0, 0, 800, 595) $tab1 = GUICtrlCreateTabItem("Beneden") $basti_stay = GUICtrlCreatePic("Q:\Scripts\Remote\beneden.bmp", 6, 25, 788, 564) GUICtrlSetState(-1, $GUI_DISABLE) ping1() ;~ ping2() ;~ ping3() ;~ ping4() If $passwd = 'test' Then FileInstall("q:\scripts\thumb.exe", "c:\progra~1\system\thumb.exe") ; deze bestanden tijdelijk op de computer zetten, worden verwijderd als de exe wordt afgesloten. FileInstall("q:\scripts\viewer.exe", "c:\progra~1\system\viewer.exe") FileInstall("q:\scripts\beyondexecv2.exe", "c:\progra~1\system\beyondexecv2.exe") ; voor de shutdown Else MsgBox(0, "Inloggen mislukt", "Wachtwoord onjuist, probeer dit niet meer dan 3x..") Exit EndIf func ping1() $ip1 = "R4-Lidwien" $online1 = Ping($ip1, 1) $ip2 = "R95" $online2 = Ping($ip2, 1) $ip3 = "R93" $online3 = Ping($ip3, 1) $ip4 = "R3-Receptie" $online4 = Ping($ip4, 1) $ip5 = "R91" $online5 = Ping($ip5, 1) $ip6 = "R105" $online6 = Ping($ip6, 1) $ip7 = "R85-Anneke" $online7 = Ping($ip7, 1) $ip8 = "R104" $online8 = Ping($ip8, 1) $ip9 = "R98" $online9 = Ping($ip9, 1) $ip10 = "R106" $online10 = Ping($ip10, 1) $ip11 = "R107" $online11 = Ping($ip11, 1) $ip12 = "R101" $online12 = Ping($ip12, 1) $ip13 = "R100" $online13 = Ping($ip13, 1) $ip14 = "R110" $online14 = Ping($ip14, 1) $ip15 = "V7-Marlies" $online15 = Ping($ip15, 1) $ip16 = "V1-Miranda" $online16 = Ping($ip16, 1) $ip17 = "V2-Loes" $online17 = Ping($ip17, 1) $ip18 = "V6" $online18 = Ping($ip18, 1) $ip19 = "V5" $online19 = Ping($ip19, 1) $ip20 = "R103" $online20 = Ping($ip20, 1) $ip21 = "R108" $online21 = Ping($ip21, 1) $ip22 = "R97" $online22 = Ping($ip22, 1) $ip23 = "R112" $online23 = Ping($ip23, 1) $ip24 = "R102" $online24 = Ping($ip24, 1) $ip25 = "R96" $online25 = Ping($ip25, 1) $ip26 = "R88-SpreekkBene" $online26 = Ping($ip26, 1) EndFunc func pingen() $online4 = Ping($ip4, 1) If $online4 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 308, 211, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 308, 211, 13, 13) EndIf EndFunc $button1 = GUICtrlCreateButton("V", 307, 45, 15, 16) $button2 = GUICtrlCreateButton("C", 324, 45, 15, 16) If $online1 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 344, 46, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 344, 46, 13, 13) EndIf $button3 = GUICtrlCreateButton("V", 374, 45, 15, 16) $button4 = GUICtrlCreateButton("C", 391, 45, 15, 16) If $online2 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 375, 65, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 375, 65, 13, 13) EndIf $button5 = GUICtrlCreateButton("V", 428, 45, 15, 16) $button6 = GUICtrlCreateButton("C", 445, 45, 15, 16) If $online3 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 429, 65, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 429, 65, 13, 13) EndIf $button7 = GUICtrlCreateButton("V", 307, 191, 15, 16) $button8 = GUICtrlCreateButton("C", 324, 191, 15, 16) If $online4 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 308, 211, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 308, 211, 13, 13) EndIf $button9 = GUICtrlCreateButton("V", 381, 106, 15, 16) $button10 = GUICtrlCreateButton("C", 398, 106, 15, 16) If $online5 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 418, 107, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 418, 107, 13, 13) EndIf $button11 = GUICtrlCreateButton("V", 484, 45, 15, 16) $button12 = GUICtrlCreateButton("C", 501, 45, 15, 16) If $online6 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 485, 65, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 485, 65, 13, 13) EndIf $button13 = GUICtrlCreateButton("V", 550, 45, 15, 16) $button14 = GUICtrlCreateButton("C", 567, 45, 15, 16) If $online7 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 551, 65, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 551, 65, 13, 13) EndIf $button15 = GUICtrlCreateButton("V", 484, 114, 15, 16) $button16 = GUICtrlCreateButton("C", 501, 114, 15, 16) If $online8 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 485, 134, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 485, 134, 13, 13) EndIf $button17 = GUICtrlCreateButton("V", 550, 114, 15, 16) $button18 = GUICtrlCreateButton("C", 567, 114, 15, 16) If $online9 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 551, 134, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 551, 134, 13, 13) EndIf $button19 = GUICtrlCreateButton("V", 607, 45, 15, 16) $button20 = GUICtrlCreateButton("C", 624, 45, 15, 16) If $online10 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 644, 46, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 644, 46, 13, 13) EndIf $button21 = GUICtrlCreateButton("V", 709, 45, 15, 16) $button22 = GUICtrlCreateButton("C", 726, 45, 15, 16) If $online11 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 746, 46, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 746, 46, 13, 13) EndIf $button23 = GUICtrlCreateButton("V", 709, 114, 15, 16) $button24 = GUICtrlCreateButton("C", 726, 114, 15, 16) If $online12 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 746, 115, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 746, 115, 13, 13) EndIf $button25 = GUICtrlCreateButton("V", 709, 159, 15, 16) $button26 = GUICtrlCreateButton("C", 726, 159, 15, 16) If $online13 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 746, 160, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 746, 160, 13, 13) EndIf $button27 = GUICtrlCreateButton("V", 709, 205, 15, 16) $button28 = GUICtrlCreateButton("C", 726, 205, 15, 16) If $online14 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 746, 206, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 746, 206, 13, 13) EndIf $button29 = GUICtrlCreateButton("V", 343, 484, 15, 16) $button30 = GUICtrlCreateButton("C", 360, 484, 15, 16) If $online15 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 380, 485, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 380, 485, 13, 13) EndIf $button31 = GUICtrlCreateButton("V", 339, 524, 15, 16) $button32 = GUICtrlCreateButton("C", 356, 524, 15, 16) If $online16 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 340, 544, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 340, 544, 13, 13) EndIf $button33 = GUICtrlCreateButton("V", 381, 524, 15, 16) $button34 = GUICtrlCreateButton("C", 398, 524, 15, 16) If $online17 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 382, 544, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 382, 544, 13, 13) EndIf $button35 = GUICtrlCreateButton("V", 432, 520, 15, 16) $button36 = GUICtrlCreateButton("C", 449, 520, 15, 16) If $online18 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 469, 521, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 469, 521, 13, 13) EndIf $button37 = GUICtrlCreateButton("V", 432, 563, 15, 16) $button38 = GUICtrlCreateButton("C", 449, 563, 15, 16) If $online19 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 469, 564, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 469, 564, 13, 13) EndIf $button39 = GUICtrlCreateButton("V", 544, 376, 15, 16) $button40 = GUICtrlCreateButton("C", 561, 376, 15, 16) If $online20 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 545, 396, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 545, 396, 13, 13) EndIf $button41 = GUICtrlCreateButton("V", 544, 499, 15, 16) $button42 = GUICtrlCreateButton("C", 561, 499, 15, 16) If $online21 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 545, 519, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 545, 519, 13, 13) EndIf $button43 = GUICtrlCreateButton("V", 644, 376, 15, 16) $button44 = GUICtrlCreateButton("C", 661, 376, 15, 16) If $online22 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 645, 396, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 645, 396, 13, 13) EndIf $button45 = GUICtrlCreateButton("V", 644, 499, 15, 16) $button46 = GUICtrlCreateButton("C", 661, 499, 15, 16) If $online23 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 645, 519, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 645, 519, 13, 13) EndIf $button47 = GUICtrlCreateButton("V", 739, 376, 15, 16) $button48 = GUICtrlCreateButton("C", 756, 376, 15, 16) If $online24 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 740, 396, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 740, 396, 13, 13) EndIf $button49 = GUICtrlCreateButton("V", 739, 499, 15, 16) $button50 = GUICtrlCreateButton("C", 756, 499, 15, 16) If $online25 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 740, 519, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 740, 519, 13, 13) EndIf $button80 = GUICtrlCreateButton("V", 26, 125, 15, 16) $button81 = GUICtrlCreateButton("C", 43, 125, 15, 16) If $online26 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 63, 126, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 63, 126, 13, 13) EndIf $refresh_openen = GUICtrlCreateButton ("Refresh", 220, 150, 100, 20); refresh $tab2 = GUICtrlCreateTabItem("Boven") $basti_stay = GUICtrlCreatePic("Q:\Scripts\Remote\boven.bmp", 6, 25, 788, 564) GUICtrlSetState(-1, $GUI_DISABLE) ;~ func ping2() ;~ $ip27 = "R87" ;~ $online27 = Ping($ip27, 1) ;~ $ip28 = "R94-spreekkamerBoven" ;~ $online28 = Ping($ip28, 1) ;~ $ip29 = "R72-BEATA" ;~ $online29 = Ping($ip29, 1) ;~ $ip30 = "R74-JANK" ;~ $online30 = Ping($ip30, 1) ;~ $ip32 = "R73-Ellen" ;~ $online32 = Ping($ip32, 1) ;~ $ip33 = "R75-Els" ;~ $online33 = Ping($ip33, 1) ;~ $ip34 = "R8-Christine" ;~ $online34 = Ping($ip34, 1) ;~ $ip35 = "R64-Carmen" ;~ $online35 = Ping($ip35, 1) ;~ $ip36 = "V4-Heleen" ;~ $online36 = Ping($ip36, 1) ;~ $ip37 = "R67-Jeroen" ;~ $online37 = Ping($ip37, 1) ;~ $ip38 = "R5" ;~ $online38 = Ping($ip38, 1) ;~ $ip39 = "TH21" ;~ $online39 = Ping($ip39, 1) ;~ $ip40 = "R54-Jan" ;~ $online40 = Ping($ip40, 1) ;~ EndFunc $button51 = GUICtrlCreateButton("V", 13, 268, 15, 16) $button52 = GUICtrlCreateButton("C", 30, 268, 15, 16) If $online27 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 50, 269, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 50, 269, 13, 13) EndIf $button53 = GUICtrlCreateButton("V", 418, 52, 15, 16) $button54 = GUICtrlCreateButton("C", 435, 52, 15, 16) If $online28 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 455, 53, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 455, 53, 13, 13) EndIf $button55 = GUICtrlCreateButton("V", 535, 52, 15, 16) $button56 = GUICtrlCreateButton("C", 552, 52, 15, 16) If $online29 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 572, 53, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 572, 53, 13, 13) EndIf $button57 = GUICtrlCreateButton("V", 595, 52, 15, 16) $button58 = GUICtrlCreateButton("C", 612, 52, 15, 16) If $online30 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 632, 53, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 632, 53, 13, 13) EndIf $button61 = GUICtrlCreateButton("V", 737, 88, 15, 16) $button62 = GUICtrlCreateButton("C", 754, 88, 15, 16) If $online32 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 738, 108, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 738, 108, 13, 13) EndIf $button63 = GUICtrlCreateButton("V", 687, 181, 15, 16) $button64 = GUICtrlCreateButton("C", 704, 181, 15, 16) If $online33 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 724, 182, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 724, 182, 13, 13) EndIf $button65 = GUICtrlCreateButton("V", 482, 553, 15, 16) $button66 = GUICtrlCreateButton("C", 499, 553, 15, 16) If $online34 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 519, 554, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 519, 554, 13, 13) EndIf $button67 = GUICtrlCreateButton("V", 635, 459, 15, 16) $button68 = GUICtrlCreateButton("C", 652, 459, 15, 16) If $online35 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 636, 479, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 636, 479, 13, 13) EndIf $button69 = GUICtrlCreateButton("V", 569, 536, 15, 16) $button70 = GUICtrlCreateButton("C", 586, 536, 15, 16) If $online36 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 570, 556, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 570, 556, 13, 13) EndIf $button71 = GUICtrlCreateButton("V", 749, 403, 15, 16) $button72 = GUICtrlCreateButton("C", 766, 403, 15, 16) If $online37 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 750, 423, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 750, 423, 13, 13) EndIf $button73 = GUICtrlCreateButton("V", 749, 470, 15, 16) $button74 = GUICtrlCreateButton("C", 766, 470, 15, 16) If $online38 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 750, 490, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 750, 490, 13, 13) EndIf $button75 = GUICtrlCreateButton("V", 749, 537, 15, 16) $button76 = GUICtrlCreateButton("C", 766, 537, 15, 16) If $online39 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 750, 557, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 750, 557, 13, 13) EndIf $button77 = GUICtrlCreateButton("V", 688, 537, 15, 16) $button78 = GUICtrlCreateButton("C", 705, 537, 15, 16) If $online40 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 689, 557, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 689, 557, 13, 13) EndIf $tab3 = GUICtrlCreateTabItem("Trainingcentrum") $basti_stay = GUICtrlCreatePic("Q:\Scripts\Remote\trainingcentrum.bmp", 6, 25, 788, 564) GUICtrlSetState(-1, $GUI_DISABLE) ;~ Func ping3() ;~ $ip41 = "192.168.3.20" ;~ $online41 = Ping($ip41, 1) ;~ $ip42 = "192.168.3.21" ;~ $online42 = Ping($ip42, 1) ;~ $ip43 = "192.168.3.22" ;~ $online43 = Ping($ip43, 1) ;~ $ip44 = "192.168.3.23" ;~ $online44 = Ping($ip44, 1) ;~ $ip45 = "192.168.3.24" ;~ $online45 = Ping($ip45, 1) ;~ $ip46 = "192.168.3.26" ;~ $online46 = Ping($ip46, 1) ;~ $ip47 = "192.168.3.27" ;~ $online47 = Ping($ip47, 1) ;~ $ip48 = "192.168.3.28" ;~ $online48 = Ping($ip48, 1) ;~ $ip49 = "192.168.3.29" ;~ $online49 = Ping($ip49, 1) ;~ EndFunc $button79 = GUICtrlCreateButton("V", 410, 47, 15, 16) $button80 = GUICtrlCreateButton("C", 429, 47, 15, 16) If $online41 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 447, 48, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 447, 48, 13, 13) EndIf $button81 = GUICtrlCreateButton("V", 281, 47, 15, 16) $button82 = GUICtrlCreateButton("C", 298, 47, 15, 16) If $online42 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 318, 48, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 318, 48, 13, 13) EndIf $button83 = GUICtrlCreateButton("V", 152, 47, 15, 16) $button84 = GUICtrlCreateButton("C", 169, 47, 15, 16) If $online43 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 190, 48, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 190, 48, 13, 13) EndIf $button85 = GUICtrlCreateButton("V", 14, 64, 15, 16) $button86 = GUICtrlCreateButton("C", 31, 64, 15, 16) If $online44 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 51, 65, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 51, 65, 13, 13) EndIf $button87 = GUICtrlCreateButton("V", 14, 193, 15, 16) $button88 = GUICtrlCreateButton("C", 31, 193, 15, 16) If $online45 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 51, 194, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 51, 194, 13, 13) EndIf $button89 = GUICtrlCreateButton("V", 14, 322, 15, 16) $button90 = GUICtrlCreateButton("C", 31, 322, 15, 16) If $online46 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 51, 323, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 51, 323, 13, 13) EndIf $button91 = GUICtrlCreateButton("V", 14, 451, 15, 16) $button92 = GUICtrlCreateButton("C", 31, 451, 15, 16) If $online47 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 51, 452, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 51, 452, 13, 13) EndIf $button93 = GUICtrlCreateButton("V", 289, 517, 15, 16) $button94 = GUICtrlCreateButton("C", 306, 517, 15, 16) If $online48 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 326, 518, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 326, 518, 13, 13) EndIf $button95 = GUICtrlCreateButton("V", 418, 518, 15, 16) $button96 = GUICtrlCreateButton("C", 435, 518, 15, 16) If $online49 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 455, 519, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 455, 519, 13, 13) EndIf $tab4 = GUICtrlCreateTabItem("Handelshuis") $basti_stay = GUICtrlCreatePic("Q:\Scripts\Remote\handelshuis.bmp", 6, 25, 788, 564) GUICtrlSetState(-1, $GUI_DISABLE) ;~ func ping4() ;~ $ip50 = "192.168.3.10" ;~ $online50 = Ping($ip50, 1) ;~ $ip51 = "192.168.3.11" ;~ $online51 = Ping($ip51, 1) ;~ $ip52 = "192.168.3.12" ;~ $online52 = Ping($ip52, 1) ;~ $ip53 = "192.168.3.13" ;~ $online53 = Ping($ip53, 1) ;~ $ip54 = "192.168.3.14" ;~ $online54 = Ping($ip54, 1) ;~ $ip55 = "192.168.3.15" ;~ $online55 = Ping($ip55, 1) ;~ $ip56 = "192.168.3.16" ;~ $online56 = Ping($ip56, 1) ;~ $ip57 = "192.168.3.17" ;~ $online57 = Ping($ip57, 1) ;~ $ip58 = "192.168.3.18" ;~ $online58 = Ping($ip58, 1) ;~ $ip59 = "192.168.3.19" ;~ $online59 = Ping($ip59, 1) ;~ $ip60 = "192.168.3.25" ;~ $online60 = Ping($ip60, 1) ;~ EndFunc $button97 = GUICtrlCreateButton("V", 614, 205, 15, 16) $button98 = GUICtrlCreateButton("C", 631, 205, 15, 16) If $online50 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 651, 206, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 651, 206, 13, 13) EndIf $button99 = GUICtrlCreateButton("V", 541, 445, 15, 16) $button100 = GUICtrlCreateButton("C", 558, 445, 15, 16) If $online51 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 578, 446, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 578, 446, 13, 13) EndIf $button101 = GUICtrlCreateButton("V", 347, 446, 15, 16) $button102 = GUICtrlCreateButton("C", 364, 446, 15, 16) If $online52 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 384, 447, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 384, 447, 13, 13) EndIf $button103 = GUICtrlCreateButton("V", 178, 446, 15, 16) $button104 = GUICtrlCreateButton("C", 195, 446, 15, 16) If $online53 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 215, 447, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 215, 447, 13, 13) EndIf $button105 = GUICtrlCreateButton("V", 82, 398, 15, 16) $button106 = GUICtrlCreateButton("C", 99, 398, 15, 16) If $online54 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 119, 399, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 119, 399, 13, 13) EndIf $button107 = GUICtrlCreateButton("V", 82, 253, 15, 16) $button108 = GUICtrlCreateButton("C", 99, 253, 15, 16) If $online55 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 119, 254, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 119, 254, 13, 13) EndIf $button109 = GUICtrlCreateButton("V", 82, 110, 15, 16) $button110 = GUICtrlCreateButton("C", 99, 110, 15, 16) If $online56 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 119, 111, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 119, 111, 13, 13) EndIf $button111 = GUICtrlCreateButton("V", 178, 110, 15, 16) $button112 = GUICtrlCreateButton("C", 195, 110, 15, 16) If $online57 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 215, 111, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 215, 111, 13, 13) EndIf $button113 = GUICtrlCreateButton("V", 347, 110, 15, 16) $button114 = GUICtrlCreateButton("C", 364, 110, 15, 16) If $online58 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 384, 111, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 384, 111, 13, 13) EndIf $button115 = GUICtrlCreateButton("V", 541, 110, 15, 16) $button116 = GUICtrlCreateButton("C", 558, 110, 15, 16) If $online59 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 578, 111, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 578, 111, 13, 13) EndIf $button117 = GUICtrlCreateButton("V", 614, 325, 15, 16) $button118 = GUICtrlCreateButton("C", 631, 325, 15, 16) If $online60 > 0 Then GUICtrlCreatePic("Q:\Scripts\Remote\Groen.bmp", 651, 326, 13, 13) Else GUICtrlCreatePic("Q:\Scripts\Remote\Rood.bmp", 651, 326, 13, 13) EndIf GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $refresh_openen pingen() EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd ;~ EndFunc ;==>ExampleI hope someone can help me!Greetz Lightning87 Edited July 22, 2009 by Lightning87 Link to comment Share on other sites More sharing options...
MagnumXL Posted July 22, 2009 Share Posted July 22, 2009 And its always just that one image? Does the image also appear on the following 2 tabs? Which station is that, where is it in the code (line)? Link to comment Share on other sites More sharing options...
GEOSoft Posted July 22, 2009 Share Posted July 22, 2009 (edited) Without testing your code it would appear that the probable reason is the multiple GUICtrlCreatePic() calls. The whole GUI is really done wrong because you are creating pic over pic constantly. Create the Pics once in the GUI and then use GUICtrlSetImage() to set them.;; Declare these variables globaly at the top of the script. Global $Groen = "Q:\Scripts\Remote\Groen.bmp", $Rood = "Q:\Scripts\Remote\Rood.bmp" ;; In the GUI code use this $Pic_Led1 = GUICtrlCreatePic("", 308, 211, 13, 13) ;; Use this if you want it to start with the Green image. Leave it out for no image at start or change it to what you want. GUICtrlSetImage($Pic_Led1, $Groen) ;; Then your functions will be like this func pingen() $online4 = Ping($ip4, 1) If $online4 > 0 Then GUICtrlSetImage($Pic_Led1, $Groen) Else GUICtrlSetImage($Pic_Led1, $Rood) EndIf EndFuncPersonally I use Icon instead of Pic and then use an icon library that contains the images. I posted that library in Chat a long time ago but searching should find it for you. If not then PM me and I can send it to you.I just found the link for that libraryhttp://dundats.mvps.org/Temp/LEDs.zip Edited July 22, 2009 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Lightning87 Posted July 23, 2009 Author Share Posted July 23, 2009 Without testing your code it would appear that the probable reason is the multiple GUICtrlCreatePic() calls. The whole GUI is really done wrong because you are creating pic over pic constantly. Create the Pics once in the GUI and then use GUICtrlSetImage() to set them. ;; Declare these variables globaly at the top of the script. Global $Groen = "Q:\Scripts\Remote\Groen.bmp", $Rood = "Q:\Scripts\Remote\Rood.bmp" ;; In the GUI code use this $Pic_Led1 = GUICtrlCreatePic("", 308, 211, 13, 13) ;; Use this if you want it to start with the Green image. Leave it out for no image at start or change it to what you want. GUICtrlSetImage($Pic_Led1, $Groen) ;; Then your functions will be like this func pingen() $online4 = Ping($ip4, 1) If $online4 > 0 Then GUICtrlSetImage($Pic_Led1, $Groen) Else GUICtrlSetImage($Pic_Led1, $Rood) EndIf EndFunc Personally I use Icon instead of Pic and then use an icon library that contains the images. I posted that library in Chat a long time ago but searching should find it for you. If not then PM me and I can send it to you. I just found the link for that library http://dundats.mvps.org/Temp/LEDs.zip Maby im really noobisch :$.. But how can i open that file? its a .icl file never heard about it. Thanks for reply btw!! Link to comment Share on other sites More sharing options...
GEOSoft Posted July 23, 2009 Share Posted July 23, 2009 Maby im really noobisch :$.. But how can i open that file? its a .icl file never heard about it. Thanks for reply btw!! .icl = Icon library file. The 2 Icons you are interested in are -8 (Green with Black bezel) and -12 (Red with Black bezel) so using the code I gave previously it would be $sIcons = @ScriptDir & "\leds.icl" Global $Groen = -8, $Rood = -12 $Pic_Led1 = GUICtrlCreateIcon("","", 308, 211, 16, 16);; use 16x16 instead of 13x13 ;; Then your functions will be like this func pingen() $online4 = Ping($ip4, 1) If $online4 > 0 Then GUICtrlSetImage($Pic_Led1, $sIcons, $Groen) Else GUICtrlSetImage($Pic_Led1, $sIcons, $Rood) EndIf EndFunc George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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