Jump to content

anwarbham

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by anwarbham

  1. sorry to be a pain but its not working this is what i have the field is now blank is there a way to split each record in to a diffrent combo box record #include <GuiConstants.au3> #include <file.au3> Dim $aRecords, $look = "" opt("GUIOnEventMode", 1) ;create gui $box = GUICreate("asset tool", 400, 400) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetIcon(@SystemDir & "\mspaint.exe", 0) $file = FileOpen("D:\Profiles\BHAMA\Desktop\phone\myfile.ini", 0) ; will have to change this FileClose($file) ; asset inputbox GUICtrlCreateLabel("Asset Number", 300, 65, 95, 40) $input1 = GUICtrlCreateInput("", 40, 60, 250, 20); asset read command _FileReadToArray("D:\Profiles\BHAMA\Desktop\phone\myfile.ini", $aRecords); this reads the lines from a file and makes them in to an array For $x = 18 To $aRecords[0];starts from line 18 and reads till end of document $look = $look & $aRecords[$x]&'|' Next $look = StringTrimRight($look, 3) GUICtrlCreateCombo("", 40, 150, 250) ; creates a combo box GUICtrlSetData(-1,$look) ;adds the array value to combo box GUISetState() While 1 Sleep(100) WEnd Func _Exit() Exit EndFunc ;==>_Exit
  2. yay it works but with a hitch all the records have merged now and apear in one continus line in the combo box in stead of each one on a new box that i can scroll down to any ideas how i can seperate them
  3. yeah thats the way i tried it too but it comes up with an error D:\Profiles\BHAMA\My Documents\_FileReadToArray.au3(25,16) : WARNING: $look: possibly used before declaration. $look = $look & #include <GuiConstants.au3> #include <file.au3> Dim $aRecords opt("GUIOnEventMode", 1) ;create gui $box = GUICreate("asset tool", 400, 400) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetIcon(@SystemDir & "\mspaint.exe", 0) $file = FileOpen("D:\Profiles\BHAMA\Desktop\phone\myfile.ini", 0) ; will have to change this FileClose($file) ; asset inputbox GUICtrlCreateLabel("Asset Number", 300, 65, 95, 40) $input1 = GUICtrlCreateInput("", 40, 60, 250, 20); asset read command _FileReadToArray("D:\Profiles\BHAMA\Desktop\phone\myfile.ini",$aRecords); this reads the lines from a file and makes them in to an array For $x = 18 To $aRecords[0];starts from line 18 and reads till end of document $look = $look & $aRecords[$x] & "|" Next $look = StringTrimRight($look, 1) GUICtrlCreateCombo ($look,40,150,250) ; creates a combo box and adds the array value GUISetState() While 1 Sleep(100) WEnd Func _Exit() Exit EndFunc ;==>_Exit
  4. sorry dude not working ive put it after the loop before the loop doesnt pick up the array is there another way to read the lines of a file and display it in to a combo box
  5. hi is there any way of adding an array to a combo box my code reads the lines from a file converts them to an array and is supposed to add that array to a combo box but it does not work any ideas any one #include <GuiConstants.au3> #include <file.au3> Dim $aRecords opt("GUIOnEventMode", 1) ;create gui $box = GUICreate("asset tool", 400, 400) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetIcon(@SystemDir & "\mspaint.exe", 0) $file = FileOpen("D:\Profiles\BHAMA\Desktop\phone\myfile.ini", 0) ; will have to change this FileClose($file) ; asset inputbox GUICtrlCreateLabel("Asset Number", 300, 65, 95, 40) $input1 = GUICtrlCreateInput("", 40, 60, 250, 20); asset read command _FileReadToArray("D:\Profiles\BHAMA\Desktop\phone\myfile.ini",$aRecords); this reads the lines from a file and makes them in to an array For $x = 18 to $aRecords[0];starts from line 18 and reads till end of document $look = GUICtrlRead($aRecords[$x]);suposed to read all of the arrays Next GUICtrlCreateCombo ($look,40,150,250) ; creates a combo box and adds the array value GUISetState() While 1 Sleep(100) WEnd Func _Exit() Exit EndFunc ;==>_Exit
  6. hey thats a cool script but what about if the machine is switched off and back on again i was thinking of saving the reminders in an ini file and when you reopen the app it looks in the ini file for the current reminders and resumes were it left off
  7. hi most of you probably know im trying to create a reminder system that can set reminders for multiple items i have it working by reminding you of one item (item = a user input like numbers or letters)so the user will eneter in input select a box to remind him of this input in lets say 3 hours and in 3 hours he will get a pop up box that remonds him now thus far i can only get to remind the user for one item at a time so i have to wait for the first item to finish its process before i can continue and add another item to remind the user. now is this possible or am i just wasting time i also have another question. lets say there was a reminder set for 3 hours and the user logs off his machine of shuts the mahine down when he logs back in is there a way that resumes the process from were it left off or take in to account how many minutes or hours have passed #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
  8. 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.
  9. Cheers dudue that works fine i dont have to use a seprate msg box now and it deleted the cmd later too thanks a lot
  10. thanks it ran the code but didint put in the value from the gui input box so i ammended the code by adding an input box before it seem to like that way cheers code below for any one else #include <GuiConstants.au3> opt("GUIOnEventMode", 1) ; Create commands in cmd file $file = FileOpen(@ScriptDir & "\_LSS.cmd", 2) ;create gui $box = GUICreate("asset tool", 400, 400) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetIcon(@SystemDir & "\mspaint.exe", 0) $input1 = InputBox("asset", "Please Enter machine name") ; asset inputbox GUICtrlCreateLabel("asset Please", 40, 20, 40, 40) $input2 = GUICtrlCreateInput($input1, 40, 60, 90, 20); asset read command $Sendmailbutton = GUICtrlCreateButton("Send mail", 40, 330, 100, 30) GUICtrlSetOnEvent(-1, "OKPressed") GUISetState() While 1 Sleep(100) WEnd Func OKPressed() ;creates the batch file FileWriteLine($file, '@echo off') FileWriteLine($file, 'set check_ws=%' & $input1 & '%') FileWriteLine($file, '') FileWriteLine($file, 'TYPE \\%' & $input1 & '\c$\"PROGRAM FILES"\CA\USD\SD\ASM\CONF\ASM.CNF|FIND "ASMSSLSR =SDCP3CME0">>0%\..\LSS.TMP') FileWriteLine($file, '') FileWriteLine($file, 'ping -n 1 %' & $input1 & ' | find /i "reply">>0%\..\IP.TMP') FileWriteLine($file, 'ECHO ---------------------------------------------------------->>%0\..rESULT.TXT') FileWriteLine($file, 'ECHO.>>%0\..rESULT.TXT') FileWriteLine($file, 'ECHO.>>%0\..rESULT.TXT') FileWriteLine($file, 'ECHO 1] THE IP ADDRESS FOR \\%' & $input1 & ' IS>>%0\..\rESULT.TXT') FileWriteLine($file, 'TYPE IP.TMP>>%0\..\rESULT.TXT') FileWriteLine($file, 'ECHO 2] THE LMS FOR \\%' & $input1 & ' IS >>%0\..\rESULT.TXT') FileWriteLine($file, 'TYPE LSS.TMP>>%0\..\rESULT.TXT') FileWriteLine($file, 'del %0\..\lss.tmp') FileWriteLine($file, ' ') FileWriteLine($file, ' ') FileWriteLine($file, 'ECHO.>>%0\..rESULT.TXT') FileWriteLine($file, 'TYPE \\%' & $input1 & 'c$"PROGRAM FILES"\CA\USD\SD\ASM\CONF\ASM.CNF|FIND "ASMUILSR =">>%0\..\LSS.TMP') FileWriteLine($file, ' ') FileWriteLine($file, ' ') FileWriteLine($file, 'ECHO.>>%0\..rESULT.TXT') FileWriteLine($file, 'ECHO 3] THE LOCAL LSS FOR \\%' & $input1 & ' IS >>%0\..\rESULT.TXT') FileWriteLine($file, 'TYPE %0\..\LSS.TMP>>%0\..\rESULT.TXT') FileWriteLine($file, 'ECHO.>>%0\..\rESULT.TXT') FileWriteLine($file, ' ') FileWriteLine($file, ' ') FileWriteLine($file, 'del %0\..\lss.tmp') FileWriteLine($file, 'ECHO **** sOFTWARE INSTALLED ON WORKSTATION ***>>%0\..\rESULT.TXT') FileWriteLine($file, 'TREE \\%' & $input1 & '\c$\"Program Files"\CA\UAM\CLIENTWS\Software /f>>%0\..\LSS.TMP') FileWriteLine($file, ' ') FileWriteLine($file, 'TYPE %0\..\LSS.TMP>>%0\..\rESULT.TXT') FileWriteLine($file, 'echo -----** END WORKSTATION *** -----') FileWriteLine($file, ' ') FileWriteLine($file, 'echo %2 ##############') FileWriteLine($file, 'DEL 0%\..\IP.TMP') FileWriteLine($file, 'DEL 0%\..\LSS.TMP') FileWriteLine($file, '@ECHO') FileWriteLine($file, 'del %0\..\result.txt') FileWriteLine($file, 'del %0\..\LSS.TMP') FileWriteLine($file, 'del %0\..\IP.TXT') FileWriteLine($file, 'ECHO -------------------------------------------') FileWriteLine($file, 'FOR /f %%a in (%0\..\WS.TXT) do call %0\..\_lss.cmd %%a') FileWriteLine($file, 'ECHO.') FileWriteLine($file, 'ECHO.') FileClose($file);closes the file RunWait("\_LSS.cmd") ;run the cmd file ; Delete our file once its done FileDelete("_LSS.cmd") EndFunc ;==>OKPressed Func _Exit() Exit EndFunc ;==>_Exit
  11. no i renamed the cmd in the code still no luck i think its to to with the ok command its not selecting the input text and adding it to the cmd file and the function is not running the file
  12. 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
  13. hi i have been trying to create a gui were when u put in the machine ip or machine name in an GuiCtrlCreateInput it then creates and runs a batch file that tells u what server the machine is connected to what apps are on te machine etc and saves the result in a text file then it deletes the batch file.. now my problem is when i press the ok key it does not run the batch file the batch file is created but when i edit the batch file my machine ip has not been inserted in the file can any one help. code below thanks #include <GuiConstants.au3> ; Create commands in cmd file $file = FileOpen(@ScriptDir & "\_LSS.cmd", 2) ;create gui $box = GuiCreate("asset tool", 400, 400) GuiSetIcon(@SystemDir & "\mspaint.exe", 0) ; asset inputbox GuiCtrlCreateLabel("asset Please",40, 20, 40,40) $input1 = GuiCtrlCreateInput( "",40, 60, 90, 20) ; asset read command ;creates the batch file FileWriteLine($file, '@echo off') FileWriteLine($file, 'set check_ws=%'&$input1&'%') FileWriteLine($file, '') FileWriteLine($file, 'TYPE \\%'&$input1&'\c$\"PROGRAM FILES"\CA\USD\SD\ASM\CONF\ASM.CNF|FIND "ASMSSLSR =SDCP3CME0">>0%\..\LSS.TMP') FileWriteLine($file, '') FileWriteLine($file, 'ping -n 1 %'&$input1&' | find /i "reply">>0%\..\IP.TMP') FileWriteLine($file, 'ECHO ---------------------------------------------------------->>%0\..rESULT.TXT') FileWriteLine($file, 'ECHO.>>%0\..rESULT.TXT') FileWriteLine($file, 'ECHO.>>%0\..rESULT.TXT') FileWriteLine($file, 'ECHO 1] THE IP ADDRESS FOR \\%'&$input1&' IS>>%0\..\rESULT.TXT') FileWriteLine($file, 'TYPE IP.TMP>>%0\..\rESULT.TXT') FileWriteLine($file, 'ECHO 2] THE LMS FOR \\%'&$input1&' IS >>%0\..\rESULT.TXT') FileWriteLine($file, 'TYPE LSS.TMP>>%0\..\rESULT.TXT') FileWriteLine($file, 'del %0\..\lss.tmp') FileWriteLine($file, ' ') FileWriteLine($file, ' ') FileWriteLine($file, 'ECHO.>>%0\..rESULT.TXT') FileWriteLine($file, 'TYPE \\%'&$input1&'c$"PROGRAM FILES"\CA\USD\SD\ASM\CONF\ASM.CNF|FIND "ASMUILSR =">>%0\..\LSS.TMP') FileWriteLine($file, ' ') FileWriteLine($file, ' ') FileWriteLine($file, 'ECHO.>>%0\..rESULT.TXT') FileWriteLine($file, 'ECHO 3] THE LOCAL LSS FOR \\%'&$input1&' IS >>%0\..\rESULT.TXT') FileWriteLine($file, 'TYPE %0\..\LSS.TMP>>%0\..\rESULT.TXT') FileWriteLine($file, 'ECHO.>>%0\..\rESULT.TXT') FileWriteLine($file, ' ') FileWriteLine($file, ' ') FileWriteLine($file, 'del %0\..\lss.tmp') FileWriteLine($file, 'ECHO **** sOFTWARE INSTALLED ON WORKSTATION ***>>%0\..\rESULT.TXT') FileWriteLine($file, 'TREE \\%'&$input1&'\c$\"Program Files"\CA\UAM\CLIENTWS\Software /f>>%0\..\LSS.TMP') FileWriteLine($file, ' ') FileWriteLine($file, 'TYPE %0\..\LSS.TMP>>%0\..\rESULT.TXT') FileWriteLine($file, 'echo -----** END WORKSTATION *** -----') FileWriteLine($file, ' ') FileWriteLine($file, 'echo %2 ##############') FileWriteLine($file, 'DEL 0%\..\IP.TMP') FileWriteLine($file, 'DEL 0%\..\LSS.TMP') FileWriteLine($file, '@ECHO') FileWriteLine($file, 'del %0\..\result.txt') FileWriteLine($file, 'del %0\..\LSS.TMP') FileWriteLine($file, 'del %0\..\IP.TXT') FileWriteLine($file, 'ECHO -------------------------------------------') FileWriteLine($file, 'FOR /f %%a in (%0\..\WS.TXT) do call %0\..\_lss.cmd %%a') FileWriteLine($file, 'ECHO.') FileWriteLine($file, 'ECHO.') FileClose($file);closes the file $Sendmailbutton = GuiCtrlCreateButton("Send mail", 40, 330, 100, 30) GUICtrlSetOnEvent(-1, "OKPressed") Func OKPressed() RunWait("\_LSS.cmd") ;run the cmd file ; Delete our file once its done FileDelete("_LSS.cmd") EndFunc GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd
  14. 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
  15. 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
×
×
  • Create New...