Alladaskill17 Posted February 4, 2011 Share Posted February 4, 2011 How hard would it be to code a program to basically say: - choose from all movies, 1 randomly at a time - possibly by genre as well in some way Just a simple local program where ya click a button and it displays the title of one of your movies on the movie list. * Would also like to know (if its easy) a random fast food chooser too for myself and the roommates haha Link to comment Share on other sites More sharing options...
0 Cupcakes Posted February 4, 2011 Share Posted February 4, 2011 Wouldn't be too hard if you know ANY scripting language functions to use to grab data from imdb.com. Here are some: http://imdbpy.sourceforge.net/ http://davidwalsh.name/php-imdb-information-grabber http://codecanyon.net/item/imdb-scraper/113118 http://www.imdb.com/interfaces http://codehill.com/2009/02/get-a-movies-details-from-imdb/ As far as fast food goes, there would have to be a listing that exists. You'll more than likely have to populate it yourself. Then setting it up to show random on refresh would be pretty simple. Link to comment Share on other sites More sharing options...
0 bane7378 Posted February 4, 2011 Share Posted February 4, 2011 I have a feeling he was looking more for a program that he can list all his own movies in and then have the program select one at random for him to watch. That was just my take on his post. Could be that I have actually been thinking about something like this for myself. Can you clarify if that is what you were looking for Alladaskill17? Link to comment Share on other sites More sharing options...
0 Cupcakes Posted February 4, 2011 Share Posted February 4, 2011 It all would function the same whether he populates it or grabs from IMDB. Link to comment Share on other sites More sharing options...
0 bane7378 Posted February 4, 2011 Share Posted February 4, 2011 From looking at the links you posted it looked as if they were grabbing specific movie titles or random movie titles from IMDB's database though. He might have to submit quite a few queries to get an actual movie he owns or has access to. I guess I was approaching the question as him asking if there was a program that exists that already does this rather than him trying to get ideas about how to do it. Maybe that is where I'm confusing the point. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted February 4, 2011 Share Posted February 4, 2011 If you read he didn't ask if it was already in existence, he actually says: "How hard would it be to code a program [...]" Either way, if he populates from IMDB or from memory he's still got quite "a few" lines of work to populate it. I just did IMDB because its logical to use it (and if he just wants to have extra features outside of just the title of the movie.) Link to comment Share on other sites More sharing options...
0 Alladaskill17 Posted February 4, 2011 Author Share Posted February 4, 2011 I have a feeling he was looking more for a program that he can list all his own movies in and then have the program select one at random for him to watch. That was just my take on his post. Could be that I have actually been thinking about something like this for myself. Can you clarify if that is what you were looking for Alladaskill17? Yes I want to populate my own movie library as the list the program chooses from, that is what I meant. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted February 4, 2011 Share Posted February 4, 2011 http://davidmarotz.com/quotes.php You state program so I'm not sure if you're actually going to develop for Windows/OSX/Linux or if you mean script (web based.) Either way, there's a script I just gave. Populate it yourself, refresh and it will display random. Link to comment Share on other sites More sharing options...
0 Alladaskill17 Posted February 5, 2011 Author Share Posted February 5, 2011 http://davidmarotz.com/quotes.php You state program so I'm not sure if you're actually going to develop for Windows/OSX/Linux or if you mean script (web based.) Either way, there's a script I just gave. Populate it yourself, refresh and it will display random. I know nothing about coding, programming, scripting etc. So with that said, I don't care if it is a program, a script, etc. I really just wanted to be able to have my personal movie library stored (text file? database seems a bit much? ..don't know) and in some way having the "program" choose 1 from the list at a time. I have been googling to find a simple java example and learn off that, but I know so little. Whether or not there is a possible UI associated later is debatable but for now I either wanna run the script or launch the app and just hit enter / click a button and the title of a movie comes up, with the option to continuously do (until a movie sounds good haha) I'll work with that, and try to understand it, thanks. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted February 5, 2011 Share Posted February 5, 2011 I gave you a script to use already. You quoted my post with the link to it. Just stick with that since it's neatly explained with what you need to do. Link to comment Share on other sites More sharing options...
0 metallithrax Posted February 5, 2011 Share Posted February 5, 2011 I gave you a script to use already. You quoted my post with the link to it. Just stick with that since it's neatly explained with what you need to do. Your linked program produces quotes from films (if I read correctly), he is after a program that will randomly pick 1 film from a list of all the films he owns. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted February 5, 2011 Share Posted February 5, 2011 Your linked program produces quotes from films (if I read correctly), he is after a program that will randomly pick 1 film from a list of all the films he owns. Actually, no. The functionality is exactly the same as to what he needs. Replace "quotes" with "movies." See how it will now show a random movie on refresh? Exactly what he needs. PS - Not a program. It's a script. Link to comment Share on other sites More sharing options...
0 Alladaskill17 Posted February 6, 2011 Author Share Posted February 6, 2011 Hoq do I run a PHP script though? Link to comment Share on other sites More sharing options...
0 Cupcakes Posted February 6, 2011 Share Posted February 6, 2011 At this point just use something already created since you aren't too knowledgable on any of the languages you'd need to dive headfirst into what you're looking for. http://www.collectorz.com/movie/ or http://www.bruji.com/dvdpedia/. Or a number of others you can find through Google. Link to comment Share on other sites More sharing options...
0 metallithrax Posted February 6, 2011 Share Posted February 6, 2011 Actually, no. The functionality is exactly the same as to what he needs. Replace "quotes" with "movies." See how it will now show a random movie on refresh? Exactly what he needs. PS - Not a program. It's a script. Ah yes, I see that now. Damn, I must stop posting on Saturday nights after a beer of 3. Insert the names of the movies you own in place of the quotes in the script. Now I understand - or do I? :blush: Link to comment Share on other sites More sharing options...
0 Alladaskill17 Posted February 12, 2011 Author Share Posted February 12, 2011 http://davidmarotz.com/quotes.php You state program so I'm not sure if you're actually going to develop for Windows/OSX/Linux or if you mean script (web based.) Either way, there's a script I just gave. Populate it yourself, refresh and it will display random. I copy/pasted the script from <? to ?> and switched my movies for those quotes, saved it as "quotes.php" and ran it in the browser, but it only comes up as black text of the script?! What am I doing wrong to actually run the script? Link to comment Share on other sites More sharing options...
0 Cupcakes Posted February 12, 2011 Share Posted February 12, 2011 It's PHP based. You need PHP to view it. http://www.wampserver.com/en/ Otherwise if you want literal programs to do it, I already linked you to some that have a "random" function built in after you populate it with your own movies. Link to comment Share on other sites More sharing options...
0 Andrew Lyle Global Moderator Posted February 12, 2011 Global Moderator Share Posted February 12, 2011 I've seen this topic title way too long, so here is a quick script for you. $movieArray = array("1" => "Movie title 1", "2" => "Movie title 2", "3" => "movie title 3", "4" => "Movie title 4"); //count the array $TotalMovies = count($movieArray); // pick a random number $MoviePick = rand(1, $TotalMovies); echo "Tonight you will watch: ". $movieArray[$MoviePick]; Hopefully this solves your problem on picking a movie :p Link to comment Share on other sites More sharing options...
0 Alladaskill17 Posted February 12, 2011 Author Share Posted February 12, 2011 I've seen this topic title way too long, so here is a quick script for you. $movieArray = array("1" => "Movie title 1", "2" => "Movie title 2", "3" => "movie title 3", "4" => "Movie title 4"); //count the array $TotalMovies = count($movieArray); // pick a random number $MoviePick = rand(1, $TotalMovies); echo "Tonight you will watch: ". $movieArray[$MoviePick]; Hopefully this solves your problem on picking a movie :p How do I 'run' this script? Link to comment Share on other sites More sharing options...
0 Alladaskill17 Posted February 21, 2011 Author Share Posted February 21, 2011 Found it in a google search. Just using an Applescript: set movies to {"movie1", "movie2", "Movie3", "Movie4"} set randommovie to some item of movies display dialog randommovie original script Link to comment Share on other sites More sharing options...
Question
Alladaskill17
How hard would it be to code a program to basically say:
- choose from all movies, 1 randomly at a time
- possibly by genre as well in some way
Just a simple local program where ya click a button and it displays the title of one of your movies on the movie list.
* Would also like to know (if its easy) a random fast food chooser too for myself and the roommates haha
Link to comment
Share on other sites
19 answers to this question
Recommended Posts