Jump to content
UBot Underground

Recommended Posts

I am making a little app to browse a site but with radio support. So here is what I would like to do:

 

User tunes to radio and it will be a hidden browser but I want them to have the ability to stop the radio. I know you can do this in the main page but is it possible to close the "in new browser" browser or is that not possible without a timer? If its possible could someone give me a little example of how I would accomplish this? TIA :)

Link to post
Share on other sites

What is your current set-up if you don't mind showing some of the coding so we can see how to implement the feature. 

If not, 
Is it Multi-threaded, Single Threaded? 
Would having the program turn the radio off in that browser or do you want it to close the whole page? 

Have you tried the Close Page Command within the thread, with a LoopWhile? 

Regards,
HaHaItsJake

Link to post
Share on other sites

Here, 

Take a look at this, 

Let me know if it helps or not! 

 

ui button("Close Radio") {
    set(#Loop_While, "false", "Global")
}
in new browser {
    set(#Loop_While, "true", "Global")
    navigate("google.com", "Wait")
    comment("Other commands, login, channel, etc")
    loop while($comparison(#Loop_While, "=", "true")) {
        wait(1)
    }
    close page
}

Regards,
HaHaItsJake

Link to post
Share on other sites

Naw its just a single thread its to join a chat and be able to listen to radio while your there but, the chat also has voice chat so the ability to close the radio would be nice to have the radio code is:

 

define radioon {
    in new browser {
        navigate("http://usachatbuds.com/radio/""Wait")
        wait(14400)
    }
}

 

Put the wait to keep the new browser from closing right away but would like to be able to close the new browser with a button if possible also don't have it hidden at the moment but would like to have it hidden in the end

Link to post
Share on other sites

I do believe that code will do what I need it to. Thanks for that

ui button("Close Radio") {
    set(#Loop_While, "false", "Global")
}
radioon()
define radioon {
    in new browser {
        set(#Loop_While, "true", "Global")
        set user agent("Chrome")
        set visibility("Invisible")
        navigate("http://usachatbuds.com/radio/", "Wait")
        loop while($comparison(#Loop_While, "=", "true")) {
            wait(1)
        }
        close page
    }
}

There you go. Works perfectly for me. :)

 

Regards, 

HaHaItsJake

 

EDIT: Added in Visibility and User Agent. 

Edited by HaHaItsJake
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...