Skip to first unread message

kamal jit Baishya

unread,
Jan 7, 2018, 8:06:42 AM1/7/18
to MIT App Inventor Forum
i am using variable "website" component with a random list item ( 20 nos of url) through open as a web viewer user interface. But when i click "next button" randomly open only 1 site. please help

SteveJG

unread,
Jan 7, 2018, 8:21:51 AM1/7/18
to MIT App Inventor Forum
Please post an image of your blocks here using the blue icon above (to the left of the Link menu item).  Your code for selecting will most probably open only one site at each button touch.  If it is always the same url, you have a programming issue with your blocks.   If you want this app to randomly change web pages ever minute or so, then you also have to use a Clock component.

Regards,
Steve

kamal jit Baishya

unread,
Jan 7, 2018, 8:37:50 AM1/7/18
to MIT App Inventor Forum

Please find the block image. I want, when user click next button then show next webpage. i dont want to use clock component. Kindly help 
blocks (13).png

SteveJG

unread,
Jan 7, 2018, 8:53:11 AM1/7/18
to mitappinv...@googlegroups.com
Try it this way

Your initialize block should be set to create empty list.
What you have now in your  initialize block should go into a   set websites block in your  next  button click event handler .   There are better ways; this might work and it is minimal changing of your blocks.  Try it if it does not work, show what you tried .

Also you are switching screens.  Bad idea but do what you want to do , better to use virtual screens ... see 

If you take the time to read the resources mentioned below, you would have known how to do this We want you to have fun with App Inventor so here are some resources to help you learn to use the AI2 tools  A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  

How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .



Just try some blocks and have fun.

Regards,
Steve



kamal jit Baishya

unread,
Jan 7, 2018, 9:13:11 AM1/7/18
to MIT App Inventor Forum
Its a big thanks to you........ Its working....
Reply all
Reply to author
Forward
0 new messages