Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9

Thread: Switch or Case

  1. #1
    Join Date
    Feb 2008
    Posts
    146

    Switch or Case

    Heys,

    how my topic says, i try to find a option, that exist in Java, Pascal... and is Switch or Case...

    What i want to do is, when one language are checked, return a link to one image.

    Espanol
    English
    etc.

    Can help? i appreciated.

    Thanks in advance
    Attached Images

  2. #2
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634
    Quote Originally Posted by sermak View Post
    Heys,

    how my topic says, i try to find a option, that exist in Java, Pascal... and is Switch or Case...

    What i want to do is, when one language are checked, return a link to one image.

    Espanol
    English
    etc.

    Can help? i appreciated.

    Thanks in advance
    Can you explain little more do you mean you pick english and to shows you the english flag?

    What you asking sounds like it would be a simple but I am not not sure of this function you ask about never used it but you could easily click the option you want
    and return what ever data you tell it to

    Code:
    lng = "en";
    enabled = ComboBox.GetSelected(this);
    
    if enabled then 
    	-- do your action
    	-- or
            PathImg = Image.GetFilename(lng.."_img");
    else
    	-- do your action
    	-- or
    	PathImg = Image.GetFilename(lng.."_img");
    end
    
    Dialog.Message("Img Path","Your Path is: "..PathImg);
    This will only work tho if your call your image object the right thing like eng_img
    and spn_img and so on.

  3. #3
    Join Date
    Feb 2008
    Posts
    146
    As we see it is a pdoe Post Generator.

    I have this function that detects the captions are underlined and returns their names.

    Code:
    local Languages = {};
    
    for K, V in pairs(Page.EnumerateObjects()) do
    	if (CheckBox.GetChecked(V)) then
    		if (String.Mid(V, 1, 9) == "Language_") then
    			table.insert(Languages, CheckBox.GetText(V));
    		end
    	end
    end
    The images are hosted on a server image, type Imageshack, and I wanted was When a certain language you have checked it for
    PHP Code:
    English [img]http://img39.imageshack.us/img39/6200/99432169.gif[/img] 
    What I wanted now was that

    switch (s)
    case English: [returned the "English" and the flag]
    case Arabic: [returned the "Arabic" and the flag]
    case Portuguese : [returned the "Portuguese" and the flag]
    case French: [returned the "French" and the flag]
    .
    .and so each language have its name and flag
    .
    end

    Such as that at Attachment.

    If it is easier for you, for now its what i want to put in a Input
    PHP Code:
    total "[center][img]"..screens.."[/img]\r\n\r\n"..
    "[url="..imdb.."][img]http://img382.imageshack.us/img382/687/imdbdp2.png[/img][/url]\r\n\r\n"..
    "[color=#0000FF][b]Sinopsis[/b][/color]\r\n[code]"..sipnose.."[/code]\r\n\r\n"..
    "[color=#0000FF][b]Video:[/b][/color] "..video.."\r\n\r\n"..
    "[color=#0000FF][b]Audio:[/b][/color] "..audio.."\r\n\r\n"..
    "[color=#0000FF][b]Subtitles:[/b][/color] "..subtitle.."\r\n\r\n"..
    "[color=#0000FF][b]Special Options:[/b][/color] "..soptions.."\r\n\r\n"..
    "[color=#0000FF][b]Software used:[/b][/color]"..software.."\r\n\r\n"..links.."[/center]" 
    Thanks for you help and I hope I have explained better
    Attached Images
    Last edited by sermak; 05-06-2010 at 11:04 AM.

  4. #4
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634
    Quote Originally Posted by sermak View Post
    As we see it is a pdoe Post Generator.

    I have this function that detects the captions are underlined and returns their names.

    Code:
    local Languages = {};
    
    for K, V in pairs(Page.EnumerateObjects()) do
    	if (CheckBox.GetChecked(V)) then
    		if (String.Mid(V, 1, 9) == "Language_") then
    			table.insert(Languages, CheckBox.GetText(V));
    		end
    	end
    end
    The images are hosted on a server image, type Imageshack, and I wanted was When a certain language you have checked it for
    PHP Code:
    English [img]http://img39.imageshack.us/img39/6200/99432169.gif[/img] 
    What I wanted now was that

    switch (s)
    case English: [returned the "English" and the flag]
    case Arabic: [returned the "Arabic" and the flag]
    case Portuguese : [returned the "Portuguese" and the flag]
    case French: [returned the "French" and the flag]
    .
    .and so each language have its name and flag
    .
    end

    Such as that at Attachment.

    If it is easier for you, for now its what i want to put in a Input
    PHP Code:
    total "[center][img]"..screens.."[/img]\r\n\r\n"..
    "[url="..imdb.."][img]http://img382.imageshack.us/img382/687/imdbdp2.png[/img][/url]\r\n\r\n"..
    "[color=#0000FF][b]Sinopsis[/b][/color]\r\n[code]"..sipnose.."[/code]\r\n\r\n"..
    "[color=#0000FF][b]Video:[/b][/color] "..video.."\r\n\r\n"..
    "[color=#0000FF][b]Audio:[/b][/color] "..audio.."\r\n\r\n"..
    "[color=#0000FF][b]Subtitles:[/b][/color] "..subtitle.."\r\n\r\n"..
    "[color=#0000FF][b]Special Options:[/b][/color] "..soptions.."\r\n\r\n"..
    "[color=#0000FF][b]Software used:[/b][/color]"..software.."\r\n\r\n"..links.."[/center]" 
    Thanks for you help and I hope I have explained better
    so you are wanting the flag to in part of the post am i right since i see the [img]

    well you could simple still have a a table on the langs and when you pick one it selects that code

    you do so much already i don't see how come you not able to add this part?
    whats it not doing might be the best question to ask cos i don't see why you would not be able to get it working, i would say host the files your self so you can call them lanXXX.png or what ever and your able to call them all the time.

    i am guessing you have a option that returns the lang so do something like this.


    Code:
    -- Simple Function
    function Flag(eLng)
    	if eLng == "en" then
    		return "[img]url[/img]";
    	elseif eLng == "fr" then
    		return "[img]url[/img]";
    	elseif eLng == "sp" then
    		return "[img]url[/img]";
    	end
    end
    
    -- Simple Call of Function
    sFlag = Flag(LanguageString);
    Last edited by sim; 05-06-2010 at 11:39 AM.

  5. #5
    Join Date
    Feb 2008
    Posts
    146
    Or i'm very stupid, or i dont know..

    Please help me and try your code... for me, sFlag are value nill
    Attached Files

  6. #6
    Join Date
    Feb 2008
    Posts
    146
    Sorry... App are in my nature language, but variables are in English.. if you dont understand, i put in English for better understand

  7. #7
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634
    Quote Originally Posted by sermak View Post
    Sorry... App are in my nature language, but variables are in English.. if you dont understand, i put in English for better understand
    I am giving it a look now if i have any problems i will tell you

    can you put the files back in you remove as it wont open for me cos of life link ups but the files been missing.

  8. #8
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634
    I left a what to do within your app here is the APZ i was not going to edit all of it as you 3 i have made it a 3 flag demo but you copy the code not edit but copy the code off the comboboxs it will work and remove your labels and just peek the combobox labels as you will see what i have done in the apz

    if you change the combobox code your just going to make it harder for yourself.

    Only think you really need to edit is the globle of the language name and the image
    i see you did not even do this you just copied my code how would it work if its not
    been giving a vrb to check by.

    Look on globle around 22 Also read the Richtext i added to what to do.


    This is not the first time I help you with this App and others this is the same thing your asking also
    please don't be asking the same thing again as i wont be doing all again for a 3ed time.

  9. #9
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634
    Last one I posted was broken here you go.

    good luck.

  10. #10
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634
    Here is my out look on your program, before you ask for the APZ the coding under the hud is having a work over so I don't know when it will be working again.



    Can you show me a post where you used your app in the past to i can see how its meant to out put thanks.

  11. #11
    Join Date
    Feb 2008
    Posts
    146
    Quote Originally Posted by Sim
    This is not the first time I help you with this App and others this is the same thing your asking also
    please don't be asking the same thing again as i wont be doing all again for a 3ed time.
    First of all, thank you. Sometimes it's easier than you think, but I'm not a pro at programming, and I have some difficulties. Sorry to bother you with my application. When the application in action will, go on attach.

    The labels were superimposed on the Checkbox, because the person you'm trying to develop the application, use the Windows Classic theme and could not see, therefore, to see him, I used such tactics. As for the images that were not presented, it was only with them because the application takes up 2MB, and would not give to upload ...

    Since it is very big, it was the image of top cut, but you can understand. What's with the red rectangle is the translation of my language to English

    After that, I hope not we need more help. It's just that sometimes, as I said, do not quite understand what to do ...

    Thanks one more time
    Attached Images
    Last edited by sermak; 05-07-2010 at 08:06 AM.

  12. #12
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634
    Quote Originally Posted by sermak View Post
    First of all, thank you. Sometimes it's easier than you think, but I'm not a pro at programming, and I have some difficulties. Sorry to bother you with my application. When the application in action will, go on attach.

    The labels were superimposed on the Checkbox, because the person you'm trying to develop the application, use the Windows Classic theme and could not see, therefore, to see him, I used such tactics. As for the images that were not presented, it was only with them because the application takes up 2MB, and would not give to upload ...

    Since it is very big, it was the image of top cut, but you can understand. What's with the red rectangle is the translation of my language to English

    After that, I hope not we need more help. It's just that sometimes, as I said, do not quite understand what to do ...

    Thanks one more time

    As you can see my newer version of your apps is little better can you PM me and i help you more also send me the link to that forum and i will help me testing more also thanks.

    I am having fun redoing this so i don't mind

  13. #13
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634

    Version 2.6.0.0 xMod


    The mod version as been recoderd and i am right this secand working on a language support
    but google is telling you your labels are in 2 languages so it got confused.

    Now know what your program dose I can redefine it as you tryed to make it look like a evey day
    program when its really for posting Video Download posts.

  14. #14
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,634
    Can you please convert the labels to english please as google is telling me it is French, Portugese and Galician so i am bloody confucned i swear Galician means Portugeses.

    This will help for the language suppor for the menu and labels.

  15. #15
    Join Date
    Feb 2008
    Posts
    146
    Despite the efforts of sim not yet got what he wanted. Somebody help me? Because the coding of sim although it works in only one language. If you need to more than one that also gives

Posting Permissions

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