dickieknee Posted March 24, 2006 Posted March 24, 2006 hi just started playing with Autoit and have had lots of fun with the wonderful examples and have made a small GUI with a number of tabs, and in those tabs i have put a INPUT box. Now when i select File Open then I use Fileopen Dialog then read the file and and using the GuiCtrlSetData i set the data to the controlId for the input box however it does not put the new lines onto a new line but inserts control characters (i expect) on one line. I tried the string replace but to no avail any and all help is appreciated GuiCtrlCreateTab(0, 90, 530, 380) GuiCtrlCreateTabItem("tab1") $tabtext=GuiCtrlCreateInput("i am writing here", 20, 160, 480, 250) GuiCtrlCreateTabItem("") GuiSetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton ExitLoop Case $msg = $fileitem $file = FileOpenDialog("Choose file...",'C:\Documents and Settings\me\My Documents',"All (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) ; Check if file opened for reading OK If $file = -1 Then Msgjava script:emoticon("", "smid_4") :'(Box(0, "Error", "Unable to open file.") Exit EndIf FileOpen($file,0) $contents = FileRead($file,FileGetSize($file)) $contents = StringReplace($contents, "|", @CRLF,0) GuiCtrlSetData($tabtext, $contents) EndSelect WEnd
Nuffilein805 Posted March 24, 2006 Posted March 24, 2006 try using guictrlcreateedit instead of the input (i think it only handles 1 line) this should work my little chatmy little encryption toolmy little hidermy unsafe clickbot
dickieknee Posted March 24, 2006 Author Posted March 24, 2006 try using guictrlcreateedit instead of the input (i think it only handles 1 line)this should workSUperb worked first time, thanks heaps
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