Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    67

    IF else statement

    IF else I do not work this out the wife is going to come in here and brain me. 3 am and still pounding away

    I have an if statement that I have had as an if..then..else, now as an if..then
    neither way is working

    -----one way-----
    ndata = ComboBox.GetItemData("FileType","",nil);






    if ndata == "1"
    then
    ForMP3 ()
    end

    if ndata == "2"
    then
    ForWAV ()
    end

    if ndata == "3"
    then
    ForM3U ()
    end

    if ndata == "4"
    then
    ForPLS ()
    end
    ------other way------

    ndata = ComboBox.GetItemData("FileType","",nil);






    if ndata == "1"
    then
    ForMP3 ()
    else

    if ndata == "2"
    then
    ForWAV ()
    else

    if ndata == "3"
    then
    ForM3U ()
    else

    if ndata == "4"
    then
    ForPLS ()
    end
    end
    end
    end

    Both are only seeing the first function and not moving on to the other selections in the combobox.

    Thanks

  2. #2
    Join Date
    Feb 2004
    Posts
    67

    There in front of me

    ndata = ComboBox.GetText("FileType");

    if (ndata == "*.mp3") then ForMP3();

    elseif (ndata == "*.wav") then ForWAV();

    elseif (ndata == "*.m3u") then ForM3U();

    elseif (ndata == "*.pls") then ForPLS();
    end

  3. #3
    Join Date
    Oct 2006
    Posts
    209
    hi tried all ways but i came with this idea and i think you dont have to use so many if as i did
    PHP Code:
    if e_Key == 13 then

    fname 
    Input.GetText("Input1");
    if 
    fname == "" then 
        Dialog
    .Message ("Error""Please enter Staff ID"MB_OKMB_OKMB_ICONEXCLAMATION)
        return
    end
    drive 
    "\\\\fc1\\users\\";
    folder fname;
    search_results Folder.Find(drivefolderfalsenil);

    if (
    search_results == nilthen
    fname 
    Input.GetText("Input1");
    drive "\\\\cfc1\\USERS0\\";
    folder fname;
    search_results Folder.Find(drivefolderfalsenil);
        if (
    search_results == nilthen
        drive 
    "\\\\cfc2\\users1\\";
        
    search_results Folder.Find(drivefolderfalsenil);    
            if (
    search_results == nilthen

            drive 
    "\\\\cfc4\\users2\\";

            
    search_results Folder.Find(drivefolderfalsenil);    
                if (
    search_results == nilthen

                drive 
    "\\\\cfc5\\users3\\";

                
    search_results Folder.Find(drivefolderfalsenil);    
                    if (
    search_results == nilthen

                    drive 
    "\\\\cfc6\\users\\";

                    
    search_results Folder.Find(drivefolderfalsenil);
                        if (
    search_results == nilthen

                        drive 
    "\\\\fc7\\adlusers\\";

                        
    search_results Folder.Find(drivefolderfalsenil);
                            if (
    search_results == nilthen

                            drive 
    "\\\\vc1\\USERS\\";

                            
    search_results Folder.Find(drivefolderfalsenil);
                                if (
    search_results == nilthen

                                drive 
    "\\\\hxc1\\users0\\";

                                
    search_results Folder.Find(drivefolderfalsenil);
                                    if (
    search_results == nilthen

                                    drive 
    "\\\\hxc2\\users0\\";

                                    
    search_results Folder.Find(drivefolderfalsenil);
                                        if (
    search_results == nilthen

                                        drive 
    "\\\\cxc1\\cusers\\";

                                        
    search_results Folder.Find(drivefolderfalsenil);
                                            if (
    search_results == nilthen
                                            
                                            drive 
    "\\\\xs1\\users\\";
                                            
                                            
    search_results Folder.Find(drivefolderfalsenil);
                                                if (
    search_results == nilthen
                                            
                                                drive 
    "\\\\xs1\\Users\\";
                                            
                                                
    search_results Folder.Find(drivefolderfalsenil);
                                                    if (
    search_results == nilthen
                                            
                                                    drive 
    "\\\\fvfc1\\users\\";
                                            
                                                    
    search_results Folder.Find(drivefolderfalsenil);
                                                        if (
    search_results == nilthen
                                            
                                                        drive 
    "\\\\vxc1\\USERS\\";
                                            
                                                        
    search_results Folder.Find(drivefolderfalsenil);
                                                            if (
    search_results == nilthen
                                            
                                                            drive 
    "\\\\xs1\\users\\";
                                            
                                                            
    search_results Folder.Find(drivefolderfalsenil);
                                                                if (
    search_results == nilthen
                                            
                                                                drive 
    "\\\\xs1\\users\\";
                                                                
                                                                
    search_results Folder.Find(drivefolderfalsenil);
                                                                    if (
    search_results == nilthen
                                                                
                                                                    drive 
    "\\\\dxs1\\users\\";
                                                                
                                                                    
    search_results Folder.Find(drivefolderfalsenil);
                                                                        
                                                                        if (
    search_results == nilthen
                                                                        drive 
    "\\\\tcxc1\\users\\";
                                                                        
    search_results Folder.Find(drivefolderfalsenil);
                                                                            
                                                                            if (
    search_results == nilthen
                                                                            drive 
    "\\\\kfc1\\users\\";
                                                                            
    search_results Folder.Find(drivefolderfalsenil);
                                                                            
                                                                                if (
    search_results == nilthen
                                                                                Dialog
    .Message("Notice""There is No Folder "  ..folder.. " on Network.");    
                                                                                else
                                                                                
    Clipboard.CopyText(search_results[1]);
                                                                                
    end
                                                                            
    else
                                                                            
    Clipboard.CopyText(search_results[1]);
                                                                            
                                                                            
    end
                                                                        
    else
                                                                        
    Clipboard.CopyText(search_results[1]);
                                                                        
                                                                        
    end
                                                                    
    else
                                                                    
    Clipboard.CopyText(search_results[1]);
                                                                    
                                                                    
    end
                                                                
    else
                                                                
    Clipboard.CopyText(search_results[1]);
                                                                
                                                                
    end
                                                            
    else
                                                            
    Clipboard.CopyText(search_results[1]);
                                                            
                                                            
    end
                                                        
    else
                                                        
    Clipboard.CopyText(search_results[1]);
                                                        
                                                        
    end
                                                    
    else
                                                    
    Clipboard.CopyText(search_results[1]);
                                                    
                                                    
    end
                                                
    else
                                                
    Clipboard.CopyText(search_results[1]);
                                                
                                                
    end
                                            
    else
                                            
    Clipboard.CopyText(search_results[1]);
                                            
                                            
    end
                                        
    else
                                        
    Clipboard.CopyText(search_results[1]);
                                        
                                        
    end
                                    
    else
                                    
    Clipboard.CopyText(search_results[1]);
                                    
                                    
    end
                                
    else
                                
    Clipboard.CopyText(search_results[1]);
                                
                                
    end
                            
    else
                            
    Clipboard.CopyText(search_results[1]);
                            
                            
    end
                        
    else
                        
    Clipboard.CopyText(search_results[1]);
                        
                        
    end    
                    
    else
                    
    Clipboard.CopyText(search_results[1]);
                    
                    
    end
                
    else
                
    Clipboard.CopyText(search_results[1]);
                
                
    end
            
    else
            
    Clipboard.CopyText(search_results[1]); 
            
            
    end
        
    else
        
    Clipboard.CopyText(search_results[1]);
        
        
    end
    else
    Clipboard.CopyText(search_results[1]);

    end


    isText 
    Clipboard.IsTextAvailable(); 
    if 
    isText then 
        cbText 
    Clipboard.GetText(); 
    end
    Label
    .SetText("Label2"cbText);

    Size DLL.CallFunction(_SourceFolder.."\\AutoPlay\\Docs\\xfsize.dll""GetFolderSize""\""..cbText.."\""DLL_RETURN_TYPE_STRINGDLL_CALL_STDCALL)
    Size String.ToNumber(Size)
    if 
    Size >= 1073741824 then
        Size 
    Size/1024Size Size/1024Size Size/1024;
        
    Size Math.Round(Size1);
        
    Size Size.." GB";
    elseif 
    Size >= 1048576 then
        Size 
    Size/1024Size Size/1024;
        
    Size Math.Round(Size1);
            
    Size Size.." MB";
    elseif 
    Size >= 1024 then
        Size 
    Size/1024
        Size 
    Math.Round(Size1);
        
    Size Size.." KB";
    else
        
    Size Math.Round(Size1);
    end
    Label
    .SetText("result""Size: "..Size)







    end 

  4. #4
    Join Date
    Feb 2004
    Posts
    67

    Thumbs up Thanks for the try

    My last post in was the solution. It works very well and leaves the functions on a global so I can actually call them on another page as well.

    Thanks for the big help there.

Similar Threads

  1. IF Statement layout
    By Sooty in forum Setup Factory 6.0
    Replies: 0
    Last Post: 10-19-2004, 06:39 AM
  2. WHILE loop inside a IF/ENDIF statement???? Bug??
    By TJ_Tigger in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 04-27-2003, 07:49 PM
  3. IF statement for mac address ideas
    By Option_Explicit in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 11-04-2002, 11:51 PM
  4. How do I add to my PATH statement at install?
    By Tnygaard in forum Setup Factory 6.0
    Replies: 3
    Last Post: 05-27-2002, 01:38 AM
  5. If Statement
    By locc in forum Setup Factory 6.0
    Replies: 2
    Last Post: 04-18-2002, 06:12 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