Jump to content
Sign in to follow this  
rgs80074

need help fixing this script

Recommended Posts

rgs80074

hello everyone,

i want to thank the creator of this script for how long i've been able to use it but it seems as if he's no longer active in the forums (or at least not with the same username). i don't understand the autoit script or really any of scripting, xml, html, etc i'd like to learn but i get confused. i can edit the files if i know what to edit.

anyways this script is used to copy tv episode information from imdb and tv rage into a movie collectorz program. all worked just fine (although the tvrage stopped working a while ago but i rarely used tvrage so i didn't bother looking into it), then the new version of the program i use to catalog the database came out and it had some really great improvements but has rendered the script useless. while in theory it was not needed as the new version supposedly had all the tv episode information but while it has a lot it is still missing a lot of things.

i think its a matter of positioning. i think the script fills in the fields then it told to move to another space and continue and the layout has changed causing problems. i've attached screen caps of the episode input screen from both the new version (version 8) and the prior version (screenshot).

i would be grateful for anyone that could tell me how to resolve this issue that would be great

a real bonus if someone could let me know how to edit the script to include the imdb number thats on the new version, and how to get it to copy the episode images as well would be great (it would be great if the script would save the episode image to my pc at a specific location and then put that location into the url for it, i've tested that i can have a local jpg or image in the url and it works fine, ie i saved a file and put the c:\1.jpg in the url field)

i wish i knew how to script with auto it good enough to fix on my own or create my own but at this point i have no clue how or where to even start. i hope to little by little fix this but i could really use some expert help right now.

thanks in advance

ryan

My link

My link

episodes.au3

Share this post


Link to post
Share on other sites
rgs80074

i assume this is a very complex and advanced script.

50 views but no results on help in fixing it

i wonder if hero88 already updated his script, if he's using the new version of movie collector i am sure he has but nowhere can anyone seem to help on this.

Share this post


Link to post
Share on other sites
PowerCat

That script depends on having that program installed, so not many people can test it.

It's not very complex, it's just long. Mostly string manipulation.

Edited by PowerCat

Share this post


Link to post
Share on other sites
ZacUSNYR

i assume this is a very complex and advanced script.

50 views but no results on help in fixing it

You're not asking someone to "fix" it. You're taking someone elses work and 'expecting' people here to customize it to your usage for a specialty that none of us have a use for.

Find out what it's not doing for yourself and try to fix it/rewrite it. If you run into issues with specific things, post up with your direct question you'll receive help, most likely within 50 views.

Share this post


Link to post
Share on other sites
rgs80074

yes i am asking someone to fix it, so it works with the current version of the program it was written for.

to me it looks extremely complex i have no idea where to begin.

all i know is the current version it won't work with, i think its because the layout of the screen that it used to import the information too has changed, as shown in the links.

at this time this script is way beyond what i can do.

i've spent a lot of time trying to learn autoit over the last couple of days but this script i think is way beyond my ability, especially for now. i've created two scripts of my own right now, one works fine and the other one works but i am trying to get more out of it and asking for help on it cause i don't know where to go on it, perhaps i'll learn it sooner or later but those two scripts are very simple.

i think what this script needs to fix it is to update locations it goes, perhaps someone can (without having the program installed) can direct me what to change and how to figure out what values to put in.

right now in the older version of the program it works fine but the new one it don't.

what the script does is take information you've copied to the clipboard and when you click a specific button (episode entry) in the program it inputs the episode title, then moves and puts in the date, and description of the episode.

Share this post


Link to post
Share on other sites
kaotkbliss

To get it to click where you want, you will need to find and change the MouseClick commands (see help file for parameters)

You also may have to change any winwait, winwaitactive, winactivate type commands to match the title of the program if it has changed as well.

It's a start.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
rgs80074

ok everyone,

to my knowledge no name changes its just the layout of where the stuff is located as you can see from the screen shots i had posted.

below is what i think is the first place that has changes, i see the winmove has two numbers and i am not sure if the click in episode: title actually does anything itself or if its just an explanation of the mouseclick below

which if i read it right is a left mouseclick at x cord. 27 y cord at 31

how do you determine the coordinate as i assume its going form the prior location in the episode default of 560, 365

Func InsertInEpisode()
WinActivate ("Episode:")
WinWaitActive ("Episode:")
WinMove("Episode","",Default,Default,560,365)
;Click in Episode: Title
MouseClick ("left", 27,31)
send("{HOME}")
Send("+{END}")
send($EpisodeTitle,1)
MouseClick ("left", 28,116)
send("{HOME}")
Send("+{END}")
;Set the keydelay
Opt("SendKeyDelay", 0)
send($Plot,1)
Opt("SendKeyDelay", 5)
if $insertdirector = "Yes" then InsertDirector()
if $InsertGueststars = "Yes" then InsertGueststar()
if $InsertWriter = "Yes" then InsertWriter()
if $InsertStory = "Yes" then InsertStory()
if $InsertSongs = "Yes" then InsertSongs()
InsertDate()
MouseClick ("left", 514,92)
EndFunc

Share this post


Link to post
Share on other sites
PowerCat

ok everyone,

to my knowledge no name changes its just the layout of where the stuff is located as you can see from the screen shots i had posted.

below is what i think is the first place that has changes, i see the winmove has two numbers and i am not sure if the click in episode: title actually does anything itself or if its just an explanation of the mouseclick below

which if i read it right is a left mouseclick at x cord. 27 y cord at 31

how do you determine the coordinate as i assume its going form the prior location in the episode default of 560, 365

Hey look at you go, next week you'll be making complex scripts!

When a line starts with a semi colon, it's a comment - you're right.

As for finding the right X and Y value, check the AutoIT start menu entry, you'll find the AutoIt Window Info tool.

Simply drag the Cross to somewhere on the screen to get the X and Y value of that position.

Share this post


Link to post
Share on other sites
rgs80074

i haven't had a chance to test this out yet

but i am assuming at this time i use the controlclick coords re the one si put in or do i put in the position thats listed.

i also have to do a test but i think they changed something else which is goign to require adding new lines of code as well, but time will tell.

thanks for the help

Share this post


Link to post
Share on other sites
Macros

i haven't had a chance to test this out yet

but i am assuming at this time i use the controlclick coords re the one si put in or do i put in the position thats listed.

i also have to do a test but i think they changed something else which is goign to require adding new lines of code as well, but time will tell.

thanks for the help

Ryan,

Not sure if you have done this or not yet, but the first thing you should do is check every mouse click coordinates and use the AU3Info tool to do this. Also, I find it very valuable to use the

Opt("MouseCoordMode", 0)

Prior to any mouse clicks. search for MouseCoordMode. The one i listed sets the 0,0 coordinate to the active window. That way you dont have to worry about whether or not the window is full screen or not. On the flip side, you can actually set the Window of the program to maximize itself after it is running so that your coordinates can be referenced anywhere on the screen. That function is:

WinSetState("[CLASS:Notepad]", "", @SW_MAXIMIZE)

So check out that one as well.

Share this post


Link to post
Share on other sites
rgs80074

hello everyone

i want to thank you all for your help

even though i don't understand most of the script in terms of how it does what it does, i think i know enough i could remove 1/2 of the script for stuff i don't need, i really only copy stuff from imdb and tv rage for my database and it has like 3 other places, but since it don't hurt it i'll leave it

i will make a comment that in order to fix this i had to load up the old version in a virtual pc and see where a lot of its mouse coordinates was becasue where i thought they should be wasn't working.

like for the date, there was three boxes year, month, day. well one cord had to show to the box you wanted it in and the other had to show in the title bar that the episode name went in, weird i know, i would never have guessed that but that's what it took to get it to work

same thing when it finished it kept adding a blank episode line, found that and corrected, again it was using spots that made no sense.

perhaps that's just the way the program was and the author of the original script figured it out or perhaps i think the script was written for a version two or three times ago and they made changes to the program in each version but the script kept working until this last version, either way its working again.

there is one more thing i need help on, i think the script was kinda broken when i first got it but since it worked i assumed thats the way it was.

anyways what happens is when or after it inputs all the data into the program it closes out the window, its done with its job.

however the script fails to terminate and remains open, in order to use it again you have to click on the autoit icon and click exit. i guess its paused.

i thought while looking for help and such someone mentioned or asked why more people didn't have a terminate function or something to close the script

i looked for help on this but didn't see it for anything other than what the script already had.

so is there a way to get the script to close after its finished inputting the stuff? i think that was the original intent, it would make it less annoying than having to manually exit it every time.

here is the last code of it, which i think should do that

Func Terminate()
    Exit 0
EndFunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.