Jump to content

Picture doesn't change


Recommended Posts

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
Link to comment
Share on other sites

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...