Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/18/2017 in all areas

  1. Hi! Today I want to show you my current AutoIt project: The ISN AutoIt Studio. The ISN AutoIt Studio is a complete IDE made with AutoIt, for AutoIt! It includes a GUI designer, a code editor (with syntax highlighting, auto complete & intelisense), a file viewer, a backup system, trophies and a lot more features!! Here are some screenshots: Here some higlights: -> easy to create/manage/public your AutoIt-projects! ->integrated GUI-Editor (ISN Form Studio 2) ->integrated - file & projectmanager ->auto backupfunction for your Projects ->extendable with plugins! ->available in several languages ->trophies ->Syntax highlighting /Autocomplete / Intelisense ->Dynamic Script ->detailed overview of the project (total working hours, total size...) And much more!!! -> -> Click here to download ISN AutoIt Studio <- <- Here is the link to the german autoit forum where I posted ISN AutoIt Studio the first time: http://autoit.de/index.php?page=Thread&threadID=29742&pageNo=1 For more information visit my Homepage: https://www.isnetwork.at So….have fun with ISN AutoIt Studio! PS: Sorry for my bad English! ^^
    1 point
  2. You can do forum searches for 'context menu' to get more options with how to interact with those types of windows.
    1 point
  3. Hi @vestanpance3110, you are right with your explanation. Two things more: - {4,} means four or more; if you want exactly four it's {4} - you can use \W a non word symbol to find the dash; I prefer more precise the symbol itself if I'm sure it's matching always - \d+ means one until unlimited digits; if you know the count do it more exact as above written Testing regexes I use the page regex101.com. You can find and play around with your case here: https://regex101.com/r/TTlwz3/2 Regards, Conrad
    1 point
  4. BrewManNH

    Serial/Licensing system

    Check here: It also pulls the current time, according to the timezone of the PC it's running on.
    1 point
  5. vestanpance3110, Welcome to the AutoIt forums. This seems to work: #include <Array.au3> $InfoMatch = "solrs013,121,192.168.1.0/26,r_Labelsolsw-b96m-02,solsw-b96m-01,DEFsolsw-b96l-001" $aRet = StringRegExp($InfoMatch, "(\w{5}-b\d\d\w-\d*)", 3) _ArrayDisplay($aRet, "", Default, 8) Please ask if you have any questions, although as I am not a RegExp guru I cannot guarantee an answer! M23
    1 point
  6. Hi. For me this is working: (solsw-[a-z0-9]{4,}-\d+) If there are examples outside this some points can be modified. Conrad
    1 point
  7. InnI

    How do I click on a popup?

    Try to wait popup before send WinWait("[class:#32768]") Send("{down}{enter}")
    1 point
  8. Sorry, I have copied only the function not the full code - updated again. But yes, for me there is no transparent area in the GUI. Tested on Win10.
    1 point
  9. when loading for example. But i am sure there exists rare circumstances where this problem would occur.
    1 point
  10. Skysnake

    ADO.au3 UDF

    I have been working with this ADO.AU3 UDF for more than a year. At the time of writing this, I am using beta 2.1.15. ADO in general allows connection to various data sources. The full documentation is available from Microsoft and a simple Google search will reveal the scope. This ADO UDF is very powerful and incorporates ideas from various other UDFs available on the Forums, such as the SQL UDF and others. The ADO UDF provides for an ADO connection using COM objects. The design is such that little knowledge of either ADO or COM is required. Combining ADO with AutoIt creates a very powerful package. The way this UDF is implemented it is not necessary to have deep ADO knowledge in order to connect and perform tasks. Since it uses ADO, in order to implement, the following is required a data source (such as a database) ODBC DNS driver and entry in the Windows Control Panel this ADO UDF #include of ADO.au3 in the user script Note that the examples should work by default. Note the connection values in each example. I have personally tested the ADO UDF on PostgreSQL databases, both locally and online, DBFs both locally and remote and briefly tested connectivity to other data sources. It all works as expected. I do not use the power of ADO to the full extent, as my needs are limited to basic reporting. The advantage is that standard SQL queries can be run over ADO to the data source - even to DBF files! The most important changes in this version 2.1.15 beta are as described below. The COM error handling makes provision for standard SQL blank result sets. This means that COM errors such as no-connection, faulty queries etc will result in a crash. Valid SQL with valid SQL responses can be processed in a manner which does not lead to a crash, but processed as a normal result. At the same time, a different implementation of the same UDF (this means you write your own part of the AutoIt code differently) means that such a blank result set may represent a blank ADO cursor, which must result in an ADO / COM error. The advantage is that a single UDF can now be implemented in different scenario's, on various data sources, with different error handling processes. I recommend this ADO.AU3 UDF to anyone wishing to connect to any external data source. Skysnake
    1 point
  11. #include <WinAPISys.au3> #include <WinAPIProc.au3> $PID = ProcessExists("notepad.exe") While Sleep(500) ToolTip(_GetProcUsage($PID)) WEnd Func _GetProcUsage($PID) If Not ProcessExists($PID) Then Return -1 Local Static $Prev1, $Prev2 Local $Time1 = _WinAPI_GetProcessTimes($PID) Local $Time2 = _WinAPI_GetSystemTimes() If Not IsArray($Time1) Or Not IsArray($Time2) Then Return -1 $Time1 = $Time1[1] + $Time1[2] $Time2 = $Time2[1] + $Time2[2] $CPU = Round(($Time1 - $Prev1) / ($Time2 - $Prev2) * 100) $Prev1 = $Time1 $Prev2 = $Time2 Return $CPU EndFunc
    1 point
  12. As i promised here the script. I´ve added another function. Now u can customise an ini file in order to change the Root folders which are checked. that´s more easyer for use. Here the script: ; ---------------------------------------------------------------------------- ; §AutoIt-Optionen setzen ; ---------------------------------------------------------------------------- AutoItSetOption("TrayIconDebug", 1) AutoItSetOption("WinTitleMatchMode", 2) AutoItSetOption("TrayIconHide", 0) ; ---------------------------------------------------------------------------- ; §Inkludierungen ; ---------------------------------------------------------------------------- #include <Date.au3> #include <File.au3> ; ---------------------------------------------------------------------------- ; §Constante Variablen ; ---------------------------------------------------------------------------- Const $MAXAGE_ALL = 30 ; Days Const $MAXAGE_FM = 185 ; Days ; ---------------------------------------------------------------------------- ; §Globale Variablen ; ---------------------------------------------------------------------------- Global $msg = "" Global $i = 1 ; ---------------------------------------------------------------------------- ; §Script Start ; ---------------------------------------------------------------------------- $ROOTDIR ="" While $ROOTDIR <>"NotFound" $ROOTDIR = IniRead("C:\Temp\config.ini", "directory" , "key" & $i, "NotFound") If $ROOTDIR <>"NotFound" then $logfile = $ROOTDIR & "deleted_files.log" _DeleteFileRecursive($ROOTDIR, "*.*", $logfile ) EndIf $i = $i+1 WEnd $retval = _DeleteFileRecursive($ROOTDIR,"*.*",$LOGFILE) msgbox(0,"","Number of Files found: " & $retval) ClipPut($msg) Func _DeleteFileRecursive($sPath, $pattern, $logfile = "") Local $files = _FileListToArray($sPath,$pattern,1) If @error <> 0 then return -1 Local $dirs = _FileListToArray($sPath,"*",2) If @error <> 0 Then Return -1 Local $age, $nFilesFound = 0, $retval If IsArray($files) Then For $n = 1 to $files[0] Select Case StringInStr($sPath & "\","\visvip_elemente\") OR StringInStr($sPath & "\","\visvip_vdafs\") OR StringInStr($sPath & "\","modelle") Case StringInStr($files[$n],".htaccess") Case StringInStr($sPath & "\","\fertigungsmittel\") $age = _DateDiffInDays($sPath & "\" & $files[$n] ) If $age > $MAXAGE_FM then $nFilesFound = $nFilesFound + 1 _DeleteFile($sPath & "\" & $files[$n],$age) If $logfile <> "" then _FileWriteLog($logfile, "Deleted " & $age & " days old file: " & $sPath & "\" & $files[$n]) EndIf EndIf Case Else $age = _DateDiffInDays($sPath & "\" & $files[$n]) If $age > $MAXAGE_ALL then $nFilesFound = $nFilesFound + 1 _DeleteFile($sPath & "\" & $files[$n],$age) If $logfile <> "" then _FileWriteLog($logfile, "Deleted " & $age & " days old file: " & $sPath & "\" & $files[$n]) EndIf EndIf EndSelect Next EndIf if IsArray($dirs) then for $n = 1 to $dirs[0] $retval = _DeleteFileRecursive($sPath & "\" & $dirs[$n], $pattern,$logfile) if $retval > 0 then $nFilesFound = $nFilesFound + $retval next endif return $nFilesFound EndFunc Func _DateDiffInDays($filename) if not FileExists($filename) then return -1 local $filetime = FileGetTime($filename) local $tempDate = $filetime[0] & "/" & $filetime[1] & "/" & $filetime[2] local $currDate = @YEAR & "/" & @MON & "/" & @MDAY return _DateDiff("D",$tempDate,$currDate) EndFunc Func _DeleteFile($filepath,$age) $msg = $msg & "Age: " & $age & " File: " & $filepath & @CRLF FileDelete($filepath) EndFunc Func _FileListToArray($sPath, $sFilter = "*", $iFlag = 0) Local $hSearch, $sFile, $asFileList[1] If Not FileExists($sPath) Then SetError(1) Return "" EndIf If (StringInStr($sFilter, "\")) or (StringInStr($sFilter, "/")) or (StringInStr($sFilter, ":")) or (StringInStr($sFilter, ">")) or (StringInStr($sFilter, "<")) or (StringInStr($sFilter, "|")) or (StringStripWS($sFilter, 8)="") Then SetError(2) Return "" EndIf If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then SetError(3) Return "" EndIf $asFileList[0] = 0 $hSearch = FileFindFirstFile($sPath & "\" & $sFilter) If $hSearch=-1 then SetError(0) Return "" EndIf While 1 $sFile = FileFindNextFile($hSearch) If @error Then ExitLoop If $iFlag = 1 Then If StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") <> 0 Then ContinueLoop EndIf If $iFlag = 2 Then If StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") = 0 Then ContinueLoop EndIf If $sFile = "." Or $sFile = ".." Then ContinueLoop ReDim $asFileList[UBound($asFileList) + 1] $asFileList[0] = $asFileList[0] + 1 $asFileList[UBound($asFileList) - 1] = $sFile WEnd FileClose($hSearch) SetError(0) If $asFileList[0] = 0 Then Return "" Return $asFileList EndFunc And the ini file: [directory] Key1="\\IPorNAME\Foldername" Key2="\\OtherIPorNAME\Foldername" If there are any questions, i´ll answer it. Greez and thx to all who helped me
    1 point
×
×
  • Create New...