Jump to content

guictrlsetdata to edit box not working


anwarbham
 Share

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>

; GUI

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)

GuiSetState()

;---------------------------------------------------

; the user ticks the 1st contact checkbox

Do

$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

onehoursuspend()

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

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

EndIf

endif

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")

SplashOff()

EndFunc

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...