gcue Posted January 17, 2008 Share Posted January 17, 2008 i dont think my variables are being read. any ideas why? any help would be greatly appreciated thanks in advance expandcollapse popupOpt("GUIOnEventMode", 1) #Include <GuiConstants.au3> #Include <Constants.au3> If FileExists("test.txt") Then FileDelete("test.txt") EndIf GUICreate("Macro Builder v0.1", 620,520, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES $filemenu = GUICtrlCreateMenu ("&About") GUICtrlCreateLabel("Requestor:", 10, 15) $requestor = GUICtrlCreateInput ("", 10, 35, 300, 20) GUICtrlCreateLabel("Keyword:", 10, 65) $keyword = GUICtrlCreateInput ("", 10, 85, 300, 20) GUICtrlCreateLabel("Assigned To:", 10, 115) $assigned = GUICtrlCreateInput ("", 10, 135, 300, 20) GUICtrlCreateLabel("Location:", 10, 165) $location = GUICtrlCreateInput ("", 10, 185, 300, 20) GUICtrlCreateLabel("Site:", 10, 215) $site = GUICtrlCreateInput ("", 10, 235, 300, 20) GUICtrlCreateLabel("Status:", 10, 265) $status = GUICtrlCreateInput ("", 10, 285, 300, 20) GUICtrlCreateLabel("Submitter:", 10, 315) $submitter = GUICtrlCreateInput ("", 10, 335, 300, 20) GUICtrlCreateLabel("Date:", 10, 365) $date = GUICtrlCreateInput ("mm/dd/yyyy", 10, 385, 300, 20) $btn = GUICtrlCreateButton ("Ok", 270,440,80,40,0x0300) GUICtrlSetOnEvent($btn, "OKBTN") GUISetOnEvent($GUI_EVENT_CLOSE, "XButton") GUISetState(@SW_SHOW) While 1 Sleep(1000) WEnd Func OKBTN() $file = FileOpen("test.txt", 1) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWrite($file, $requestor) ; FileWrite($file, "Keyword: " & $keyword & " test" & @CRLF) ; FileWrite($file, $assigned & @CRLF) ; FileWrite($file, $keyword & @CRLF) FileClose($file) ;MsgBox(0, "Macro Saved", "Macro saved to: C:\Program Files\AR System\HOME\ARCmds") Exit EndFunc Func Xbutton() Exit EndFunc Link to comment Share on other sites More sharing options...
DW1 Posted January 17, 2008 Share Posted January 17, 2008 FileWrite($file, $requestor) should be FileWrite($file, GuiCtrlRead($requestor)) AutoIt3 Online Help Link to comment Share on other sites More sharing options...
gcue Posted January 17, 2008 Author Share Posted January 17, 2008 awesome!! many many thanks!!!!!FileWrite($file, $requestor)should beFileWrite($file, GuiCtrlRead($requestor)) 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