cppman Posted March 10, 2006 Share Posted March 10, 2006 im not sure what im doing wrong... Im getting my little error message... im having a bit of brain lock, so its probably something really obvious. If $toDos = $GUI_CHECKED Then $iFile = FileOpen(GUICtrlRead($InFile), 0) $oFile = FileOpen(GUICtrlRead($OutFile) & ".txt", 1) $lCt = _FileCountLines(GUICtrlRead($InFile)) For $i = 1 to $lCt $String = FileReadLine($iFile, $i) $Cut = StringStripCR($String) FileWriteLine($oFile, $Cut) Next FileClose($iFile) FileClose($oFile) MsgBox(0, "Finished!", "Finished!") Else If $toUnix = $GUI_CHECKED Then $iFile = FileOpen(GUICtrlRead($InFile), 0) $oFile = FileOpen(GUICtrlRead($OutFile) & ".txt", 1) $lCt = _FileCountLines(GUICtrlRead($InFile)) For $i = 1 to $lCt $String = FileReadLine($iFile, $i) $Cut = StringReplace($String, @CRLF, @LF) FileWriteLine($oFile, $Cut) Next FileClose($iFile) FileClose($oFile) MsgBox(0, "Finished!", "Finished!") Else MsgBox(0, "Error!", "") EndIf EndIf EndFunc Miva OS Project Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 10, 2006 Share Posted March 10, 2006 (edited) im guessing this isnt ur full script and u added #include <GUIConstants.au3> and are you doing a guictrlread on the thing? Edited March 10, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
cppman Posted March 10, 2006 Author Share Posted March 10, 2006 (edited) im guessing this isnt ur full script and u added #inlude <GUI.au3>hahah... thats it... i never did GuiCtrlRead... lol Edited March 10, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
Valuater Posted March 10, 2006 Share Posted March 10, 2006 #include <GUIConstants.au3> GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered $radio1 = GUICtrlCreateRadio ("Radio 1", 10, 10, 120, 20) GUICtrlSetState ($radio1,$GUI_CHECKED) $radio2 = GUICtrlCreateRadio ("Radio 2", 10, 40, 120, 20) $btn = GUICtrlCreateButton( "Test", 100, 100, 100, 20) GUISetState () ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $btn Then If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED Then MsgBox(0,"test", " Radio 1 was checked ") ElseIf BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED Then MsgBox(0,"test", " Radio 2 was checked ") EndIf EndIf If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 10, 2006 Moderators Share Posted March 10, 2006 im guessing this isnt ur full script and u added #inlude <GUI.au3>Never knew there was a GUI.au3 If $msg = $toDos And GUICtrlRead($toDos) = $GUI_CHECKED Then Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted March 10, 2006 Share Posted March 10, 2006 (edited) just trying to post quickly b4 u ahhaah couldnt spend my time actualy writing the whole thing out well i guess i wont even bother since valuater just potsed it with the guictrlread and everything so blah Edited March 10, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Valuater Posted March 10, 2006 Share Posted March 10, 2006 Never knew there was a GUI.au3 If $msg = $toDos And GUICtrlRead($toDos) = $GUI_CHECKED Then i dont think that works anymore Ron 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 10, 2006 Moderators Share Posted March 10, 2006 i dont think that works anymore Ron8)No?... Try this: http://www.autoitscript.com/forum/index.ph...ndpost&p=159238 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted March 10, 2006 Share Posted March 10, 2006 No?... Try this: http://www.autoitscript.com/forum/index.ph...ndpost&p=159238your right ... it doesI cant even remember the reason why i was taught the way i write it nowMhz is in... he would know8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 10, 2006 Moderators Share Posted March 10, 2006 (edited) your right ... it doesI cant even remember the reason why i was taught the way i write it nowMhz is in... he would know8)I don't know if it works on Radios like I posted... guess I could check... But I use the one you posted strictly for radio controls.Edit:Nopt it works on Radio also... hmm (Maybe I started using that when t0ddie posted his radio problem a few months ago) Edited March 10, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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