Phil, thanks so much! Works perfectly.
I tried to follow the same syntax to do a similar thing when I click on a button in my video record that launches a browser to go to netflix.com's home page for doing the same thing. But it fails. Do not know why it does not work like it does with imdb.com's URL synax.
Using as an example, the movie title "I Am Number Four" I can type the following URL string that takes me directly to that title's page:
http://movies.netflix.com/Search?v1=I Am Number Four
So I copied over the script that works for IDMb.com and made the following modifications:
Set Field By Name [VIDEODB::TITLE]
Set Variable [$title; Value:VIDEODB::TITLE]
Open URL ["http://movies.netflix.com/Search?v1=" + "& $title"]
When I assign the script to the netflix.com button in the record, nothing happens. I modified the script to pause, and the pop-up URL box just contains a numeric zero.
I've tried various combinations like adding another & character after $title etc but nothing seems to work.
Why is the first step Set Field by Name and why does it have only a target field parameter?
Set field by Name seems like the wrong step to use here and the syntax is such that it does nothing at all here.
I do not know. Like I said originally, I'm new to all this and I was just looking through all the functions of scripts trying to figure out how to set it up to work properly.
I just removed the first step and ran the script again and still get a pop-up URL box with the value "0" (zero) in the URL box instead of the URL specified in the last step (Open URL)...
If you put the VideoDB::Title field on your layout where you perform this script, do you see the expected vidoe title. If you hadn't already got this working for the other URL expression, I'd also ask if the Title field is of type text or number. It should be of type text.
With your helpful information yesterday I got the script to work for the IMDB.com button, that's why i can't figure out why it will not work with the netflix.com URL string, I'm using the same approach that worked yesterday with the imdb.com URL.
Yes the displayed record in the vidoedb database has the TITLE field displayed and it is a text field.
Let's make sure that the calculation is returning the expected text here. It looks like it does, but let's be sure.
Modify your script by adding Show Custom Dialog in place of the Open Url step. (You can duplicate your original script to keep a copy of it you want.)
Put the calcuation: "http://movies.netflix.com/Search?v1=" + "& $title"
inside the custom dialog and run this script to see if you get the expected text. If this works and OpenURL does not, it may be that there's some issue on the Netflix site that keeps this from working.
I added a custom dialog box and put in the same string as is in the OpenURL line. When I processed the custom dialog box, it opened
up a browser window and went to the netflix.com site displaying a page that said "Search is unavailable. Please try searching again later.
Up in the URL box of the browser is the following:
But if I type in the URL manually (http://movies.netflix.com/Search?v=I am Number Four) search results displays the correct page so search really
IS available (not down due to server issues), it just does not like what is being passed on to the browser. So the netflix.com site may not be friendly
this type of functionality.
What do you see in the custom dialog box?
We need to make sure that the expected text is returned.
Sorry Phil I misunderstood what you were wanting me to try. I just had the script display the custom dialog box and I pasted in the URL
string manually. How do I get the script to pass through the URL string from the script's "OpenURL.." contents?
Right now it just opens up a blank custom dialog box.
Copy and paste the calculation expression from the Open URL step into the messge box of the show custom dialog.
Oh ok, that's what I did. When the dialog box came up, I pasted in:
"http://movies.netflix.com/Search?v1="+"& $title "
That's when I got the error page on netflix.com saying "Search is unavailable." In the URL box of the netflix.com page it shows:
I am thinking this just isn't going to work due to netflix's site. appreciate your efforts to help, though.
Not what I'm suggesting.
Open the script in the script editor.
Copy the URL expression from the OPen URL step.
Double click the Show Custom Dialog.
Paste the URL expression into the Message box.
Delete or disable the Open URL step.
Run the script and tell me what shows up in the show custom dialog to confirm that this expression is evalulating correctly.