Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2006
    Posts
    4

    Peekaboo! Text file and paragraph

    Hello. This is my first post on this forum.
    I have 2 questions. Can you explain me how to get text from txt file from internet in paragraph when I click on button in my program. I found some examples on this forum but it's little different. I'm begginer.
    Second question is same like first but, I want to get text form file on my disk not form internet.
    Sorry for bad english.

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    From disk, it is simple. Just use the TextFile.ReadToString action.
    As to text from website, more complicated as you have to parse the text from the html file on the remote site (IF it is inside the html and not loaded with a java script or something)..mucho problem.

    Yossi

  3. #3
    Join Date
    Nov 2006
    Posts
    4
    I try to add this code to button:
    Code:
    result = TextFile.ReadToString("AutoPlay\\Docs\\my file.txt");
    result = Paragraph.GetText(Paragraph1);
    but cant get text in Paragraph1. See the pic in attachment.
    I want to make some buttons and when I clik on each button then I want in paragraph1 to see text from txt file.
    Attached Images

  4. #4
    Join Date
    Nov 2006
    Posts
    306
    Hey N1Tr0Net,

    Welcome
    Use this code:

    Code:
    resultString = TextFile.ReadToString("AutoPlay\\Docs\\my file.txt");
    Paragraph.SetText("Paragraph1",resultString);

  5. #5
    Join Date
    Nov 2006
    Posts
    4
    Thank you yosik, and specially thank's to usernameCasper: That code work.

  6. #6
    Join Date
    Nov 2006
    Posts
    306
    np, you´re welcome
    For the Text from internet, dunno if this possible to grab text from internet in AMS, think its not worthfull, same in my eyes, but if you want, you can copy text from the web and paste it in a Paragraph ? Than make a button, "Save Text !" what saves the text from internet to a *.txt-file
    Good luck !

    -Casper

Similar Threads

  1. help with ftp connect
    By CAI in forum AutoPlay Media Studio 6.0
    Replies: 0
    Last Post: 09-29-2005, 07:13 PM
  2. Formating a text or htm file HELP !!!!
    By lance in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 08-30-2005, 11:42 AM
  3. Example: Loading Paragraph Text Using a Timer
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 7
    Last Post: 11-25-2004, 05:10 PM
  4. Loading and Displaying a Text File
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 02:56 PM
  5. Reading Specific Lines from a Text File
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 10:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts