Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2007
    Posts
    172

    Grin what is wrong with my little code ?

    i want to load every node in tree object 1 by 1 every 15 seconds,,, i only have nodes, no childs

    on show :
    Code:
    data = 1
    Page.StartTimer(15000)
    on timer :
    Code:
    Count = Tree.GetChildCount("Tree1", "");
    data = Tree.GetSelectedNode("Tree1");
    Web.LoadURL("Web1", data)
    data = data+1
    if data == Count then
    data = 1
    else
    data = data
    end

  2. #2
    Join Date
    Sep 2008
    Posts
    14
    May be
    Code:
    Count = Tree.GetChildCount("Tree1", "0");

  3. #3
    Join Date
    Mar 2007
    Posts
    172
    no i tried that before i get that error
    Attached Images

  4. #4
    Join Date
    Sep 2008
    Posts
    14
    Quote Originally Posted by ButtonMaker View Post
    no i tried that before i get that error
    data = Tree.GetSelectedNode("Tree1");
    Here data as string.
    I am not understand what you wanted to write in your code. Try more clearly express what you need to do.

  5. #5
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    Tree.GetSelectedNode returns a string value.

    You can't do math on a string.

    Use something like "varnam = String.ToNumber(data) to convert to number.

  6. #6
    Join Date
    Mar 2007
    Posts
    172
    Quote Originally Posted by Kick View Post
    data = Tree.GetSelectedNode("Tree1");
    Here data as string.
    I am not understand what you wanted to write in your code. Try more clearly express what you need to do.
    well what i am trying is get the count of the nodes in tree object and load them 1 by 1 to web object... jump to next node after 15 seconds...
    Last edited by ButtonMaker; 03-26-2009 at 07:54 AM.

  7. #7
    Join Date
    Sep 2008
    Posts
    14
    Quote Originally Posted by ButtonMaker View Post
    well what i am trying is get the count of the nodes in tree object and load them 1 by 1 to web object... jump to next node after 15 seconds...
    On Show page:
    Code:
    nInd = 1;
    Page.StartTimer(15000);
    On Timer page:
    Code:
    nCount = Tree.GetChildCount("Tree1", "0");
    if (nCount > 0) then
    	Web.LoadURL("Web1", "http://"..Tree.GetNode("Tree1", nInd).Text);
    	nInd = nInd + 1;
    	if (nInd == nCount) then
    		nInd = 1;
    	end
    end
    Last edited by Kick; 03-26-2009 at 07:53 AM.

  8. #8
    Join Date
    Mar 2007
    Posts
    172
    thanks alot Kick

    1 question; how can i select loaded node ? i tried that but it doesnt seem to work !!!

    nCount = Tree.GetChildCount("Tab_Panel", "0");
    if (nCount > 0) then
    Web.LoadURL("Web1", Tree.GetNode("Tree1", nInd).Data);
    nInd = nInd + 1;
    Tree.SetSelectedNode("Tab_Panel", nInd);
    if (nInd == nCount) then
    nInd = 1;
    end
    end
    Last edited by ButtonMaker; 03-26-2009 at 08:05 AM.

  9. #9
    Join Date
    Sep 2008
    Posts
    14
    Code:
    nCount = Tree.GetChildCount("Tab_Panel", "0");
    if (nCount > 0) then
        Tree.SetSelectedNode("Tab_Panel", tostring(nInd));
        Web.LoadURL("Web1", Tree.GetNode("Tab_Panel", nInd).Data);
        nInd = nInd + 1;
        if (nInd == nCount) then
            nInd = 1;
        end
    end
    Last edited by Kick; 03-26-2009 at 10:09 AM.

Similar Threads

  1. is there anything wrong with this code ???
    By GoOgLe in forum AutoPlay Media Studio 7.5
    Replies: 21
    Last Post: 03-01-2009, 02:32 AM
  2. what's wrong with this code ???
    By GoOgLe in forum AutoPlay Media Studio 7.5
    Replies: 7
    Last Post: 11-17-2008, 11:27 AM
  3. Article: Using Authenticode Code Signing Certificates
    By Ted Sullivan in forum Setup Factory 8.0 Examples
    Replies: 4
    Last Post: 10-31-2007, 09:03 AM
  4. Wrong Error Code (When not reaching host)
    By Thierry_Zoller in forum Setup Factory 6.0
    Replies: 0
    Last Post: 04-21-2004, 05:53 PM
  5. Something is wrong in that actions code ??
    By APJACO in forum Setup Factory 6.0
    Replies: 3
    Last Post: 10-17-2002, 08:25 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