Dhilip89

NetFlare Web Server (Version 0.3)

19 posts in this topic

Updated to version 0.2


[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites

Great work. How do you retrieve GET and POST data into the autoit-code?

Share this post


Link to post
Share on other sites

Very nice. Just had a quick browse over the code and it was very interesting to read. At first I thought I was stumped at how it worked as the code is spread out, but eventually I found the parsing function.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Great work. How do you retrieve GET and POST data into the autoit-code?

 

Thanks, starting from version 0.3 both GET and POST data is supported.


[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites

Very nice. Just had a quick browse over the code and it was very interesting to read. At first I thought I was stumped at how it worked as the code is spread out, but eventually I found the parsing function.

 

Thank you, it was my random idea then I made this to practice my rusted AutoIt coding skill  :oops:


[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Check out version 0.3

Added stress test animation (in GIF)

Edited by Dhilip89

[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Share this post


Link to post
Share on other sites

Hi. Thank you very much for such a great UDF. For me it is magic :)

I wonder If I set the port to say

HttpServer_SetPort(8080)

Then I have to access to my local website from http://127.0.0.1:8080 address. The same would happen with external ips http.xx.xx.xx.xx:8080

How should I configure the port so that I could have a direct access to http://127.0.0.1?

Great thanx in advance!

Share this post


Link to post
Share on other sites

 

How should I configure the port so that I could have a direct access to http://127.0.0.1?

Great thanx in advance!

Are you asking if you could connect to 127.0.0.1 from the internet? If you are, the answer is, you can't it is impossible. 127.0.0.1 is a local loopback address only.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

BrewManNH

 I know that 127.0.0.1 is a localhost. The thing is- when I am trying to open the website localy - shows only blank page. If I set the port to 8080 then I get the access only if I navigate it this way: 127.0.0.1:8080 - then the web page opens normally. The same happens when I navigate it somewhere from internet. Say I would have an Ip something like 123.123.123.123 Then when I navigate it directly 123.123.123.123- nothing happens. But when I navigate it 123.123.123.123:8080 The website opens ok from Internet.

 

Share this post


Link to post
Share on other sites

80 is the default HTTP port, so I would guess you'd set it to that instead of 8080.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

 I know that 127.0.0.1 is a localhost. ... when I navigate it 123.123.123.123:8080 The website opens ok from Internet.

instead of 127.0.0.1, use 0.0.0.0 in your code, see if that helps.

Share this post


Link to post
Share on other sites

Dear coders

I  really like this UDF, because it is opening really huge possibilities: We are not dependant on php and other "officialy" accepted scripts and languages for web.

Important thing, what about security? I mean, is it secure for injections and other things, which hackers use against websites?

Great thanx in advance

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Dear coders

I  really like this UDF, because it is opening really huge possibilities: We are not dependant on php and other "officialy" accepted scripts and languages for web.

Important thing, what about security? I mean, is it secure for injections and other things, which hackers use against websites?

Great thanx in advance

I hope the IP change I suggested worked for your setup

As far as hackers ... I don't know how to say it. This script will not give you SSL, so, all you have is plain text , anyone logging packets can see the conversation between server and client. As far as SQL injections, that has to do with SQL

I run a web server written in autoit that I use as a log dumper of sorts. My programs send an encrypted string and I process that. If I was to write it now, I'd use an Apache server and PHP.

Play around, hack yourself your script and have fun learning everything you can about anything that can be done in that arena. I know of no other way.

exploits_of_a_mom.png

 

Edited by argumentum
added the pic.

Share this post


Link to post
Share on other sites

Argumentum, thank you very much for your comment. The picture is quite descriptive :)

@IP 0.0.0.0 didnt work for me at least on my pc, but I am going to test in other pc to see the final result

@hacking etc. I would like to clearfy my question: Is the server secure for calculations which autoit is doing on the server? For example from the client side I send some post request  to server. The server receives it and then it makes some calculations on the side of autoit $a+$b=$c and many other autoit functions and then it sends to client ok, $c=2345. The question is: Can client interfere into those calculations which autoit is doing on the server. For example by navigating to website using some code like "www.website.com: msgbox (0, "", "hacked")" (I am using a pseudocode of course, but I think you get the idea)?

Great thanx in advance!

Share this post


Link to post
Share on other sites

Argumentum, thank you very much for your comment. The picture is quite descriptive :)

@IP 0.0.0.0 didnt work for me at least on my pc, but I am going to test in other pc to see the final result

@hacking etc. I would like to clearfy my question: Is the server secure for calculations which autoit is doing on the server? For example from the client side I send some post request  to server. The server receives it and then it makes some calculations on the side of autoit $a+$b=$c and many other autoit functions and then it sends to client ok, $c=2345. The question is: Can client interfere into those calculations which autoit is doing on the server. For example by navigating to website using some code like "www.website.com: msgbox (0, "", "hacked")" (I am using a pseudocode of course, but I think you get the idea)?

Great thanx in advance!

the answer to A+B=C question is no. No one can run stuff on your PC that you don't code for, ..then again if you use something like $c = execute($a+$b) then you are coding with the possibility of malicious code run, now if you do like $c = Int($a) + Int($b) is known that can not bring harm. So getting hacked is relative to how you code and nothing more.

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

...From a quick glance to the source, it seems that the autoit code embedded in the web page is executed on the server one line at a time. See the Aup_Execute() function within the Lib\WebAupProcessor.au3 script. Don't know if this is a good way to embed code within the source web page . Maybe it would be better to be able to execute entire snippets instead of single lines at a time. Executing only single lines of code will limit your programming possibilities.
You will be bound not to use constructs like "for ... next" for example, and other similar restrictions.
Have also a look to this other embrional example on how to embed AutoIt code in web pages and execute it on the server using this other Web Server

Edited by Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

Thanx Argumentum!

Thanx Chimp!

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

tell you what. Try some this. a php file 

<?php
    foreach($_SERVER as $key => $value) {
    //putenv('php_SERVER__'.$key.'='. bin2hex($value) );
        if(strpos($key, 'HTTP') === 0) {
            putenv('php_SERVER__'.$key.'='. bin2hex($value) ); // or just these
        }
    }
    foreach($_POST as $key => $value) {
        putenv('php_POST__'.$key.'='. bin2hex($value) );
    }
    foreach($_GET as $key => $value) {
        putenv('php_GET__'.$key.'='. bin2hex($value) );
    }
    foreach($_COOKIE as $key => $value) {
        putenv('php_COOKIE__'.$key.'='. bin2hex($value) );
    }
    $time_start = microtime(true);
    passthru('C:\xampp\cgi-bin\test1.exe');
    $time_end = microtime(true);
    print "<b>PHP Execution Time:</b> ". number_format(($time_end - $time_start) * 1000) ." mSec.<br>\r\n" ;
?>

and a CUI compiled AutoIt, like:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <WinAPI.au3>
#include <WinAPIMisc.au3>

Local $t = TimerInit()

ConsoleWrite("<b>AutoIt Macros:</b><br>" & @CRLF)
fShowAvailableMacros()

ConsoleWrite("<br><b>Environment Strings:</b><br>" & @CRLF)
_WinApi_GetEnvironmentStringsA()

ConsoleWrite('<br>AutoIt Execution Time: ' & Round(TimerDiff($t)) & ' mSec.<br>' & @CRLF)

Func fShowAvailableMacros()
    Local $aMacros[111 - 6] = [110 - 6, _
            "@AppDataCommonDir", _
            "@AppDataDir", _
            "@AutoItExe", _
            "@AutoItPID", _
            "@AutoItVersion", _
            "@AutoItX64", _
            "@COM_EventObj", _
            "@CommonFilesDir", _
            "@Compiled", _
            "@ComputerName", _
            "@ComSpec", _
            "@CPUArch", _
            "@DesktopCommonDir", _
            "@DesktopDepth", _
            "@DesktopDir", _
            "@DesktopHeight", _
            "@DesktopRefresh", _
            "@DesktopWidth", _
            "@DocumentsCommonDir", _
            "@error", _
            "@exitCode", _
            "@exitMethod", _
            "@extended", _
            "@FavoritesCommonDir", _
            "@FavoritesDir", _
            "@GUI_CtrlHandle", _
            "@GUI_CtrlId", _
            "@GUI_DragFile", _
            "@GUI_DragId", _
            "@GUI_DropId", _
            "@GUI_WinHandle", _
            "@HomeDrive", _
            "@HomePath", _
            "@HomeDrive.", _
            "@HomeShare", _
            "@HotKeyPressed", _
            "@HOUR", _
            "@IPAddress1", _
            "@IPAddress2", _
            "@IPAddress3", _
            "@IPAddress4", _
            "@KBLayout", _
            "@LocalAppDataDir", _
            "@LogonDNSDomain", _
            "@LogonDomain", _
            "@LogonServer", _
            "@MDAY", _
            "@MIN", _
            "@MON", _
            "@MSEC", _
            "@MUILang", _
            "@MyDocumentsDir", _
            "@NumParams", _
            "@OSArch", _
            "@OSBuild", _
            "@OSLang", _
            "@OSServicePack", _
            "@OSType", _
            "@OSVersion", _
            "@ProgramFilesDir", _
            "@ProgramsCommonDir", _
            "@ProgramsDir", _
            "@ScriptDir", _
            "@ScriptFullPath", _
            "@ScriptDir", _
            "@ScriptName", _
            "@ScriptLineNumber", _
            "@ScriptName", _
            "@SEC", _
            "@StartMenuCommonDir", _
            "@StartMenuDir", _
            "@StartupCommonDir", _
            "@StartupDir", _
            "@SW_DISABLE", _
            "@SW_ENABLE", _
            "@SW_HIDE", _
            "@SW_LOCK", _
            "@SW_MAXIMIZE", _
            "@SW_MINIMIZE", _
            "@SW_RESTORE", _
            "@SW_SHOW", _
            "@SW_SHOWDEFAULT", _
            "@SW_SHOWMAXIMIZED", _
            "@SW_SHOWMINIMIZED", _
            "@SW_SHOWMINNOACTIVE", _
            "@SW_SHOWMINIMIZED,", _
            "@SW_SHOWNA", _
            "@SW_SHOW,", _
            "@SW_SHOWNOACTIVATE", _
            "@SW_SHOWNORMAL,", _
            "@SW_SHOWNORMAL", _
            "@SW_UNLOCK", _
            "@SystemDir", _
            "@TempDir", _
            "@TRAY_ID", _
            "@TrayIconFlashing", _
            "@TrayIconVisible", _
            "@UserName", _
            "@UserProfileDir", _
            "@WDAY", _
            "@WindowsDir", _
            "@WorkingDir", _
            "@YDAY", _
            "@YEAR"]

    For $n = 1 To 5 ; $aMacros[0]
        ConsoleWrite($aMacros[$n] & '&nbsp;=&nbsp;&gt;' & Execute($aMacros[$n]) & '&lt;<BR>' & @CRLF)
    Next
    ConsoleWrite('.. etc.<BR>' & @CRLF)
EndFunc   ;==>fShowAvailableMacros

Func _WinApi_GetEnvironmentStringsA() ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms683187(v=vs.85).aspx
    ; https://www.autoitscript.com/forum/topic/178400-windows-environment-variables-viewer/
    Local $pEnvBlock, $iPtrStringLen, $tEnvString, $aSplit, $aRet, $sEnvString, $aEnvString[0][2]
    $aRet = DllCall('kernel32.dll', 'ptr', 'GetEnvironmentStringsA') ; GetEnvironmentStringsA returns OEM characters.
    If @error Then Return SetError(@error, @extended, '')
    $pEnvBlock = $aRet[0] ; pointer to a block of memory that contains the environment variables.
    If Not IsPtr($pEnvBlock) Then Return SetError(-1, 0, '')
    While 1
        $iPtrStringLen = _WinAPI_StringLenA($pEnvBlock)
        If $iPtrStringLen > 0 Then
            $tEnvString = DllStructCreate('char[' & $iPtrStringLen + 1 & ']', $pEnvBlock)
            $sEnvString = _WinAPI_OemToChar(DllStructGetData($tEnvString, 1)) ; Convert Oem to Ansi.
            If StringLeft($sEnvString, 1) <> '=' Then
                $aSplit = StringSplit($sEnvString, '=', 1 + 2)
                If Not @error Then
                    ReDim $aEnvString[UBound($aEnvString) + 1][2]
                    $aEnvString[UBound($aEnvString) - 1][0] = $aSplit[0] ; name
                    $aEnvString[UBound($aEnvString) - 1][1] = $aSplit[1] ; value
                    If StringInStr( $aSplit[0] , "php_") == 1 Then
                        ConsoleWrite($aSplit[0] & '&nbsp;=&nbsp;&gt;' & BinaryToString('0x'&$aSplit[1]) & '&lt;<BR>' & @CRLF) ; <----- added just to show the PHP thing
                    Else
                        ;ConsoleWrite($aSplit[0] & ' = ' & $aSplit[1] & '<BR>' & @CRLF) ; <----- added just to show the PHP thing
                    EndIf
                EndIf
            EndIf
            $pEnvBlock += $iPtrStringLen + 1
        Else
            _WinApi_FreeEnvironmentStringsA($pEnvBlock) ; Free memory block.
            $tEnvString = 0
            Return SetError(0, 0, $aEnvString)
        EndIf
    WEnd
EndFunc   ;==>_WinApi_GetEnvironmentStringsA

Func _WinApi_FreeEnvironmentStringsA($pEnv) ; https://msdn.microsoft.com/en-us/library/windows/desktop/ms683151(v=vs.85).aspx
    Local $aRet = DllCall('kernel32.dll', 'int', 'FreeEnvironmentStringsA', 'ptr', $pEnv)
    If Not @error And $aRet[1] <> 0 Then Return SetError(0, @extended, $aRet[1])
    Return SetError(@error, 0, 0)
EndFunc   ;==>_WinApi_FreeEnvironmentStringsA

and see if that's good for you. It worked just fine on my PC and I can have SSL from whatever Apache uses for SSL

Edit: tweaked the code to have the server pass info. that you'll use in your script via environment variables, so you can do:
http://localhost/test1.php?val1=this1&val2=this Other Thing
as GET or make a form and use POST
 

Edited by argumentum
tweaked the code

Share this post


Link to post
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

  • Similar Content

    • Robdog1955
      By Robdog1955
      I'm trying to click a button on a web page. I have added a couple of MsgBox lines to allow me to watch what happens on the page. As you can see the first half of my script enters data into text boxes on the page. I have no problem there. I just cannot click on the region buttons. The "set focus" line causes an outline to appear around the EU button and the "click button" line causes the "Pick a Region" text to disappear. Here is the code I have so far.
      #include <IE.au3> Local $oIE = _IECreate("http://questchecker.com/") Local $iQuestID = "123456" Local $sCharacterName = "CharacterName" Local $colForms = _IEFormGetCollection($oIE) $iCount = 0 For $oForm In $colForms $oFormElements = _IEFormElementGetCollection($oForm) For $oFormElement In $oFormElements $iCount = $iCount + 1 Local $sTagName = StringLower($oFormElement.tagName) Local $sElementType = $oFormElement.type Local $sElementName = $oFormElement.name Switch $iCount Case 6 _IEFormElementSetValue($oFormElement, "MyRealm", 0) ; realm Case 7 _IEFormElementSetValue($oFormElement, $sCharacterName, 0) Case 8 _IEFormElementSetValue($oFormElement, $iQuestID, 0) EndSwitch Next Next Local $oButtons = _IEGetObjByName($oIE, "questForm") For $oButton In $oButtons If _IEFormElementGetValue($oButton) = "US" Then MsgBox(0, "", "Click Okay to set focus") _IEAction($oButton, "focus") MsgBox(0, "", "Click Okay to click button") _IEAction($oButton, "click") ExitLoop EndIf Next MsgBox(0, "", "Click Okay to quit") _IEQuit($oIE) Exit  
    • wakillon
      By wakillon
      HttpHeaderWatcher v1.0.1.3
       

      Some time ago, some members asked how to see the Http Requests.
      There are quite a few external applications but not in AutoIt!
      HttpHeaderWatcher in association with WinPcap, very modestly solves this lack.
       
      Once done this http watcher, i asked me : why not Re-build a WinHttp Request in AutoIt from a selected Request in one Click ?
      So i have added a "Create au3" button who open the WinHttp Request of your choice in AutoIt format in SciTE Editor.
      Voila voila, hope it can help ! 
      Buttons were made online with chimply.com the easy and free buttons generator !
      See Help for more infos.
      previous downloads : 253
      source and executable are available in the Download Section
      Hope you like it !
    • zenocon
      By zenocon
      Hi, After scouring the forums for many hours, I'm trying to compile the most up to date / recent information on the options available for integrating with JavaScript / DOM -- as it relates to scraping + automation of web pages.
      It's my understanding there is IE.au3 script for automation of IE through a COM interface.  But I believe this only works with IE and won't work with Edge, correct?  Is there a COM interface that works with Edge, or any other options for integrating with Edge (other than IUIAuatomation?)
      I know there was also a FF.au3 UDF, but Mozilla abandoned the support for their mozrepl in favor of Web Extensions, and my understanding is that the FF.au3 UDF no longer works, is that correct?
      There was also a Chrome.au3 UDF, but my read on the forums indicate that this also broke many Chrome releases past.
      Which leaves IUIAutomation which I have been using to automate / scrape Windows apps, but when I am trying it on a website, it is not as useful.  For example, if I know the exact DOM id / class, I can get at it and do whatever I need to in JavaScript very simply.  With IUIAutomation, the DOM properties are not available, and most tags / elements in DOM have no useful defining characteristics to be able to get at them reliably (if they are targetable at all).  Some things might be able to be done with IUIAutomation, but I see it's value in targeting website automation / scraping as fairly limited.
      At this point, it seems like my best option is to use IE.au3, but that forces users on IE, which is probably a showstopper.
      Is there another way to bridge into the DOM?  I have written Web Extensions for Chrome and Firefox before.  They can communicate with external processes via AJAX or messaging.  I'm wondering if I can build what I need in a WebExtension and then trigger it from AutoIT Script, and gather up the results somewhere.
      I know there was the ISimpleDOM.au3 and some Microsoft Accessability scripts, but they seem to only be partially supported in browsers, and I didn't have a lot of luck getting those examples to run correctly.
    • comtech80
      By comtech80
      Folks,
      I have an issue I've been trying to solve for a while, I'm trying to add static routes in DHCP via a 121 route rule in Windows 2012 R2 is a brutal manual process and wanted to automate this via AutoIT.
       
      When I use the "ControlGetText" everything displays properly in the MSG box but when I try and use "ControlSetText" or "ControlSend" the values won't display in the input box but the action comes back as successful?
      Anyone able to help me with this? I'm thinking this might be an active window issue but i'm not sure.
      Here is a part of my code.
       
      $hWnd = WinWait("[TITLE:Add a Static Route]","", 10)
      WinActivate($hWnd)
      $Status = ControlSend($hWnd, "", "[CLASS:Edit; INSTANCE:4]", "192"); Does not add 192 to the text box.
      Local $sTextEdit1 = ControlGetText($hWnd, "", "[CLASS:Edit; INSTANCE:1]")
      ConsoleWrite ( "ControlSend Status: " &  $Status & @CRLF); Returns a Value of 1
      ConsoleWrite ( "ControlGetText Value Edit1: " &  $sTextEdit1 & @CRLF);
       
      Please see attachment for more info.

    • ur
      By ur
      I have a button control as below screen.

      This one I am able to suppress using below code in all the OS.
      But on server 2008, sometimes the button highlighted in the image is not getting clicked and some times it is working.
      I have cross checked the IDs when it is not working, but it is working only.
       
      $win1 = "erwin Mart Configuration" $MartConfigWindow = _WinWaitActivate1($win1,"Database Details") ControlSetText($MartConfigWindow, "", "WindowsForms10.EDIT.app.0.378734a6", $dbserver) ControlSetText($MartConfigWindow, "", "WindowsForms10.EDIT.app.0.378734a4", $dbname) ControlSetText($MartConfigWindow, "", "WindowsForms10.EDIT.app.0.378734a9", $dbuser) ControlSetText($MartConfigWindow, "", "WindowsForms10.EDIT.app.0.378734a8", $dbpassword) ;Button clicl logic $iControlClickStatus = ControlClick($MartConfigWindow, "", "[CLASS:WindowsForms10.BUTTON.app.0.378734a; INSTANCE:2]") ;If above button click fails, trying with mouse click on the control if ControlFocus($MartConfigWindow, "", "WindowsForms10.BUTTON.app.0.378734a2")=1 then ;sometimes above button fails in win server 2008,so this loop Send("{ENTER") EndIf  
      Any suggestion on how to resolve this.?