Leaderboard
Popular Content
Showing content with the highest reputation on 03/05/2018 in all areas
-
Should be close enough -- Not tested. Tested with my router... Opt('MustDeclareVars', 1) ; If Not TCPStartup() Then ConsoleWrite('Error: TCPStartup' & @CRLF) Exit EndIf ; Local $gui = GUICreate('', 400, 400) Local $edt = GUICtrlCreateEdit('', 10, 10, 380, 380) GUISetState(@SW_SHOW, $gui) ; Local $nSocket = TCPConnect('192.168.1.1', 23); <- make sure ip and port are correct! If @error Or $nSocket < 1 Then GUICtrlSetData($edt, 'Error: TCPConnect' & @CRLF, 1) Exit Else GUICtrlSetData($edt, '-> Connected' & @CRLF, 1) EndIf ; Sleep(1000) _Recv($nSocket) ; Local $aCommand[4] = [3, 'root', 'password', 'reboot']; <- make sure commands are correct! ; For $i = 1 To $aCommand[0] TCPSend($nSocket, $aCommand[$i] & @CRLF) If @error Then GUICtrlSetData($edt, 'Error: TCPSend' & @CRLF, 1) ExitLoop Else GUICtrlSetData($edt, '-> SEND: ' & $aCommand[$i] & @CRLF, 1) Sleep(1000) _Recv($nSocket) If @error Then ExitLoop EndIf EndIf Next ; GUICtrlSetData($edt, @CRLF & '-> EXIT' & @CRLF, 1) Sleep(10000) TCPCloseSocket($nSocket) TCPShutdown() Exit ; Func _Recv($nSocket) Local $sRecv For $i = 1 To 25 $sRecv = TCPRecv($nSocket, 2048, 1) If @error Then GUICtrlSetData($edt, 'Error: TCPRecv' & @CRLF, 1) Return SetError(1) ElseIf $sRecv <> '' Then GUICtrlSetData($edt, '-> RECEIVED: ' & BinaryToString($sRecv), 1) Return EndIf Sleep(10) Next GUICtrlSetData($edt, '-> No Response' & @CRLF, 1) Return EndFunc ;2 points
-
Version 1.7.0.1
10,054 downloads
Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate items (folders, mails, contacts ...) in the background. Can be seen like an API. There are other UDFs available to automate Outlook: OutlookEX_GUI: This UDF holds the functions to automate the Outlook GUI. OutlookTools: Allows to import/export contacts and events to VCF/ICS files and much more. Threads: Development - General Help & Support - Example Scripts - Wiki BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2020-02-09) None1 point -
Screen Crosshairs
robertocm reacted to WideBoyDixon for a topic
I thought this might be useful for aligning controls etc. or checking alignment on, for example, a web page (or a document). Actually, I'm not sure how it might be used but I'll dump it here anyway It uses rectangular regions to create a crosshair on the screen which follows the mouse. Fine tuning can be done with the arrow keys and pressing shift at the same time moves the crosshair in bigger increments. You can change $CROSSHAIR_SIZE and $BIG_MOVE to change the size of the "gap" in the crosshair (1 is the minimum) and also the size of the "jump" when shift is pressed down with the arrow keys. I ended up constantly updating the zoom window as otherwise it got corrupted when I tried to only update it when the mouse moved. If someone can find a better way or can find a use for this script then please amend away! I guess you could also change the color of the crosshair by setting a different background colour. #include <Constants.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Opt("MustDeclareVars", 1) HotKeySet("{ESC}", "_ExitApplication") Global $SIZEX = 256, $SIZEY = 256, $CROSSHAIR_SIZE = 1, $BIG_MOVE = 8 Global $GUIZoom = GUICreate("Zoom", $SIZEX, $SIZEY, 0, 0, BitOR($WS_SYSMENU, $WS_BORDER, $WS_CAPTION), $WS_EX_TOPMOST) GUISetBkColor(0xEEEEEE) GUISetState() Global $Crosshair = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) GUISetBkColor(0x000000) GUISetState() Global $z1 = 4 Global $zoomX = Int($SIZEX / $z1), $zoomY = Int($SIZEY / $z1), $DeskDC = _WinAPI_GetDC(0), $MyDC = _WinAPI_GetDC($GUIZoom) _WinAPI_SetBkMode($MyDC, 1) Global $UserDLL = DllOpen("user32.dll") Global $bLocked = False, $bContinue = True, $aPos, $aLast[2] = [-1, -1], $aMask, $aM_Mask, $nInc _SetZoom() While $bContinue If ($aLast[0] <> -1) Then $nInc = 1 If _IsPressed("10", $UserDLL) Then $nInc = $BIG_MOVE If _IsPressed("25", $UserDLL) Then MouseMove($aLast[0] - $nInc, $aLast[1]) If _IsPressed("27", $UserDLL) Then MouseMove($aLast[0] + $nInc, $aLast[1]) If _IsPressed("26", $UserDLL) Then MouseMove($aLast[0], $aLast[1] - $nInc) If _IsPressed("28", $UserDLL) Then MouseMove($aLast[0], $aLast[1] + $nInc) EndIf $aPos = MouseGetPos() If _IsPressed("4C", $UserDLL) Then $bLocked = Not $bLocked Do Sleep(10) Until Not _IsPressed("4C", $UserDLL) EndIf If _IsPressed("21", $UserDLL) And $z1 < 32 Then $z1 *= 2 _SetZoom() Do Sleep(10) Until Not _IsPressed("21", $UserDLL) $aLast[0] = -1 EndIf If _IsPressed("22", $UserDLL) And $z1 > 1 Then $z1 /= 2 _SetZoom() Do Sleep(10) Until Not _IsPressed("22", $UserDLL) $aLast[0] = -1 EndIf If ($aPos[0] <> $aLast[0]) Or ($aPos[1] <> $aLast[1]) Then If (Not $bLocked) Then $aM_Mask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0) $aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", $aPos[1], "long", $aPos[0] + 1 - $CROSSHAIR_SIZE, "long", $aPos[1] + 1) DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 2) $aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $aPos[0], "long", 0, "long", $aPos[0] + 1, "long", $aPos[1] + 1 - $CROSSHAIR_SIZE) DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 2) $aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $aPos[0] + $CROSSHAIR_SIZE, "long", $aPos[1], "long", @DesktopWidth, "long", $aPos[1] + 1) DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 2) $aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $aPos[0], "long", $aPos[1] + $CROSSHAIR_SIZE, "long", $aPos[0] + 1, "long", @DesktopHeight) DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 2) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $Crosshair, "long", $aM_Mask[0], "int", 1) $aLast = $aPos EndIf EndIf _WinAPI_StretchBlt($MyDC, 0, 0, $SIZEX, $SIZEY, $DeskDC, $aPos[0] - ($zoomX / 2), $aPos[1] - ($zoomY / 2), $zoomX, $zoomY, $SRCCOPY) Sleep(50) WEnd GUISetState(@SW_HIDE, $Crosshair) GUISetState(@SW_HIDE, $GUIZoom) GUIDelete($Crosshair) GUIDelete($GUIZoom) DllClose($UserDLL) Exit Func OnAutoItExit() _WinAPI_ReleaseDC(0, $DeskDC) _WinAPI_ReleaseDC($GUIZoom, $MyDC) EndFunc ;==>OnAutoItExit Func _SetZoom() _WinAPI_SetWindowText($GUIZoom, "Crosshair- x" & $z1) $zoomX = Int($SIZEX / $z1) $zoomY = Int($SIZEY / $z1) EndFunc ;==>_SetZoom Func _WinAPI_StretchBlt($hDestDC, $iXDest, $iYDest, $iWidth, $iHeight, $hSrcDC, $iXSrc, $iYSrc, $iWidthSrc, $iHeightSrc, $iROP) Local $aResult = DllCall("GDI32.dll", "int", "StretchBlt", "hwnd", $hDestDC, "int", $iXDest, "int", $iYDest, "int", $iWidth, "int", $iHeight, _ "hwnd", $hSrcDC, "int", $iXSrc, "int", $iYSrc, "int", $iWidthSrc, "int", $iHeightSrc, "int", $iROP) If @error Then Return SetError(@error, 0, False) Return $aResult[0] <> 0 EndFunc ;==>_WinAPI_StretchBlt Func _ExitApplication() $bContinue = False EndFunc ;==>_ExitApplication Have fun. WBD1 point -
This is application is meant for creating or editing INI files (which all programmers use for saving their program's data) You can add items (sections, keys, values), edit items, delete items, search for items or even drag items Adding items is very simple, if your current selected item is Section, then if you click ADD, you'll add section with 1 key and it's value, If you click ADD while your current selection is any key, then you'll add a key with it's value in the same section where your selected key is. Editing item's txt can be done with ENTER or F2 key (you can cancel with ESC while you're in "edit" mode) Deleting items can be done with key DEL You probably thinking "why did he used new child to set key's value it's annoying to expand every key to check/edit it's value", well if you turn TURBO mode on, then if you click ENTER while key item is selected, you go straight to edit it's value. And btw, I used new child to set as key's value so it could be easier to browse between keys and once you select Key or Value, bottom input will display the value, so you don't have to expand KEY if you wanna check it's value. You can create AU3 code by clicking bottom button "Generate AU3 Code" which will generate writing of your INI file, or you can go Right Click on any item and select whether Write or Read code, and by that, application will generate AU3 code for writing or reading that key or value which is selected. hotkeys: CTRL+N = New CTRL+O = Open CTRL+S = Save CTRL+SHIFT+S = Save As CTRL+F = Find ALT+A = Add item Application Key (Next to Windows key) = call "right click menu" on treeview I hope you'll like it and use it Please report any bugs if you find. Edit reason: fixed bug according to post #17 (thank you wraithdu) and added resizeable gui support according to wraithdu's suggestion (post #14) Edit 2: Added ability to create descriptions for any of the items in the treeview according to titoproject's suggestion (post #12) Edit 3: Fixed bug with "description of items", and reduced memory usage Sample.txt Ini_Editor.au31 point
-
Hi. Then take: (?i)(?:https?:\/\/)?(?:www\.)?\K\S+\.\w{3}\/?[^\/\s,]+ Conrad1 point
-
[SOLVED] --> [SQLite] Load extension
Seminko reacted to user4157124 for a topic
No easy way in SQLite. Example (single GROUP BY): DROP TABLE IF EXISTS table_temp; CREATE TEMPORARY TABLE IF NOT EXISTS table_temp AS SELECT name_group, name_value FROM name_table ORDER BY name_group ASC, name_value ASC ; SELECT t1.name_group, t1.name_value FROM ( SELECT rowid, name_group, name_value FROM table_temp ) AS t1 JOIN ( SELECT name_group, CAST(((min(rowid) + max(rowid)) / 2) AS INTEGER) AS rowmid FROM table_temp AS t2 GROUP BY name_group ) AS t3 ON t1.rowid = t3.rowmid ; $hConn expects handle as returned from _SQLite_Open(). Example: #include #include "SQLiteExtLoad.au3" Global Const $g_sFileDb = @ScriptDir & '\db.sqlite' Global Const $g_sDllExt = @ScriptDir & '\extname.dll' Global Const $g_sDllSQLite = _SQLite_Startup() Global $g_hDb = _SQLite_Open($g_sFileDb) _SQLite_EnableExtensions($g_hDb, 1) _SQLite_LoadExtension($g_hDb, $g_sDllExt) ; _SQLite_Close($g_hDb) _SQLite_Shutdown()1 point -
Sounds like a game script for Diablo, so guess you missed the forum rules on your way in? Jos1 point
-
How to get number of process's "USER objects"?
Earthshine reacted to Mbee for a topic
Read it yourself. https://msdn.microsoft.com/en-us/library/windows/desktop/ms679360(v=vs.85).aspx Also, your assertions are wrong (besides being rude). If it returned an error message string, you couldn't compare it to integer zero or one, so it does indeed matter.1 point -
Yikes! Read/write memory of apps in BlueStacks!?
jplumb reacted to Earthshine for a topic
nice. usually there is more than one way to skin a cat1 point -
Yikes! Read/write memory of apps in BlueStacks!?
Earthshine reacted to jplumb for a topic
As a workaround, I just rewrote my memory reading program to export the values in an XML file, that updates whenever the values change, and then I just check for changes in that XML file in my AutoIt script! Works like a charm.1 point -
Trivial comment really... I would suggest you move the Sleep($interval) from the beginning of your first while loop to the end of the loop. With it in the first line, your script will not do anything for 10 seconds after you start it. Depends how often you start the script and how immediate a response you expect from it.1 point
-
1 point
-
@jcpetu I digged this _Decrypt function and looks like has bugs in MSDN or AutoIt Crypt.au3. When you crypt file and save it example as Encrypted_Data.txt you can easy use _Decrypt function but... After edit file, example remove PasswordHint and save you will get output like a ". . . . " and error 420 {failed to decrypt final source} It meeans that function FileWrite change something in Encrypted_Data.txt that you cannot decrypt it. I've used other function _Decrypt_Data to decode just file content and save it as a new file Decrypted_Data.txt Additional: i've used function BinaryToString cuz output of _Decrypt_Data function is in BinaryString. This is full code... changed algorithm to AES_256 since ALG look like broken. ;=================================================================================================== ; Function: doEncryptFile($sFile [, $iAlgorithm = 0x00006610]) ; ; Description: Encode file using user password and store user passwdHint at end of file. ; Parameter(s): $sFile - string | Path to encrypted file. ; $iAlgorithm - int | (Default = 0x00006610) Algorithm type. AES_256 ; ; Return(s): On Success set error to 0 and returns an 1D array ; [0] - Path to encrypted file. ; [1] - Password. ; [2] - PasswordHint. ; On Failure set error and return 1-6. {read Console for more info} ; ; Author(s): Ascer {created for jcpetu on AutoIt forums - 2018-03-04, 18:12} ;=================================================================================================== Func doCryptFile($sFile, $iAlgorithm = 0x00006610) ; Open Inputbox to enter crypt password. Local $sPassword = InputBox("Enter password", "Enter password that is used to encrypt the file.") ; Check if user click cancel button or inputbox is empty. If @error or $sPassword = "" Then ConsoleWrite("+++ Error 1. User click Cancel button or no data given." & @CRLF) Return SetError(1, @extended, 1) EndIf ; Open Inputbox to enter crypt password hint. Local $sPasswordHint = InputBox("Enter a password hint", "Enter password hint that is used to remember the password.") ; Check if user click cancel button or inputbox is empty. If @error or $sPasswordHint = "" Then ConsoleWrite("+++ Error 1. User click Cancel button or no data given." & @CRLF) Return SetError(1, @extended, 1) EndIf ; Get File name from Path. Local $sFileName = StringSplit($sFile, "\") ; Check for errors. If @error Then ConsoleWrite("+++ Error 2. Failed to find file name." & @CRLF) Return SetError(2, @extended, 2) EndIf ; Specify file name from spilt array. $sFileName = IsArray($sFileName) ? $sFileName[UBound($sFileName) - 1] : "" ; Check for spilt errors. If $sFileName = "" Then ConsoleWrite("+++ Error 3. Failed to get data from split array." & @CRLF) Return SetError(3, @extended, 1) EndIf ; Get File path removing file name Local $sFilePath = StringReplace($sFile, $sFileName, "") ; Create a File path for new Encrypted file. Local $sEncryptedFilePath = $sFilePath & "Encrypted_" & $sFileName ; Check if file already exists then delete it! If FileExists($sEncryptedFilePath) Then FileDelete($sEncryptedFilePath) EndIf ; Crypt file and save as name of file and _encrypted _Crypt_EncryptFile($sFile, $sEncryptedFilePath, $sPassword, $iAlgorithm) ; Check for errors If @error Then ConsoleWrite("Error 4. Failed to encrypt file using func _Crypt_EncryptFile." & @CRLF) Return SetError(4, @extended, 4) EndIf ; Open a new encrypted file for append. Local $sEncryptedFile = FileOpen($sEncryptedFilePath, $FO_APPEND) ; Check for errors. If @error Then ConsoleWrite("Error 5. Failed to open a new encrypted file for reading." & @CRLF) Return SetError(5, @extended, 5) EndIf ; Append password at end of encrypted file. FileWrite($sEncryptedFile, $sPasswordHint) ; Check for errors. If @error Then ConsoleWrite("Error 6. Failed to append hint password." & @CRLF) Return SetError(5, @extended, 6) EndIf ; Prepare array for return. Local $aReturnArray = [$sEncryptedFilePath, $sPassword, $sPasswordHint] ; Return array. Return SetError(0, 0, $aReturnArray) EndFunc ;==>doCryptFile() ;=================================================================================================== ; Function: doDecryptFile($sFile, $sPassword, $sPasswordHint [, $iAlgorithm = 0x00006610]) ; ; Description: Decode file using password and cut out hint password at at end of file. ; Parameter(s): $sFile - string | Path to encrypted file. ; $sPassword - string | Password do decrypt returned by doCryptFile()[1] ; $sPasswordHint - string | PasswordHint do decrypt returned by doCryptFile()[2] ; $iAlgorithm - int | (Default = 0x00006610) Algorithm type AES_256 ; ; Return(s): On Success set error to 0 and returns path to decrypted file ; On Failure set error and return 1-9. {read Console for more info} ; ; Author(s): Ascer {created for jcpetu on AutoIt forums - 2018-03-05, 08:02} ;=================================================================================================== Func doDecryptFile($sFile, $sPassword, $sPasswordHint, $iAlgorithm = 0x00006610) ; Open encrypted file. Local $sEncryptedFile = FileOpen($sFile) ; Check for errors. If @error Then ConsoleWrite("+++ Error 1. Failed to open file." & @CRLF) Return SetError(1, @extended, 1) EndIf ; Read file for data Local $sData = FileRead($sEncryptedFile) ; Check for errors. If @error or $sData = "" Then ConsoleWrite("+++ Error 2. Failed to read file or no data given." & @CRLF) Return SetError(2, @extended, 2) EndIf ; Get length of password hint for later usage Local $sPasswordHintLength = StringLen($sPasswordHint) ; Get password hint from file Local $sHint = StringRight($sData, $sPasswordHintLength) ; Check for errors. If @error or $sHint = "" Then ConsoleWrite("+++ Error 3. Failed to get password hint from file." & @CRLF) Return SetError(3, @extended, 3) EndIf ; Check valid password hint as parameter and cut from file. If $sHint <> $sPasswordHint Then ConsoleWrite("+++ Error 4. Invalid password hint in 3th parameter or failed to get hint from file." & @CRLF) Return SetError(4, @extended, 4) EndIf ; Get data to decrypt without hint. Local $sEncryptedData = StringTrimRight($sData, $sPasswordHintLength) ; Close current file FileClose($sEncryptedFile) ; Get File name from Path. Local $sFileName = StringSplit($sFile, "\") ; Check for errors. If @error Then ConsoleWrite("+++ Error 6. Failed to find file name." & @CRLF) Return SetError(6, @extended, 6) EndIf ; Specify file name from spilt array. $sFileName = IsArray($sFileName) ? $sFileName[UBound($sFileName) - 1] : "" ; Check for spilt errors. If $sFileName = "" Then ConsoleWrite("+++ Error 7. Failed to get data from split array." & @CRLF) Return SetError(7, @extended, 7) EndIf ; Get File path removing file name. Local $sFilePath = StringReplace($sFile, $sFileName, "") ; Get searching keywords. Local $sKeyword = "Encrypted_" Local $sReplaceKeyword = "Decrypted_" ; Check if encrypted file contains phrase $sKeyword Then replace to $sReplaceKeyword else add $sReplaceKeyword If StringInStr($sFileName, $sKeyword) Then $sFileName = StringReplace($sFileName, $sKeyword, $sReplaceKeyword) Else $sFileName = $sReplaceKeyword & $sFileName EndIf ; Create a File path for new Decrypted file. Local $sDecryptedFilePath = $sFilePath & $sFileName ; Check if file already exists then delete it! If FileExists($sDecryptedFilePath) Then FileDelete($sDecryptedFilePath) EndIf ; Decrypt data file using other function. Local $sDecryptData = BinaryToString(_Crypt_DecryptData($sEncryptedData, $sPassword, $iAlgorithm)) ; Check for errors. If @error Then ConsoleWrite("+++ Error 8. Failed to decrypt data file." & @CRLF) Return SetError(8, @extended, 8) EndIf ; Write data to new file. FileWrite($sDecryptedFilePath, $sDecryptData) ; Check for errors. If @error Then ConsoleWrite("+++ Error 9. Failed to write decrypt data into new file" & @CRLF) Return SetError(9, @extended, 9) EndIf ; Success with decrypt file return path. Return SetError(0, 0, $sDecryptedFilePath) EndFunc ;==>doCryptFile() ; Put here path to your file Local $FILE_PATH = @ScriptDir & "\Data.txt" Local $aRet = doCryptFile($FILE_PATH) If Not @error Then ConsoleWrite("Successfully encoded file!" & @CRLF) ConsoleWrite("Return..." & @CRLF) ConsoleWrite("Path to encrypted file: " & $aRet[0] & @CRLF) ConsoleWrite("Password: " & $aRet[1] & @CRLF) ConsoleWrite("PasswordHint: " & $aRet[2] & @CRLF) EndIf Local $sRet = doDecryptFile($aRet[0], $aRet[1], $aRet[2]) If Not @error Then ConsoleWrite("Successfully decoded file!" & @CRLF) ConsoleWrite("Return..." & @CRLF) ConsoleWrite("Path to decrypted file: " & $sRet & @CRLF) EndIf1 point
-
Generally if you click the icon it goes auto paused If you want to disable this feature Opt("TrayAutoPause", 0)1 point
-
$url = "https://autoitscript.com/test1/test2/" & @CRLF & _ "http://aut-oit.com/test5/test6/" & @CRLF & _ "https://www.autoit.com/test7/test8/" & @CRLF & _ "https://google.com/test1/test2/" & @CRLF & _ "http://qwerty.org/test5/test?/whatabout_a_page.html" & @CRLF & _ "https://www.tungsten.com/test7/test8/metalisbetter.htm" & @CRLF & _ "https://falsedomains.com/test1/test2/" & @CRLF & _ "http://who%20is%20this/test5/test6/" & @CRLF & _;NO "https://www.autochecker.com/test7/test8/" & @CRLF & _ "https://autobanks.com" & @CRLF & _;NO "http://aut_ofitbaddomain" & @CRLF & _;NO "https://www.autoit.biz/test7/test8/" & @CRLF $aReg = StringRegExp($url, '(?i)https?://(?:www\.)?\K\S+\.\w{3}/?[^/\s,]+/', 3) For $i = 0 to UBound($aReg) - 1 ConsoleWrite($aReg[$i] & @CRLF) Next ConsoleWrite(@CRLF) $bReg = StringRegExp($url, '(?i)(?:https?://)(?:www\.)?([^/]*.?[^/]*)',3) For $i = 0 to UBound($bReg) - 1 ConsoleWrite($bReg[$i] & @CRLF) Next Its easy enough to test ;'(?i)https?://(?:www\.)?\K\S+\.\w{3}/?[^/\s,]+/' autoitscript.com/test1/ aut-oit.com/test5/ autoit.com/test7/ google.com/test1/ qwerty.org/test5/ tungsten.com/test7/ falsedomains.com/test1/ autochecker.com/test7/ autoit.biz/test7/ ;'(?i)(?:https?://)(?:www\.)?([^/]*.?[^/]*)' autoitscript.com/test1 aut-oit.com/test5 autoit.com/test7 google.com/test1 qwerty.org/test5 tungsten.com/test7 falsedomains.com/test1 who%20is%20this/test5 autochecker.com/test7 autobanks.com http:/ autoit.biz/test7 as you can see the first one is still more robust although I still had to change it a bit to match your data URI have a list of valid characters but I don't know that I'd want to build a regex for them lol1 point
-
Was in need of an ini editor and nice treeview example Works nicely after fixing this under W10 and AutoIt 3.3.14.2 When editing remember to press enter before value gets changed in the tree (mouse clicking will drop it back to empty value) Fixes done on attachment of post 1 added include treeviewconstants fixed callback stuff changed all case $TVN to have an A appended fixed small issue $edit_item_menu() removed ( #include <TreeViewConstants.au3> ;Changed Global $idNew=1000, $idOpen=1001, $idSave=1002 ;~ changed ;~ Global $idHelp=1003 ;~ changed global $idPower=1004 ;~ changed Global $wProcHandle = DllCallbackRegister("_WindowProc", "ptr", "hwnd;uint;long;ptr") ;Changed Global $wProcHandle2 = DllCallbackRegister("_EditWindowProc", "ptr", "hwnd;uint;long;ptr") ;Changed Global $wProcOld = _WinAPI_SetWindowLong(GUICtrlGetHandle($treeview), $GWL_WNDPROC, DllCallbackGetPtr($wProcHandle)) ;Changed Global $wProcOldLocal2 = _WinAPI_SetWindowLong(GUICtrlGetHandle($find_input), $GWL_WNDPROC, DllCallbackGetPtr($wProcHandle2)) ;Changed Case $TVN_SELCHANGEDA, $TVN_SELCHANGEDW ;~ Changed Case $TVN_SELCHANGEDA, $TVN_SELCHANGEDW ;~ Changed Case $TVN_SELCHANGEDA, $TVN_SELCHANGEDW ;~ Changed Case $TVN_ENDLABELEDITA, $TVN_ENDLABELEDITW ;Changed Case $TVN_ITEMEXPANDINGA, $TVN_ITEMEXPANDINGW ;Changed Case $TVN_BEGINLABELEDITA, $TVN_BEGINLABELEDITW ;Changed Case $TVN_BEGINDRAGA, $TVN_BEGINDRAGW ;Changed Case $edit_item_menu ;changed1 point