anwarbham Posted September 15, 2005 Share Posted September 15, 2005 hi i am creating a script that will set a reminder when a user inputs some data he will put in a ref number in a box and then select the releveant check box every check box has a diffrent reminder option so one mind bring up a pop up menu in 10 min while the other will be in 24 hours i can do this fine for one input but can this be dont for multiple inputs so i can have like 3 reminders running my code is below its a bit messey i know #include <GuiConstants.au3> #include <Date.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) ; cref read command ; all problems that are suspended will be displayed here $listView = GuiCtrlCreateListView("username|Cnumber", 40, 100,130, 110) GuiCtrlCreateListViewItem(GUICtrlRead ($Crefinput), GUICtrlRead ($Crefinput)) ; 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() GUIGetMsg() ;--------------------------------------------------- ; 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(4096+4, "Call conformation", "did you contact the user") ;ask the user if he made contact if $1stmessagebox = 6 Then ; if user made contact then GUICtrlSetData ( $notes," "& _Now() & " Contacted user " , " default " ) ; contacted user cc ExitLoop MsgBox(0, "yes", "yes");test setup ignore this Else ; other wise GUICtrlSetData ( $notes," "& _Now() & " user not in suspending for one hour till " &"" & _DateAdd( 'h',1, _NowCalc()) , " default " ) ; this is not working should insert text in edit box twentyfoursuspend() ExitLoop EndIf endif until $Sendmailbutton = 0 ;---------------- this is the 2nd call attemp code list Do $afteronehourread = GUICtrlRead ( $1stonehour ) ; reads the data from the 2nd checkbox afer one hour if $afteronehourread = $GUI_CHECKED then ; if the inputs from 2nd checkbox it true then $2ndmessagebox = MsgBox(4096+4, "Call conformation", "did you contact the user") ;ask the user if he made contact if $2ndmessagebox = 6 Then ; if user made contact then GUICtrlSetData ( $notes," "& _Now() & " Contacted user " , " default " ) ; contacted user cc ExitLoop MsgBox(0, "yes", "yes");test setup ignore this Else ; other wise GUICtrlSetData ( $notes," "& _Now() & " user not in 2nd attempt suspending for 24 hours till " &"" & _DateAdd( 'h',24, _NowCalc()) , " default " ) ; this is not working should insert text in edit box onehoursuspend() ExitLoop EndIf endif Until $Sendmailbutton = 4 ;---------------- this is the 3rd call attemp code list Do $24hourread = GUICtrlRead ( $24hoursuspend ) ; reads the data from the 3rd checkbox afer 24 hours if $24hourread = $GUI_CHECKED then ; if the inputs from 3rd checkbox it true then $24messagebox = MsgBox(4096+4, "Call conformation", "did you contact the user") ;ask the user if he made contact if $24messagebox = 6 Then ; if user made contact then GUICtrlSetData ( $notes," "& _Now() & " Contacted user " , " default " ) ; contacted user cc ExitLoop Else ; other wise GUICtrlSetData ( $notes," "& _Now() & " user not in 3rd attempt suspending for 5 days then close " &"" & _DateAdd( 'd',5, _NowCalc()) , " default " ) ; this is not working should insert text in edit box onehoursuspend() ExitLoop EndIf endif Until $Sendmailbutton = 4 ;------------------- this is the five day suspension bit Do $5dayread = GUICtrlRead ( $5dayclousure ) ; reads the data from the 4th checkbox afer 5days if $5dayread = $GUI_CHECKED then ; if the inputs from 4th checkbox it true then $5daymessagebox = MsgBox(4096+4, "Call conformation", "did you contact the user") ;ask the user if he made contact if $5daymessagebox = 6 Then ; if user made contact then GUICtrlSetData ( $notes," "& _Now() & " Contacted user " , " default " ) ; contacted user cc ExitLoop Else ; other wise GUICtrlSetData ( $notes," "& _Now() & " user not in 4th attempt after 5 day suspension closing call " , " default " ) ; this is not working should insert text in edit box onehoursuspend() ExitLoop EndIf endif Until $Sendmailbutton = 4 Func onehoursuspend() sleep (50000) splashTextOn("Call Alert", " THIS CALL NEEDS TO BE LOOKED AT "& GUICtrlRead ($Crefinput), -1, -1, -1, -1, 4, "", 24) MsgBox(4096, "Alert", "By clicking OK you are confirming that you have contacted the user") SplashOff() EndFunc Func twentyfoursuspend() sleep (50000) splashTextOn("Call Alert", " THIS CALL NEEDS TO BE LOOKED AT " & GUICtrlRead ($Crefinput), -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 More sharing options...
AutoChris Posted September 15, 2005 Share Posted September 15, 2005 I am not sure I understand the problem. I tried your script and I am getting all of the pop-ups and splash texts that you have in your script. If you are having a problem getting the script to work properly, are you using the beta? A tip: You can use GUI windows instead of pop-up dialog boxes to give you more options in what the user chooses. Also, your splash text windows could use a little formatting. However, I realize this is just a test so do not take that as criticism--just something to keep in mind for the future. If nothing I said helps at all, please be more specific in what you are asking so that I can better help you with your script. Link to comment Share on other sites More sharing options...
anwarbham Posted September 16, 2005 Author Share Posted September 16, 2005 the code works fine if i suspend one call but try and suspend 2 calls and you wont get the check boxes cleared or the option that asks u if you made contact wth the user. Link to comment Share on other sites More sharing options...
DaLiMan Posted September 16, 2005 Share Posted September 16, 2005 As far as I understand the script pauses until the MsgBox is clicked. Maybe if U use child GUI's but am not sure. Hey, I like this new layout .... 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