GeoTrail Posted January 10, 2004 Posted January 10, 2004 Hi guys.First off, I have used AutoIt 2, the "old" one for some time to do simple automating tasks. And when I need something more powerfull I use Visual Dialogscript.And now I see there is a new version on the way. AutoIt 3.I haven't worked much with it yet, just made a simple downloader for a project I was working on and it was only three lines of codes. So beautiful.Anyways, I first started with, and eventually bought Visual Dialogscript ($99) because it was so easy to use and I could write very handy programs in a very short time.Oops, got alittle off topic here. Anyways, just wanted to say to who ever writes AutoIt 2 and 3, you f*cking rule man.It's simply amazing.Offcourse there is alot of advanced stuff there I haven't gotten yet, but I'll learn. The old version was alot easier *lol*Anyways, back to my problem.The downloader I mention looks pretty much like this:AutoItSetOption ("TrayIconHide",1) URLDownloadToFile("http://www16.dnb.no/valuta/kursliste.csv", "kursliste.csv")What I need to do to make this exactly the way I want is to be able to pass some information from my program, like user information, download URL and destination URL back to the autoit program.Also, the TrayIconHide doesn't seem to work at all.I can see the icon in my tray when I run the program.So for this long post on such a simple question.Anyways, again, thanks for such an amazing program GeoTrail Corporation
scriptkitty Posted January 10, 2004 Posted January 10, 2004 (edited) The Icon stays up for only .7 seconds or so. (anti hacker code) The developers were thinking of not putting it in at all. For techie types, you can remove it completely, but you will need to compile it yourself. As far as user info and such, you can do some of that via http. example: AutoItSetOption ("TrayIconHide",1) URLDownloadToFile("http://username:Password@www16.dnb.no/valuta/kursliste.csv", "kursliste.csv") If they use .htaccess files, this is one format that works. I have a few PHP pages I have custom downloads, so I use one more like: URLDownloadToFile("http://www16.dnb.no/valuta/kursliste.php?myfile=scriptkitty", "kursliste.csv") PhP would pass the proper page and access to me. You can ask the user of your AutoIt file for info with the inputbox ex: $answer = InputBox("Question", "Where were you born?", "", "", -1, -1, 0, 0) msgbox(1,"Your answer was",$answer) If you want to ask say what page to download, it might look like this: $answer = InputBox("Question", "What ulr page to download?", "", "", -1, -1, 0, 0) $destination = FileSaveDialog( "Choose destination.", "c:\", "My Files (*.htm)", 1 + 4 ) URLDownloadToFile($answer, $destination) if @error=0 then msgbox(1,"Error downloading",$answer) else msgbox(1,"Your file was saved as",$destination) endif Or something like that. Edited January 10, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers.
scriptkitty Posted January 10, 2004 Posted January 10, 2004 (edited) oh, after re reading your post, maybe you meant you would like to pass commandline options to AutoIt, such as user info and such. You can do this via running AutoIt scripts with commandlines. $CmdLine[0]is number of parameters $CmdLine[1] is param 1 (after the script name) $CmdLine[2] is param 2 etcrun say "myscript.au3 username destination" if $CmdLine[0]=2 then msgbox(1,"You passed ",$CmdLine[1] & @CRLF & $CmdLine[2]) just one example Edited January 10, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers.
GeoTrail Posted January 10, 2004 Author Posted January 10, 2004 Thank you so much. The commandline was what I was after. Sorry if I didn't express myself clearly enough Again, thanks again. BTW, doesn't the email notification work when a post has been replied too? GeoTrail Corporation
scriptkitty Posted January 10, 2004 Posted January 10, 2004 I don't know, mine is off. I may turn it on to check. AutoIt3, the MACGYVER Pocket Knife for computers.
GeoTrail Posted January 10, 2004 Author Posted January 10, 2004 The notification seems to work now. Must be MSN that dumped the mail. Better go check the Junk folder Thanks GeoTrail Corporation
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