Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/27/2023 in all areas

  1. pixelsearch

    RegExpQuickTester 2.5r

    Hi everybody Here is the script I use to test RegEx patterns offline, it's handy. Credits go to Lazycat, who scripted it initially many years ago and thanked "w0uter for ideas and parts of code". I added some modifications (listed in next post) and would like to thank @jchd @mLipok @mikell @Nine @mistersquirrle @taurus905 and @ioa747 for their contribution. Below are the match text & patterns corresponding to the pic above. For a start, you can copy and paste them in their respective edit control. After you choose the corresponding RegExp mode from the ComboBox at the bottom of the screen (mode 3 = return array of global matches) then you'll have the same results as displayed in the pic above. Match Text : blabla...blabla... blabla..."https://media.pic1.jpg"blabla..."https://media.pic2.png"... blabla..."https://media.pic3.jpg"blabla..."https://media.pic4.png"... blabla...blabla... Pattern : (?i)"([^"]+?\.(?:jpg|png))" When you end the script, 2 files will be created in the same directory of the script. Assuming your script is named "RegExpQuickTester 2.5p.au3", the 2 files created will be : * "RegExpQuickTester 2.5p.txt" which contains the saved Match Text that will be reused when you run the script. * "RegExpQuickTester 2.5p.ini" which contains the saved options that will be reused when you run the script. A right click while hovering over the Edit control of the Search Pattern will display a helpful context menu, with possibility to paste something from the menu inside the Search Pattern. Personally I nearly don't paste anything from the context menu but as this feature was created by the original scripter... Instead I like to consult this context menu as a RegExp syntax reminder ! Anyway, just experiment it and choose what's best for you. 99% of the time, the Search Pattern Tab will be on top. If you notice another colored Tab (except the Personal Tab which will never be highlited), then it means that there is something written in this other tab : the color is here only to remind you that there IS something in this other tab, in case you had forgotten. Even a space or a blank line would color the Tab. YJ This particular design (due to original scripter) won't allow you to type "" in the Replace Pattern Tab (mikell frowned, concerning this missing feature). Gladly I found that typing a non existing group, for example $99 will have the same effect as "" so it's a workaround that seems to do the job. The "Code" button allows you to generate the corresponding AutoIt code, which will be copied to the Clipboard Don't hesitate to ask if you have questions. Our RegExp gurus (that's not me) just love RegExp questions Edit: I forgot. You can drag a text file (or htm etc...) inside the Match Text edit control (it's a droppable zone) . There shouldn't be a 32Kb file size limit anymore as I added code to override this limit. There are probably a couple of other functionalities I'm not thinking of now, you'll easily find what you need if you look at the code. And if you want to modify something in the code, don't hesitate. Just share here your modifications in case other users find them useful too, thanks. Updates are detailed in next post Download last version 11 nov 2024 : RegExpQuickTester 2.5r.au3
    1 point
  2. HI have been using autoit for many years now.. and am decent with it and its been a pleasure to work with. I can just make a folder.. toss a few .au3 files into it and click f5 and bam.. i have a GUI interacting with functions I can test.. before other programmers even have their IDE loaded.. Recently i wanted to make some web-based sites with websockets.. and so I started learning javascript/nodejs..... and its been a headache.. As a solo programmer I love to know what every single thing does in my code... the package manager feels awful to me and is so slow.... theres all these prompts/errors files that generate and I have no idea if they are even used.. ect. The syntax is a nightmare.. and it keeps changing.. callbacks/asynch/await.. a new frontend library every day.. typescript blah blah.. all stuff I really dont want to learn. My question is.. have any of you autoit programmers found a 2nd language to use that you would recommend? I want speed/ease of use.. I dont want to launch a giant IDE from microsoft. I want to be able to work with Websockets.. SO maybe my only options are python, C++ and nodejs. Since i have to learn htlm/css.. it feels like nodejs is the best choice...maybe this is jsut a dumb rant.. and ill go back to learning nodejs using chatgpt.
    1 point
  3. Just a little followup to @Giannis answer, 0x20000 is a "Basic User", and you can see what's available by running this in cmd: runas /showtrustlevels Here's some other examples of it: https://stackoverflow.com/questions/20218076/batch-file-drop-elevated-privileges-run-a-command-as-original-user
    1 point
  4. try this from Main.au3 ShellExecute("runas", "/trustlevel:0x20000 test.exe")
    1 point
  5. Updated to version 2.5p (script found in 1st post) . Revisions are : 25 mar 2023 : save & reload 5 Edit Tabs content with UTF-8 (to take care of Unicode characters) Context menu reworked with new items added, also context menu is now prepared in a separate function _PrepareContextMenu() Newlines (@CRLF and/or @LF and/or @CR) correctly parsed & copied in clipboard, e.g. Code button (for pasting directly in Scite) Ready : generated code > 4095 characters split in lines length acceptable by Scite, e.g < 4096 char) Display 'next offset' (e.g. @extended) for RegEx mode 1 & 2 when successful Changed version from "2.5j" to "2.5p" Thanks to @mikell for his advices while I was modifying the context menu
    1 point
  6. I have a copy of the code from Posting this here because the original download link is no longer available. _ShellExecuteWithReducedPrivileges.au3
    1 point
  7. I don't know, no I didn't compile it, I'll see it later I have to go
    1 point
  8. $iSetting - 0=Disabled, 1=Enabled, 2=Configured, 3=find & exit _GroupPolicy2.exe "\Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options" "Microsoft network client: Digitally sign communications (always)" "3" as the name says find & exit in development state as help tool, if want to check if everything is fine, or if you want catch a control with info tool
    1 point
  9. I've got to make a number of nasty forum and websites updates in order to support the next forum software version. Expect a lot of downtime / broken features in the next week or so!
    1 point
  10. Plan: Upgrade wordpress main site to WP 6 Upgrade forum to 4.6.10 Upgrade Mediawiki to 1.38.5 (PHP 7.4 / MariaDB 10.1) Upgrade PHP to 8.0 (Media wiki may have some issues as requires 1.39 for full PHP 8 support) Upgrade forum to 4.7.8 Upgrade MariaDB to 10.3 or later Forum looks ok at 4.6.10 Mediawiki looks ok at 1.38.5 but forum login integration is not working PHP 8.0 running and working with forum syntax highlighting. Will leave running for a while before next stage. Forum updated to 4.7.8 MariaDB upgraded to 10.3
    1 point
  11. mLipok

    AutoIt Snippets

    I very offen wonders which values gives particular macro. For example: do I should use @AppDataDir or @LocalAppDataDir or @UserProfileDir Here is my Show_Macro_Values.au3script: ConsoleWrite('@AppDataCommonDir : ' & @AppDataCommonDir & @CRLF) ConsoleWrite('@AppDataDir : ' & @AppDataDir & @CRLF) ConsoleWrite('@AutoItExe : ' & @AutoItExe & @CRLF) ConsoleWrite('@AutoItPID : ' & @AutoItPID & @CRLF) ConsoleWrite('@AutoItVersion : ' & @AutoItVersion & @CRLF) ConsoleWrite('@AutoItX64 : ' & @AutoItX64 & @CRLF) ConsoleWrite('@CommonFilesDir : ' & @CommonFilesDir & @CRLF) ConsoleWrite('@Compiled : ' & @Compiled & @CRLF) ConsoleWrite('@ComputerName : ' & @ComputerName & @CRLF) ConsoleWrite('@ComSpec : ' & @ComSpec & @CRLF) ConsoleWrite('@CPUArch : ' & @CPUArch & @CRLF) ConsoleWrite('@DesktopCommonDir : ' & @DesktopCommonDir & @CRLF) ConsoleWrite('@DesktopDepth : ' & @DesktopDepth & @CRLF) ConsoleWrite('@DesktopDir : ' & @DesktopDir & @CRLF) ConsoleWrite('@DesktopHeight : ' & @DesktopHeight & @CRLF) ConsoleWrite('@DesktopRefresh : ' & @DesktopRefresh & @CRLF) ConsoleWrite('@DesktopWidth : ' & @DesktopWidth & @CRLF) ConsoleWrite('@DocumentsCommonDir : ' & @DocumentsCommonDir & @CRLF) ConsoleWrite('@FavoritesCommonDir : ' & @FavoritesCommonDir & @CRLF) ConsoleWrite('@FavoritesDir : ' & @FavoritesDir & @CRLF) ConsoleWrite('@HomeDrive : ' & @HomeDrive & @CRLF) ConsoleWrite('@HomePath : ' & @HomePath & @CRLF) ConsoleWrite('@HomeDrive : ' & @HomeDrive & @CRLF) ConsoleWrite('@HomeShare : ' & @HomeShare & @CRLF) ConsoleWrite('@LocalAppDataDir : ' & @LocalAppDataDir & @CRLF) ConsoleWrite('@LogonDNSDomain : ' & @LogonDNSDomain & @CRLF) ConsoleWrite('@LogonDomain : ' & @LogonDomain & @CRLF) ConsoleWrite('@LogonServer : ' & @LogonServer & @CRLF) ConsoleWrite('@MyDocumentsDir : ' & @MyDocumentsDir & @CRLF) ConsoleWrite('@OSArch : ' & @OSArch & @CRLF) ConsoleWrite('@OSBuild : ' & @OSBuild & @CRLF) ConsoleWrite('@OSLang : ' & @OSLang & @CRLF) ConsoleWrite('@OSServicePack : ' & @OSServicePack & @CRLF) ConsoleWrite('@OSType : ' & @OSType & @CRLF) ConsoleWrite('@OSVersion : ' & @OSVersion & @CRLF) ConsoleWrite('@ProgramFilesDir : ' & @ProgramFilesDir & @CRLF) ConsoleWrite('@ProgramsCommonDir : ' & @ProgramsCommonDir & @CRLF) ConsoleWrite('@ProgramsDir : ' & @ProgramsDir & @CRLF) ConsoleWrite('@ScriptFullPath : ' & @ScriptFullPath & @CRLF) ConsoleWrite('@ScriptDir : ' & @ScriptDir & @CRLF) ConsoleWrite('@ScriptName : ' & @ScriptName & @CRLF) ConsoleWrite('@ScriptLineNumber : ' & @ScriptLineNumber & @CRLF) ConsoleWrite('@StartMenuCommonDir : ' & @StartMenuCommonDir & @CRLF) ConsoleWrite('@StartMenuDir : ' & @StartMenuDir & @CRLF) ConsoleWrite('@StartupCommonDir : ' & @StartupCommonDir & @CRLF) ConsoleWrite('@StartupDir : ' & @StartupDir & @CRLF) ConsoleWrite('@SystemDir : ' & @SystemDir & @CRLF) ConsoleWrite('@TempDir : ' & @TempDir & @CRLF) ConsoleWrite('@UserName : ' & @UserName & @CRLF) ConsoleWrite('@UserProfileDir : ' & @UserProfileDir & @CRLF) ConsoleWrite('@WindowsDir : ' & @WindowsDir & @CRLF)
    1 point
  12. Melba23

    Daniel_FUD

    This (now ex)member has gained an unfortunate reputation on other fora of asking for help via PM and attaching a script which, when run, tries to steal your account information/credentials, etc for a whole list of applications before sending them to the OP. If you have received a PM from this (ex)member asking for help with a script DO NOT RUN IT - just delete the PM and/or the downloaded script ASAP. M23
    1 point
  13. JLogan3o13

    reddead1345

    One topic locked for breaking the forum rules can be overlooked. Opening a second with the exact same question (also against the rules) is deserving of a stern warning. Opening a third, where you outright state you're trying to bypass the forum rules is bordering on simply unintelligent. Take a week off to consider whether you actually want to be a legitimate part of this community.
    1 point
  14. 109,241 downloads

    A Tutorial for new people * Over 19 InterActive GUI's * Over 50 Step-by-Step Scripts * Verbal Instructions * Complete with Demonstrations. * and Answers * Exe Format for New People Written completely with AutoIt to Demonstrate some of the Capabilities of AutoIt May not Work with Windows 98 ( tested once = fail) Re-Testing is now possible ( Click "Search Help" then type in "me dummy, you fix" ) Enjoy!!! Valuater 8)
    1 point
  15. OK Let's see a standard workflow for developping a GUI application using KODA: You create your GUI with KODA You export and past the GUI creation code onto your script You Run, it works You (I) many times need to make some manual tweaks on the KODA generated code, and I forget (or cannot) mirror these modifications on KODA After that, I need to modify the GUI, so I do it on KODA, repeat steps 1 and 2, but here, the manual modifications are lost! And you need to redo them With this function: You create your GUI with KODA Embeed the .kxf file with your script And every time you modifiy your GUI on KODA, you don't have to touch/modify your script! Also, your custom modifications are done after calling the function, so you don't loose them or need to redo them
    1 point
  16. zelles

    Encryption over TCP

    I figured I'd share a little example script on encrypting your data over TCP communcation. I put together a simple function that can be used to encrypt when sending, and decrypt when receiving. For added protection, one could also chop it in to segments to send seperatly and have packed back together when recieved to decode. The example script will show you what the encrypted data looks like as well as the decrypted result. To use it simply run the script and select server, then run the script again and select client. Once you have the server and client windows open you can send data from the client to the server and and server will show a message box with the encrypted and decrypted messages that it receives. The example script: #include <ButtonConstants.au3> #include <Crypt.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> OnAutoItExitRegister("Close") Global $ServerAddress = "127.0.0.1" Global $ServerPort = "12700" RunDemo() Func RunDemo() TCPStartup() Local $hGUI = GUICreate("Select Option", 250, 70) Local $idBtnServer = GUICtrlCreateButton("1. Server", 65, 10, 130, 22) Local $idBtnClient = GUICtrlCreateButton("2. Client", 65, 40, 130, 22) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Close() Case $idBtnServer GUICtrlSetState($idBtnClient, $GUI_HIDE) GUICtrlSetState($idBtnServer, $GUI_DISABLE) TCPServer() Case $idBtnClient GUIDelete($hGUI) ClientGUI() EndSwitch Sleep(10) WEnd EndFunc Func ClientGUI() $Form1 = GUICreate("TCP Client", 236, 89, 192, 124) $InputCommand = GUICtrlCreateInput("", 8, 32, 217, 21) $ButtonSend = GUICtrlCreateButton("Send", 152, 56, 75, 25) $Label1 = GUICtrlCreateLabel("Send a command to server:", 8, 8, 134, 17) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE TCPCloseSocket($TCPConnector) Close() Case $ButtonSend $Message = GUICtrlRead($InputCommand) $TCPConnector = TCPConnect($ServerAddress, $ServerPort) TCPSend($TCPConnector, TCPCrypt(True, $Message)) EndSwitch WEnd EndFunc Func TCPServer() $TCPListener = TCPListen($ServerAddress, $ServerPort, 100) $TCPAccepted = 0 Do $TCPAccepted = TCPAccept($TCPListener) If GUIGetMsg() = $GUI_EVENT_CLOSE Then TCPCloseSocket($TCPListener) Close() EndIf Until $TCPAccepted <> -1 $TCPEncrypted = TCPRecv($TCPAccepted, 2048) $TCPReceived = TCPCrypt(False, $TCPEncrypted) MsgBox(0, "Packet Received", "Received Packet" & @CRLF & @CRLF & "Decrypted:" & @CRLF & " " & $TCPReceived & @CRLF & @CRLF & "Encrypted:" & @CRLF & " " & $TCPEncrypted) TCPCloseSocket($TCPListener) TCPServer() EndFunc #Region TCPCrypt Function Func TCPCrypt($TCPCrypt_Action, $TCPCrypt_Data) _Crypt_Startup() $TCPCrypt_Key = _Crypt_DeriveKey("YOURsuperSECRETpassKEYforDecryption", $CALG_AES_256) If $TCPCrypt_Action = True Then $TCPCrypt_Return = _Crypt_EncryptData($TCPCrypt_Data, $TCPCrypt_Key, $CALG_USERKEY) Else $TCPCrypt_Return = BinaryToString(_Crypt_DecryptData($TCPCrypt_Data, $TCPCrypt_Key, $CALG_USERKEY)) EndIf _Crypt_DestroyKey($TCPCrypt_Key) _Crypt_Shutdown() Return $TCPCrypt_Return EndFunc #EndRegion TCPCrypt Function Func Close() TCPShutdown() Exit EndFunc This is the basic function being used to encrypt and decrypt the data. ; Example Usage: ; Send: TCPSend($TCPSocket, TCPCrypt(True, $Message)) ; Receive: $sReceived = TCPCrypt(False, TCPRecv($TCPSocket, 2048)) #Region TCPCrypt Function Func TCPCrypt($TCPCrypt_Action, $TCPCrypt_Data) _Crypt_Startup() $TCPCrypt_Key = _Crypt_DeriveKey("YOURsuperSECRETpassKEYforDecryption", $CALG_AES_256) If $TCPCrypt_Action = True Then $TCPCrypt_Return = _Crypt_EncryptData($TCPCrypt_Data, $TCPCrypt_Key, $CALG_USERKEY) Else $TCPCrypt_Return = BinaryToString(_Crypt_DecryptData($TCPCrypt_Data, $TCPCrypt_Key, $CALG_USERKEY)) EndIf _Crypt_DestroyKey($TCPCrypt_Key) _Crypt_Shutdown() Return $TCPCrypt_Return EndFunc #EndRegion TCPCrypt Function Hope this helps...
    1 point
×
×
  • Create New...