web view object problem

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • i started creating a little app where i show the web through the web view object

    i have 2 small problems, i would like to keep everything inside the web view object, because actually when i click on a website and then i click on an image url it opens/launch the default browser, how to keep that inside, i tried to put "_self" but i dont know what kind of function i need to put to achieve that.

    second problem is,

    i have a list of urls inside a txt file like this:
    "Please login to see this link.",
    "Please login to see this link.",
    etc

    how to tell to my web view object when the actual page is = to one of those in my list then its redirected to a new url?

    thanks to everyone :D

    Edited 2 times, last by imothep85 (November 5, 2017 at 3:40 PM).

  • 1. You need to change the mode to Internal. (Navigation -> Mode)
    2. You can do this by using the list object.

    Create a list object and have every URL you want to redirect in that list. Then create another list that has the new url you want to redirect to.
    Make sure that they are in order.

    List 1:
    "Please login to see this link."
    "Please login to see this link."
    "Please login to see this link."

    List 2:
    "Please login to see this link."
    "Please login to see this link."
    "Please login to see this link."

    Then you can use the "Find Exact" expression for the list.

    Code
    [COLOR=#333333]Clicks on button "Go"
    + [/COLOR][B]FindStringExact( "List", Edittext$( "Edit Box" ), -1 ) = -1[/B]
    ---------------------------------------------------------------
    Go to Webpage : Edittext$( "Edit Box" )
    
    
    Clicks on button "Go"
    + [B]FindStringExact( "List", Edittext$( "Edit Box" ), -1 ) ~ -1[/B]
    ---------------------------------------------------------------
    Go to Webpage: [B]List Line Text$( "List 2", FindStringExact( "List", Edittext$( "Edit Box" ), -1 ) )[/B]

    When you use the FindString or FindStringExact with the flag -1, then it will return -1 if it doesn't find it in the list, if it finds it it will return the line number. So you want to use that line number from List 1 to get the redirected url from List 2. So if the user goes to the URL in line 5 of List 1, then he will get redirected to the URL in line 5 of List 2.

    Edited once, last by Decal (November 6, 2017 at 4:48 PM).

  • No problem. If all your urls is going to be redirected to google.com then you will only need one list.

    And then you just do, If FindStringExact returns something different then -1, then you choose the web view object to go to Please login to see this link.

    Also if you have problems with the Web View Object, you might want to try out Web Control Object. It has a lot more features.

  • I wasn't aware that the Web Control Object was only for Developer.
    THe FindStringExact is an expression.

    You need to choose "Compare two general values" under "Special Conditions" and then right click on the list object and choose FindStringExact. Then use the flag -1.
    Then you check if the value is -1 then the url is not in the list, if it returns something else than -1 then the url is in the list.

  • mhh do you have a mfa? :D

    if i try to add this: FindStringExact( "List", Edittext$( "Edit Box" ), -1 ) = -1 in the first compare two values i get an error message "syntax error"
    if i put: FindStringExact( "List", Edittext$( "Edit Box" ), -1 ) i get "valid expression"

    and what i have to add in the second field?

    Edited once, last by imothep85 (November 8, 2017 at 9:09 AM).

  • Ok i did this: i created on bouton clicked+ FindStringExact( "List", Edittext$( "Edit Box" ), -1 ) and in the second field i added -1 in the list i have all my urls, and i get redirected :D to google.com if the url match

    BUT if i do this (the best solution to me) i want when the user is typing something in google and then he push "enter" if the url he click later match one of those in the list then he get redirected to google.

    but at the moment if i do this ( better solution): on web view object clicked + FindStringExact( "List", Edittext$( "Edit Box" ), -1 ) =-1 even if i type any word, i get redirected to google :s


    because i dont want to create a button in my app, just want to use the web view object

    i checked but somethign is wrong in fact, if i add bouton clicked+ FindStringExact( "List", Edittext$( "Edit Box" ), -1 ) and in the second field i added -1 i get redirected to google,if i type anithing but i click on the button i get also redirected to google.... so i think its better to have a mfa file to udnerstand how you solve that :s


    i have also another problem, web view object use internet explorer apparently, i have chrome by default browser....

    Edited 13 times, last by imothep85 (November 8, 2017 at 3:03 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!