--- In [email protected], "quantiworks" <quanticwo...@...> wrote:
>
> Sheri,
> 
> Is the following correct?
>  
> 1. Function FindMovie(movie)
> 
> This allows PowerPro to call the Function FindMovie as defined by
> your script name.

Yes, and later more functions could be added to the script file. Its not 
necessary for every scriptlet to have its own file.

> 
> 2. local name=replacechars(movie, "\x20", "+")

> 
> This assigns "moviename" or "movie name" to local var "name"
> 

It replaces spaces in the movie name with plus signs (because that's what the 
url needs) and stores the result in local var "name"

> 3. local cmd="http://www.classiccinemazone.com/index.php?";
> 
> This assigns site url to local var "cmd"
> 
> 4. cmd++="page=torrents&search="
> 
> This assigns "page=torrents&search=" to "cmd" var which results in 
> "http://www.classiccinemazone.com/index.php?page=torrents&search=";

appends it to cmd...

> 
> 5. cmd++=name++"&category=0&active=0"
> 
> This assigns the result of var "name" and joins to 4 result,
> "http://www.classiccinemazone.com/index.php?page=torrents&search=<searchmoviename>&category=0&active=0"

more appending

>  
> 6. do(cmd)
> quit
> 
> This executes the search of the resulting process above and quits the script.

> 7. .moviescri...@findmovie(clip.get)
> 
> This will make PowerPro search for the function findmovie and
> call it with the copied text.

As best I understand it:

First Powerpro will search for moviescripts.powerpro or moviescripts.txt. It 
has its script folder and the content of the scriptpath (if previously set with 
*Script path) to guide it.

Then it caches function locations in the file. This info will be reused if the 
same script is used again before the cache time expires or file is modified. 
Then it creates the local variable "movie" with the passed text (because the 
function declaration says so) and executes the function with the addition of 
that variable.

There is also an older label construct that can be used instead of functions, 
e.g., the script file would have:

@FindMovie
args movie

but I'm not sure labels enjoy similar caching benefits.

The hotkey could include multiple commands, so it also could also do the ctrl+c 
for copying, e.g.,

Main command: 
win.resetfocus()

More commands:
Win.keys("^c")
wait.for(50)
.moviescri...@findmovie(clip.get)

Regards,
Sheri

Reply via email to