 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Benny-D
Joined: 29 Feb 2008 Posts: 137
|
Posted: Sat Jul 12, 2008 10:27 am Post subject: |
|
|
| tank wrote: | | ...there are some more advanced options available but it seems at your level it might be best to start this way |
WOW!!! This is news to me. I never knew about the existence of this way.
I'll be sure to try it out. Thank you. |
|
| Back to top |
|
 |
Benny-D
Joined: 29 Feb 2008 Posts: 137
|
Posted: Sat Jul 12, 2008 10:28 am Post subject: |
|
|
I would like now to thank those who gave me very good ideas
and valuable advice. Special thanks go to n-l-i-d, Mustang,
engunneer, HugoV, tank, and Slanter. At the moment I have
no lack in suggested ways of how I could solve my problem. I
will take some time to try all of them.
Thanks again! |
|
| Back to top |
|
 |
Benny-D
Joined: 29 Feb 2008 Posts: 137
|
Posted: Sat Jul 12, 2008 10:04 pm Post subject: |
|
|
I am sorry for being annoying, but I still have some problems here, which I couldn't
solve by myself.
| HugoV wrote: | | Unzip that file and you will have a curl-7.18.2 FOLDER, open that folder and you will see curl.exe there. |
How does your curl.exe icon look like in that downloaded and unzipped curl-7.18.2
folder? I suspect something is wrong with the way I downloaded it. Mine looks like
this:
Is this the way it should normally look like? I tried to change its name from curl into
curl.exe - icon still remains the same. Is it the way it should be?
What happens when you click on this icon? If I click on it, I can see some DOS window
appear for some fractions of a second and then disappear again. Is it normal?
| HugoV wrote: | | In the curl MANUAL, you will see on the first page a section DOWNLOAD TO A FILE which will get you started. The curl documentation is quite good, so read it a few times. |
I've read all of it. In the MANUAL a lot of command lines are presented and their
functions are shortly described. If I wanted to run some of those commands
without the help of AHK, where would I have to paste them? Would it be that very
DOS window that I saw appear and vanish right after I clicked on curl.exe file?
| HugoV wrote: | | If you want to use curl.exe place it in the same directory as your script and use the AHK run command and correct CURL command line parameters |
I did it, but I think my script was wrong:
| Code: | Run, curl.exe
Send curl -o thatpage.html http://www.netscape.com/ |
Everytime when I run it, I get this message: ''Failed attempt to launch program
or document.'' I don't know how to communicate parameters to AHK.
| HugoV wrote: | | Also you might need to check your firewall and allow curl internet access. |
How do I do that? |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Sat Jul 12, 2008 11:29 pm Post subject: |
|
|
not sure on the icon.
most dos or command line interface (CLI) programs are not used by doubleclicking. Not sure if you have ever used a dos command prompt, but here is a bit of a walkthrough.
go to Start -> Run
type cmd and hit enter - this will open a command window
you will most likely be in your My Documents folder at this point. you need to use the cd command to get to your folder that contains curl.exe
Side note: By default in Windows XP and Vista, the explorer window that you use to browse your computer will hide the extension of known file types, including exe files. In XP, this is changed by going to tools, folder options, advanced, and unchecking "Hide extensions for known file types". once this is unchecked, you may find out that you have actually renamed curl.exe to curl.exe.exe, which you will want to change back to just curl.exe. End Side Note
Assuming you are in a command window in the dame folder as curl, you can try those commands from the documentation | Code: | | curl -o thatpage.html http://www.netscape.com/ |
if you were to write an ahk script in the same folder as curl.exe, you could run something like
| Code: |
Run, %comspec% /c curl -o thatpage.html http://www.netscape.com/
|
%comspec% means "in a command window"
/c means "close the command window when done" (contrast with /k, which keeps the command window)
the rest of the command is based on curl's documentation.
for testing (so you can see any error messages from curl) use /k instead of /c.
You may also want to use RunWait instead of Run, so that the script will not continue until curl is finished with that task.
HTH _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
Benny-D
Joined: 29 Feb 2008 Posts: 137
|
Posted: Sun Jul 13, 2008 2:38 pm Post subject: |
|
|
Thank you SOOO MUCH!!!
Finally, I can see cURL work!!! I did it by running an AHK file
(in the same folder where curl.exe is) containing that script that
you gave me ( Run, %comspec% /c curl -o thatpage.html http://www.netscape.com/ )
Thank you very much. Now I know how to run curl, so I think
I'll be able to explore it on my own.
There is only one thing in your post that I kind of didn't get.
You wrote:
| engunneer wrote: | go to Start -> Run
type cmd and hit enter - this will open a command window
you will most likely be in your My Documents folder at this point. you need to use the cd command to get to your folder that contains curl.exe |
When I hit "enter", the command window opens, and the last line in it goes
as follows:
C:\Documents and Settings\Administrator>_
The underline in the end of this line is flashing. I don't understand how
at this point I can "use the cd command to get to my folder that contains
curl.exe". If I type "cd" and press "enter", the only thing that happens is
the last line reproduces itself twice, so I see three identical lines in the
command window.
Thank you also for the side note and other additional explanation in your
post. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 1033
|
Posted: Sun Jul 13, 2008 2:46 pm Post subject: |
|
|
| Code: | | C:\Documents and Settings\Administrator>_ | is the current directory
the flashing underline is the curser
cd is change directory when you didnt give it a directory to change to it just returned to the current directory
forinstance will take you to
| Code: | | C:\Documents and Settings>_ | below will open notepad
you can search the msdn cor command prompt commands to get many more _________________ Read this
Com
Automate IE7 with Tabs |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Sun Jul 13, 2008 8:58 pm Post subject: |
|
|
the command line is sort of the background of everything. for example, right click on any shortcut on your desktop (that opens a program), and choose properties. The Target line is the command you would type in a command line to start that program. It is also the first parameter of an ahk run command. The "Start In" line is the second parameter for the run command in AHK, or the folder you need to be in to run the program. If you want to run the program manually from the command prompt, you can do
| Code: |
cd (whatever it says in Start In) {Enter}
(whatever it says in target) {enter}
|
another handy shortcut to know is the command for programs you use alot.
Go to Start -> Run (or hit Windows-r) and type any of these:
| Code: |
winword
excel
powerpnt
iexplore
iexplore google.com
firefox (if you have it)
|
it's just a matter of learning the name of the program you want. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Sun Jul 13, 2008 9:00 pm Post subject: |
|
|
Computers 101 ..  _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Sun Jul 13, 2008 9:04 pm Post subject: |
|
|
not anymore. I'm amazed by all the people that don't know how everything works in the background. Then again, We only had a CLI when I learned, and they made it a bit more obvious that windows was just a fancy way of running CLI programs. And on the same hand, I am an engineer and must know how it works because that's the way I am.
Basically once you want to do anything powerful on a computer you must go back down to the lower levels and use them that way. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|