eekhoorn12 Posted December 2, 2005 Posted December 2, 2005 Why doesn't the pictute changes to the green one #include <GUIConstants.au3> $Fout = "roderondje.gif" ;Hier wordt de gui gecreerd GUICreate ( "QueueIt" , 650 , 400 ) ; will create a dialog box that when displayed is centered $TITLE4 = GUICtrlCreateInput("", 15, 225, 100, 20, $ES_READONLY+$WS_EX_STATICEDGE+$ES_NUMBER) $TITLE4A = GuiCtrlCreateUpDown(-1) GUICtrlSetLimit($TITLE4A, 100, 0) $groen = GUICtrlCreatePic ( $Fout, 500, 150, 20, 20) GUISetState (@SW_SHOW) While 1 if GUICtrlRead($TITLE4) == 10 then $Fout = "groenrondje.gif" endif Wend
Valuater Posted December 2, 2005 Posted December 2, 2005 (edited) maybe this While 1 if GUICtrlRead($TITLE4) == 10 then GUICtrlSetImage($groen, "groenrondje.gif"); needs the proper location - C:\temp\temp.pic ;$Fout = "groenrondje.gif" endif Sleep(10) Wend i am not sure "gif" is supported 8) Edited December 2, 2005 by Valuater
eekhoorn12 Posted December 2, 2005 Author Posted December 2, 2005 (edited) Well it seems to work even with a .gif Thanks Edited December 2, 2005 by eekhoorn12
eekhoorn12 Posted December 3, 2005 Author Posted December 3, 2005 Now i want the code to change te picture if a sting contains a certain character. I've already got that when te last letter is " that it turns green but when i typ another letter it turns red again what do i do wrong. #include <GUIConstants.au3> $Fout = "roderondje.gif" GUICreate ( "QueueIt" , 650 , 400 ) $TITLE2 = GUICtrlCreateInput("", 15, 40, 100, 20) $groen = GUICtrlCreatePic ( $Fout, 500, 150, 20, 20) $s_Result = 0 $q = 0 GUISetState (@SW_SHOW) While 1 $z = StringLen($s_Result) $s_Result = GUICtrlRead($TITLE2) For $x = 1 to StringLen($s_Result) $i = StringMid($s_Result,$x,1) $a = Asc ($i) If $a = 34 and $z <> StringLen($s_Result) Then GUICtrlSetImage($groen, "groenrondje.gif") $q = 1 elseif $a <> 34 and $z <> StringLen($s_Result) then GUICtrlSetImage($groen, "roderondje.gif") $q = 0 endif next Sleep(10) Wend
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