Announcement

Collapse
No announcement yet.

Update List box objects from a web site

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Update List box objects from a web site

    Ok guys, all together scratch your head [img]/ubbthreads/images/icons/smile.gif[/img]
    I have a AMS page with list box objects. When an internet connection is detected, i want to update the content of the list box using a file that would be located on my web site. That would extend the life of my AMS project. Any suggestion to point me to the right path in order to accomplish that?

    Thanks

    Martin

  • #2
    Re: Update List box objects from a web site

    Piece of cake ... [img]/ubbthreads/images/icons/smile.gif[/img]

    1.Download txt file
    2.Read txt file
    3.Update list box with txt file contents
    4.Delete txt file
    <font color=green>
    Internet.DownloadWebFile ("http://www.address.com/file.txt", "%TempDir%\Downloads")
    %TextFile% =TextFile.Read ("%SrcDir%\MyDirectory\MyText.txt")
    ListBoxObject[ListBox1].Remove (All)
    ListBoxObject[ListBox1].Add (Start, "AddThis")
    File.Delete ("%SrcDir%\MyDirectory\MyText.txt") </font color=green>
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

    Comment


    • #3
      Re: Update List box objects from a web site

      You'll need to replace the Carriage Return/Line Feeds with a ;; or use Carriage Return/Line Feeds as the delimiter for the list box. Look into Project Settings/Configurations to create a #ASC_CR# value of 13, and a #ASC_LF# value of 10, to detect the Carriage Returns and Line Feeds.


      Comment


      • #4
        Re: Update List box objects from a web site

        right ... or simply put

        #ASC_CR##ASC_LF#

        in the delimiter box instead of ;;
        -
        = Derek
        ["All glory comes from daring to begin" - fortune cookie]

        Comment

        Working...
        X