Jump to content

Can I use a variable to this script?


 Share

Recommended Posts

Hi it is a bit complicated .. I have this

CODE
RunWait(@ComSpec & ' /c wget -P c:\temp --referer=http://www.*****.com http://****.com/myfile.rar', "", @SW_HIDE)

I have used *** for not showing the site I am interested in . Its not important. What I want to do is use a variable to the above script for the adress of the hard disc I

want to save the file i download from the above site. The wget.exe is a program I call from the script to download the file.

So , I need to do

CODE
$directory="c:\temp"

RunWait(@ComSpec & ' /c wget -P $directory --referer=http://www.*****.com http://****.com/myfile.rar', "", @SW_HIDE)

The above of course is not working. Is it possible to do this?

Thanks ,

Edited by sosimple
Link to comment
Share on other sites

  • Moderators

Just curioius... InetGet doesn't work for you?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

no because the site uses a redirection protection, which i solve with wget ....

Try this:
$sDir = @HomeDrive & "\temp"
$sURLIn = "http://www.*****.com"
$sURLRedirect = "http://****.com/myfile.rar"

RunWait(@ComSpec & " /c wget -p " & $sDir & " --referer=" & $sURLIn & " " & $sURLRedirect, "", @SW_HIDE)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thank you all very very much. I tried the script of Dbak and works excellent .

The script of smoke N gives me new ideas, and i am sure does the same more "systematic" . I'll tried it next. Thanks again all i couldnt do this by myself

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...