KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

editable text box

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
wjp79
KiXforms Novice
KiXforms Novice


Joined: 24 Feb 2009
Posts: 4
Location: Friesland (The Netherlands)

PostPosted: Thu Jul 16, 2009 1:49 pm    Post subject: editable text box Reply with quote

Hello people.

I made a textbox to keep up all the changes of my script.

But now i would like to have an editable textbox so it writes direct to the text file!

how do I do that?

Here is "my" (thx to the original coder, could not find the original post. Changed it to use tabbpages) little piece of code so far.

Code:

$TextBox = $TabPage3.Controls.TextBox()
$TextBox.Dock = Fill
$TextBox.Multiline = "True"
$TextBox.ScrollBars = Vertical
$TextBox.Text = ""
$TextBox.WordWrap = "True"
ReadFile("\\server1\software\INSTALLEREN-autoit\source\test.txt")

Function ReadFile($FilePathName)
   Dim $Text,$Line
   If Open(1,$FilePathName,2)=0
      Do
         $Line = ReadLine(1)
         $Error = @error
         $Text = $Text + $Line + @CRLF
      Until Not($Error = 0)
   EndIf
   $TextBox.Text = $Text
EndFunction




Can someone enlighten me!?
Back to top
View user's profile Send private message
Mart
KiXforms Regular
KiXforms Regular


Joined: 03 Oct 2005
Posts: 57
Location: Rotterdam - Netherlands

PostPosted: Sun Jul 19, 2009 9:14 pm    Post subject: Reply with quote

You can do something like this in a function that is activated by a button.

Code:

$rc = open (1, "c:\somefile.txt", 5)
$rc = Writeline(1, $textbox.text + @crlf)
$rc = Close(1)

_________________
Mart

- He's chained forever to a world that's departed.....It's not enough, it's not enough - Sorrow by Pink Floyd.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group