Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2007
    Posts
    24

    Arrow display pic corresponding to url

    hey,



    in my app, it checks the URL using http methods and returns certain codes
    if codes match (say.. 1000) it will show an image of a blue dot.. if it matches all the other codes like 3000+ it will display a red image next to the URL.

    in this pic, only yahoo.com has a http value of 1000 so it displays a blue pic, all the rest display red. the user can input any URL they want, replacing those 4 URLS for it to check.. all URLs have different http values depending on this code i have, don't worry about how the http methods work just tell me what's the best way to script this.. because if they only put 1 URL sometimes it shows all 4 red dots even though i havn't specified 4 URLs but only 1..

  2. #2
    Join Date
    Jan 2007
    Posts
    24
    any idea?

  3. #3
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    how are you displaying the links to the URLs and the associated images? Is this contained in a Tree object a web object?
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  4. #4
    Join Date
    Jan 2007
    Posts
    24
    the images are just little images, i have red and blue under each other i can hide and show whichever one i want, the links are in text boxes so they input the link and i check them using input commands. is that what you needed to know?

  5. #5
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    It sound like you need to add some code to the http checking code you use to show/hide the images as appropriate.

    What code are you using to check the urls. We can try to help integrate the show hide if you need us to.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  6. #6
    Join Date
    Jan 2007
    Posts
    24

    Grin

    The url checking is much more complicated than you can imagine, and hard to explain. The image showing/hiding i know how to do, just showing images based on how many urls are typed in the edit boxes

    say. you only type 2 urls in
    my app shows 4 red images, i only want them to show 2 *based on how many urls they typed* like 3 url = 3 red or blue dots.. not all 4, and it'll check to see if its red or blue.

    there's also alot of if checks to check the url so it'll have like if (url_1 == <code1>) and if (url_1 == <code7>) etc. for all 4 slots.
    how would i do this?

  7. #7
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    My suggestion would be to create a function that does your url checking and returns a true or false based on how everything checks out. Then I would start your red and blue images as hidden, in the properties dialog set their visible property to false. I would recommend that you have a standard naming scheme for all your items so you can loop through them, maybe something like this:

    In-url1
    Im-r1
    Im-b1

    In-url2
    Im-r2
    Im-b2

    In-url3
    Im-r3
    Im-b3

    In-url4
    Im-r4
    Im-b4

    Then you can use a for loop to step through all four and perform your function

    Code:
    --set a loop to count from 1 to 4
    for x = 1,4 do
         -- get the text from the input or label that contains your url
         local sURL = Input.GetText("In-url"..x)
         --if it is valid or contains anything 
         if sURL then
              --then run your custom funciton here to see if it is good, if it is then set your images appropriately
              if MyURLcheckingfunction(sURL) then
                   Image.SetVisible("Im-b"..x, true)
                   Image.SetVisible("Im-r"..x, false)
              else -- otherwise set them to the opposite setting.
                   Image.SetVisible("Im-b"..x, false)
                   Image.SetVisible("Im-r"..x, true)
              end
         else --no url in the input box then hide both images
              Image.SetVisible("Im-b"..x, false)
              Image.SetVisible("Im-r"..x, false)
         end
    end
    I hope that helps get you started.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. Display a screen, wait, then move on
    By Tek in forum Setup Factory 7.0
    Replies: 2
    Last Post: 03-01-2005, 09:19 AM
  2. Function: Get Filename from URL
    By Brett in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-31-2004, 02:46 PM
  3. HOW TO: Return a Web Browser Object to the Original URL after a Page Jump
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 02-03-2003, 09:18 AM
  4. HOWTO: Display Conditional Text Based Upon a List Box Selection
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-15-2002, 10:54 AM
  5. HOWTO: Open an Internet URL in the Default Web Browser
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 09-18-2002, 01:59 PM

Posting Permissions

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