Hello,
i want launch internet explorer with for exemple : " https://www.01net.com/telecharger/ "
and add in form search " searchstring " the value " %string_Name% " and launch this search with " Enter " ?
and finish, get response page to one file.
For example :
https://www.google.com/search?q=test
ok it works but I want to do it with another site. If this solution is possible, I will use the function AHK "UrlDownloadToFile" or "Download"
For this i think use :
AHK V1 : UrlDownloadToFile
AHK V2 : Download
and
WinHttp with POST ?
I do not know how to do ! Can you help me get on the right path?
[Mod edit: Topic moved to 'Ask for Help']
WinHttp method POST
- ScottMeyer
- Posts: 33
- Joined: 27 Sep 2017, 12:52
- Contact:
-
- Posts: 264
- Joined: 09 Mar 2019, 01:52
- Location: Germany
- Contact:
Re: WinHttp method POST
The problem is, that every site has different options for the search string. Google uses "q=". Your example uses "searchstring=". I don't think, that there will be a universal solution.
Code: Select all
InputBox, var, Search String, Input
UrlDownloadToFile, https://www.01net.com/recherche/recherche.php?searchstring=%var%, c:\temp\url.html
- ScottMeyer
- Posts: 33
- Joined: 27 Sep 2017, 12:52
- Contact:
Re: WinHttp method POST
Hi
Great ! Thank you for your answer
it's OK for my i have a good argument with my URL.
Now i have another problem, UrlDownloadToFile don't work
example
Because under IE windows already open I am authenticated and UrlDownloadToFile opens a new IE window and there I have an authentication error
An idea ?
Great ! Thank you for your answer
it's OK for my i have a good argument with my URL.
Now i have another problem, UrlDownloadToFile don't work
example
Code: Select all
url UrlDownloadToFile, %URL_Link%, c:\temp\url.html
An idea ?
JEE (jeeswg) "Better WinGetPos" : LIEN Forum AHK
AHK Vision Go : LIEN Forum AHK
Simply Backup Script : LIEN Forum AHK
AHK Vision Go : LIEN Forum AHK
Simply Backup Script : LIEN Forum AHK
-
- Posts: 264
- Joined: 09 Mar 2019, 01:52
- Location: Germany
- Contact:
Re: WinHttp method POST
I think, that URLDownloadToFile creates a separate process, therefore the authentication of IE doesn't work. I didn't find anything how to authenticate for that. Probably there is no solution for that.
I would go the next step. In the documentation of the URLDownloadToFile (https://www.autohotkey.com/docs/commands/URLDownloadToFile.htm) there is an example (the second one) with com. I would try it that way.
I would go the next step. In the documentation of the URLDownloadToFile (https://www.autohotkey.com/docs/commands/URLDownloadToFile.htm) there is an example (the second one) with com. I would try it that way.
- ScottMeyer
- Posts: 33
- Joined: 27 Sep 2017, 12:52
- Contact:
Re: WinHttp method POST
hello, you're right that's what I tried to do ...
do not use --> whr: = ComObjCreate (" WinHttp.WinHttpRequest.5.1 ")
I tried without success --> whr: = ComObjActive (" InternetExplorer.Application ") ( uses IE which is open , i think )
I do not have the right synthax, can you help me?
do not use --> whr: = ComObjCreate (" WinHttp.WinHttpRequest.5.1 ")
I tried without success --> whr: = ComObjActive (" InternetExplorer.Application ") ( uses IE which is open , i think )
I do not have the right synthax, can you help me?
JEE (jeeswg) "Better WinGetPos" : LIEN Forum AHK
AHK Vision Go : LIEN Forum AHK
Simply Backup Script : LIEN Forum AHK
AHK Vision Go : LIEN Forum AHK
Simply Backup Script : LIEN Forum AHK
- ScottMeyer
- Posts: 33
- Joined: 27 Sep 2017, 12:52
- Contact:
Re: WinHttp method POST
I turn around the problem.
create a new window, works but authentication problem.
But the simple command "run" allows to launch the link in an existing IE window and it works! nice.
Now all I have to do is get the source code from the internet explorer window.
Is it possible to use:
can we use WinGetText with Internet Explorer?
create a new window, works but authentication problem.
Code: Select all
whr: = ComObjCreate ("WinHttp.WinHttpRequest.5.1")
But the simple command "run" allows to launch the link in an existing IE window and it works! nice.
Code: Select all
Run, C:\Program Files\Internet Explorer\iexplore.exe www.01net.com, , , IE_PID
Is it possible to use:
Code: Select all
UrlDownloadToFile, ahk_pid %IE_PID%, IE_Data.html
JEE (jeeswg) "Better WinGetPos" : LIEN Forum AHK
AHK Vision Go : LIEN Forum AHK
Simply Backup Script : LIEN Forum AHK
AHK Vision Go : LIEN Forum AHK
Simply Backup Script : LIEN Forum AHK
Who is online
Users browsing this forum: Bing [Bot], Marium0505, mcl, Spikea and 345 guests