Skolle Posted May 20, 2008 Posted May 20, 2008 Hi, I have written a small script to copy links from a website and enter them in a downloader-program. Prior to activate the script i have already marked the first link. ------------------------------------------------------------------------------- ;~ While 1 ;~ $count += 1 ; increment $count by 1 (dont know what to do here) If Not WinActive ("Mozilla") Then WinActivate("Mozilla") Send("{APPSKEY}") Send("{DOWN 6}") ; copy link Send("{ENTER}") ;~ Send("!k") If Not WinActive ("Downloader") Then WinActivate("Downloader") Send("^v") If Not WinActive ("Mozilla") Then WinActivate("Mozilla") Send("{TAB}") ;~ If $count = XXX Then ExitLoop ; Quit when you have done it xxx times ;~ WEnd ------------------------------------------------------------------------------- Now I want to do it as many times as there are links. I want a message box which askes how many links there are and I enter the number. Can anybody show me, how 1) the input box works and 2) how this is implemented into the count number. I hope that it is called an input box, since I coudn't find anything in "search". Thanks in advance. Skolle
herewasplato Posted May 20, 2008 Posted May 20, 2008 Welcome to the forum. try this; Info entered into an input box is a string $answer = InputBox("AutoIt", "Enter the number of links.") ; converts string to a number $answer = Number($answer) For $i = 1 To $answer If Not WinActive("Mozilla") Then WinActivate("Mozilla") Send("{APPSKEY}") Send("{DOWN 6}") ; copy link Send("{ENTER}") ;~ Send("!k") If Not WinActive("Downloader") Then WinActivate("Downloader") Send("^v") If Not WinActive("Mozilla") Then WinActivate("Mozilla") Send("{TAB}") Next [size="1"][font="Arial"].[u].[/u][/font][/size]
herewasplato Posted May 22, 2008 Posted May 22, 2008 It works,..."Of course it does," he says arrogantly. Just kidding.I was not sure that it would work since I could not test the code before posting it....thanks a lot!! You are welcome. [size="1"][font="Arial"].[u].[/u][/font][/size]
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