Jump to content
Sign in to follow this  

guictrlsetdata to edit box not working

Recommended Posts


hi like most people here i work in it support im trying to make an interface that allows us to suspend a call if the user cannot be contacted.

the problem lies that when we contact the user u select a checkbox to confirm this and a msgbox appears asking if you made contact with the user if you select no

it should input some text in the edit list to confirm what actions you have taken but for some reason it doen not reconsie the command guictrlsetdata and does not update the edit box

pls can some one help

the code is below

#include <GuiConstants.au3>


GuiCreate("suspension test", 400, 400)

GuiSetIcon(@SystemDir & "\mspaint.exe", 0)

; cref inputbox

GuiCtrlCreateLabel("Cref Please",40, 20, 40,40)

$Crefinput = GuiCtrlCreateInput( "",40, 60, 90, 20)

; all problems that are suspended will be displayed here

$listView = GuiCtrlCreateListView("username|Cnumber", 40, 100,130, 110)

GuiCtrlCreateListViewItem("B|Two", $listView)

; contact CHECKBOXs every time u contact the user

$1st=GuiCtrlCreateCheckbox("1st call attempt", 40, 230, 180, 20)

$1stonehour=GuiCtrlCreateCheckbox("2nd call attempt after one hour", 40, 250, 180, 20)

$24hoursuspend=GuiCtrlCreateCheckbox("suspended till 24 hours", 40, 270, 180, 20)

$5dayclousure=GuiCtrlCreateCheckbox("5 day closure sent", 40, 290, 180, 20)

; creates the notes box were it displays what actions have been done

GuiCtrlCreateLabel("Notes",176, 30, 40,40)

$notes = GUICtrlCreateEdit ("tried to contact user", 176,60,200,150,$ES_AUTOVSCROLL+$WS_VSCROLL)

; suspend BUTTON will suspend the call

$Sendmailbutton = GuiCtrlCreateButton("Send mail", 40, 330, 100, 30)



; the user ticks the 1st contact checkbox


$1stcheckboxread = GUICtrlRead ( $1st ) ; reads the data from the 1st checkbox

if $1stcheckboxread = $GUI_CHECKED then ; if the inputs from 1st checkbox it true then

$1stmessagebox = MsgBox(4, "Call conformation", "did you contact the user") ;ask the user if he made contact

if $1stmessagebox = 6 Then ; if user made contact then

MsgBox(0, "yes", "yes");test setup ignore this

Else ; other wise


GUICtrlSetData ( $notes, user not in suspending, "" ) ; this is not working should insert text in edit box

MsgBox(0, "no", "no"); test setup ignore this



Until $1st = $GUI_EVENT_CLOSE


Func onehoursuspend()

sleep (900)

splashTextOn("Call Alert", "THIS CALL NEEDS TO BE LOOKED AT", -1, -1, -1, -1, 4, "", 24)

MsgBox(4096, "Alert", "By clicking OK you are confirming that you have contacted the user")



Share this post

Link to post
Share on other sites


GUICtrlSetData ( $notes, user not in suspending, "" )


GUICtrlSetData ( $notes, "user not in suspending")

Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer

Share this post

Link to post
Share on other sites


GUICtrlSetData($notes, "user Not In suspending"); this is not working should insert text in edit box

SciTE for AutoItDirections for Submitting Standard UDFs


Don't argue with an idiot; people watching may not be able to tell the difference.


Share this post

Link to post
Share on other sites

cheers works fine

ive just one more question is there a way of saving the $crefinput or displaying it for later retrival in the $listView = GuiCtrlCreateListView

as once the call is suspended for the hour the agent may need to insert another call

Share this post

Link to post
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
Sign in to follow this