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

    • 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.?
    • Eggsplorer
      By Eggsplorer
      Hi,
      Ich hab ein Script für Windows Updates, dass nach dem OOBE aufgerufen werden soll. Run/RunOnce ist daher nicht möglich.
      Stattdessen möchte ich das Script in den Autostart schreiben lasse. Wenn die OOBE beendet wird und der Administrator angemeldet wird, soll das Update-Script einmalig aufgerufen werden und sich anschl. selbst löschen.
      Lang rede, kurzer Sinn:
      Wie kann ich folgendes Script in den Autostart schreiben?
      RunWait(@ComSpec & " /c " & "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File C:\UA\Scripts\win-updates.ps1 -MaxUpdatesPerCycle 100 -RestartRequired 1", "") Ich würde ungern eine BAT oder EXE reinkopieren, da ich es unsauber finde. Die müsste ja auch zusätzlich irgendwo liegen.
      Danke
      Eggsplorer
    • FrancescoDiMuro
      By FrancescoDiMuro
      Good morning everyone
      I worked a bit on a little project of mine, and I managed to do what I was trying to do, or, automate a quiz in AutoIt.
      Now, everything works fine but, in order to achieve what I'm trying to achive, I'd like to make this script run faster.
      I'll attach a portion of the code in order to let you understand what my script does.
      $objIE_h1 = _IETagNameGetCollection($objIE, "h1") ; Take the text of the answer If @error Then ConsoleWrite("Errore durante la lettura degli h1 nella pagina. - Errore: " & @error & @CRLF) Else For $objElement In $objIE_h1 $strInnerText = $objElement.innerText Next Select Case StringInStr($strInnerText, "QUESTION") ; Here is the question ; PS4 PRO $objSpans = _IETagNameGetCollection($objIE, "span") ; Answers are stored here For $objElement In $objSpans If $i >= 4 Then $strAnswer = $objElement.innerText ; Take the text of the answer n° 0, 1, 2, 3 If StringInStr($strAnswer, "CORRECT ANSWER") Then ; If I match the correct answer, then, I have to click on the input with answer id = answer_i $j = $i - 4 $objInput = _IEGetObjById($objIE, "answer_" & $j) If @error Then ConsoleWrite("Errore durante la lettura della risposta #" & $i & " - Errore: " & @error & @CRLF) Else _IEAction($objInput, "click") If @error Then ConsoleWrite("Errore durante il click sull'elemento. - Errore: " & @error) Else ConsoleWrite($j & ") Risposta: " & $strAnswer & @CRLF) ExitLoop EndIf EndIf EndIf $i+=1 Else $i+=1 EndIf Next $i = 0 $j = 0 This is what my script does.
      Questions are 20, in which I have 15 multiple choice question, 2 images ( on which I use _IEImgClick() ), and 3 text inputs ( a simple send with the text I have to enter ).
      How can I make all of these, faster?
      If I reach this goal, I've probably done one of my best goals in life, and I'd like to share my happiness with you, giving a huge donation to this fantastic community!
      Thanks for your help
    • au3leecher
      By au3leecher
      Hellow everybody,
      I tryed to manipulate a game called "Assault Cube" which is a easy beginning in coding. I run the code but the wished value doesn't change, i don't understand why.
      The Pointers are fine, I checked that the pointers don't change every time while restart the game.
      My Code:
      <snip>
      _____________________________________________________________________________________________________________________________________________________________________________________________
      Checklist:
      The Offsets are 18C & 4
      In Cheat Engine: ("ac_client.exe"+0010F418) <- Pointer
      4 Bytes = 'dword'