Ecca123 Posted January 29, 2006 Posted January 29, 2006 Today I was really bored and for some random reason I downloaded Autoitv3.I wanted to learn something new, I am not experienced with this program at all.If you are not familiar with "The Grabber - Rapidshare downloading tool" then you may not understand this too well.You can get the grabber hereAnyway the point of my script is to get working downloads with the grabber with minimal user interaction. I plan to give this to a couple friends so they can use it when it is complete.I am kind of stuck where this script ends expandcollapse popuprun("C:\Documents and Settings\Dr. AnaDONda\Desktop\Grabber and Rapidup\grabber.exe") ;opens grabber.exe WinWaitActive( "The Grabber 1.4 - SHiNE", "Auto rotate") ;waits till it is active WinMove ( "The Grabber 1.4 - SHiNE", "Auto rotate", 444, 307) ;moves active window MouseClick("left",513,398,1) ;Clicks the link box $var = IniRead("C:\Documents and Settings\Dr. AnaDONda\Desktop\settings.ini", "files", "1", "not found") ;Searches the ini file for the #1 file Send($var) ;Sends the link into the link box MouseClick("left",529,523,1) ;clicks the grab button $1 = WinWaitActive("The Grabber 1.4 - SHiNE", "Wait for download-ticket",15) ;waits for the "Wait for download ticket text to pop up $y1 = 1 ;if waitwinactive doesn't time out then it will return 1 $n1 = 0 ;if waitwinactive doesn't find the selected text after 15 seconds it will return 0 if $1 = $y1 Then WinWaitActive("The Grabber 1.4 - SHiNE", "Ticket reserved. Press Download button !") ;waits till the download is available MouseClickDrag("left",922,467,515,467) ;highlights the proxy used last for future use send("^c") ;copies the highlighted proxy MouseClick("left",533,484) ;clears the proxy box MsgBox(48, "Working Proxy", "The proxy works. Enter in the 3 digit code and press the download button. The bot will resume its tasks after the file has completed.") ;Message to user that a working proxy has been found WinWaitActive("The Grabber 1.4 - SHiNE", "Download complete") ;waits till the users download is complete MouseClick("left",521,467) ;Clicks the proxy box send("^v") ;Pastes the last proxy used for downloading MouseClick("left",513,398,1) ;Clicks the link box $2 = IniRead("C:\Documents and Settings\Dr. AnaDONda\Desktop\settings.ini", "files", "2", "not found") ;defines variable 2 Send($2) ;sends the link into the box MouseClick("left",529,523,1) ;clicks the grab button ;here is where I get problems, I cannot continueif I try to continue I get a buch of errors "missing endif"I don't know how to continue on under the "if $1 = $y1 then" I need to stay under there because if I don't then "if $1 = $n1 then" it will fuck everything up, when a proxy doesnt work it will load the 2nd file. I am really confused, I hope someone can shed some light on the situation.here is the ini file;Please fill in everything ; [Files] 1=http://rapidshare.de/files/11010835/krep.part4.rar 2=http://rapidshare.de/files/11011249/krep.part5.rar 3= 4= 5= 6= 7= 8= 9= 10=
greenmachine Posted January 29, 2006 Posted January 29, 2006 Well I see an if statement with no endif to end it. if $1 = $y1 Then [......] I'm not sure how many lines are supposed to be under the if statement, but since it looks like it's more than 1 line, you need to close it with endif. Example: $i = 1 If $i = 1 Then MsgBox (0, "i is 1", "the variable i is equal to 1") EndIf
ChrisL Posted January 29, 2006 Posted January 29, 2006 (edited) As said before there is no endif to your if.. I sugest you indent your code when you do anything like a loop or an if statement then you can see easier that you have ended it, If you use the SciTe editor available from downloads you can run the tidy program to sort out your indents. See below.. expandcollapse popupRun("C:\Documents and Settings\Dr. AnaDONda\Desktop\Grabber and Rapidup\grabber.exe") ;opens grabber.exe WinWaitActive( "The Grabber 1.4 - SHiNE", "Auto rotate") ;waits till it is active WinMove("The Grabber 1.4 - SHiNE", "Auto rotate", 444, 307) ;moves active window MouseClick("left", 513, 398, 1) ;Clicks the link box $var = IniRead("C:\Documents and Settings\Dr. AnaDONda\Desktop\settings.ini", "files", "1", "not found") ;Searches the ini file for the #1 file Send($var) ;Sends the link into the link box MouseClick("left", 529, 523, 1) ;clicks the grab button $1 = WinWaitActive("The Grabber 1.4 - SHiNE", "Wait for download-ticket", 15) ;waits for the "Wait for download ticket text to pop up $y1 = 1 ;if waitwinactive doesn't time out then it will return 1 $n1 = 0 ;if waitwinactive doesn't find the selected text after 15 seconds it will return 0 If $1 = $y1 Then WinWaitActive("The Grabber 1.4 - SHiNE", "Ticket reserved. Press Download button !") ;waits till the download is available MouseClickDrag("left", 922, 467, 515, 467) ;highlights the proxy used last for future use Send("^c") ;copies the highlighted proxy MouseClick("left", 533, 484) ;clears the proxy box MsgBox(48, "Working Proxy", "The proxy works. Enter in the 3 digit code and press the download button. The bot will resume its tasks after the file has completed.") ;Message to user that a working proxy has been found WinWaitActive("The Grabber 1.4 - SHiNE", "Download complete") ;waits till the users download is complete MouseClick("left", 521, 467) ;Clicks the proxy box Send("^v") ;Pastes the last proxy used for downloading MouseClick("left", 513, 398, 1) ;Clicks the link box $2 = IniRead("C:\Documents and Settings\Dr. AnaDONda\Desktop\settings.ini", "files", "2", "not found") ;defines variable 2 Send($2) ;sends the link into the box MouseClick("left", 529, 523, 1) ;clicks the grab button ;here is where I get problems, I cannot continue EndIF Edited January 29, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Ecca123 Posted January 29, 2006 Author Posted January 29, 2006 Thank you for the posts I will be sure to follow up if I get it to work.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now