Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/17/2014 in all areas

  1. As part of one of my projects at work that needs TCP communication, I decided to build my own TCP server/client pair. I tried to build it so that it is fairly self-managed, easy to implement into network projects, and contains a lot of useful inbuilt metrics. Supported metrics (supported both server and client side): - Number of current connections - Client and server connection test - Bytes sent / received / processed - Packets sent / received / processed - Number of clients connected - Sockets / IP address / computer name - Connection timestamp / elapsed time - Last packet received timestamp / elapsed time - Last packet sent timestamp / elapsed time Functionality (on top of standard TCP functions): - Configurable to send an initial "connection packet" upon connection, client or server-side. - Connection keep-alive packets at specific intervals - "Stale" connection disconnects for old, idle connections - Selective client broadcasting. On the server, clients can be individually selected to rebroadcast data received from them. - Automatic IP/socket/computer name detection - Connection state change detection. e.g. This facilitates updating a GUI connection list when clients have connected or disconnected. I would appreciate your constructive comments and suggestions. I am including the UDF, and sample server and client. Routines_TCP.au3 TCP Server.au3 TCP Client.au3
    2 points
  2. sandin

    Ini Editor

    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.au3
    1 point
  3. FYI, for those that run into the parse issue with $obj.To, I ran into it checking out a script the other day as well. I don't/can't have the beta installed, so to fix it, I simply changed: $objEmail.To To Execute("$objEmail.To") Which fixed my parse issue. If you can install the beta, do that, if you can't there's a short term fix until the next release.
    1 point
  4. this example script is the result of several threads, among others: '?do=embed' frameborder='0' data-embedContent>> '?do=embed' frameborder='0' data-embedContent>> '?do=embed' frameborder='0' data-embedContent>> . [screenshot] . the script uses the GDIPlus v1.1 functions to manipulate images in a picture control. winxp users can also run it with the instructions posted ?p=1079657'>here. a special GDIPlus_StartUp function is used. it solves several problems in handling and combining graphical effects, color matrices, color transformings, balances, levels and attributes simultaneously on an image in a normal pic control, and additionally convolution matrices, embossing and edge detections. . taken down. maybe this can be further developed into a real autoit image editor. here is a nice example pic, if you need one. i borrowed it from >here. . . if you want the 41 convolution effects, you need the excellent Fasm.au3 (flat assembler) by Ward >here. download the entire zip file, because it needs the included MemoryDll.au3 as well. if you don't, you can comment out the line #include <Fasm.au3>, but you will miss a lot of fun. without his assembler, the convolutions wouldn't be possible in a reasonable speed. also credits and thanks to Authenticity for his incredible Convolution.au3 >here. you don't need to download it, because i integrated it to my script. have fun Edano Edit 1: added gamma, zoom, load, save Edit 2: updated __GDIPlus_Startup() Edit 3: added Convolution Matrix effects Edit 4: improved zoom and some other features Edit 5: added color matrices, color balance and tint effects Edit 6: added HSL/HSB, color levels and greyscale with filters
    1 point
  5. martin

    font/gui resizing

    Here is a script by Phillip123Adams that I copied at some time which might help ;; GetDPI.au3 ;; ;; Get the current DPI (dots per inch) setting, and the ratio ;; between it and approximately 96 DPI. ;; ;; Author: Phillip123Adams ;; Posted: August, 17, 2005, originally developed 10/17/2004, ;; AutoIT 3.1.1.67 (but earlier v3.1.1 versions with DLLCall should work). ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;~ ;; Example ;~ #include<guiconstants.au3> ;~ ;; ;~ ;; Get the current DPI. ;~ $a1 = _GetDPI() ;~ $iDPI = $a1[1] ;~ $iDPIRat = $a1[2] ;~ ;; ;~ ;; Design the GUI to show how to apply the DPI adjustment. ;~ GUICreate("Applying DPI to GUI's", 250 * $iDPIRat, 120 * $iDPIRat) ;~ $lbl = GUICtrlCreateLabel("The current DPI value is " & $iDPI &@lf& "Ratio to 96 is " & $iDPIRat &@lf&@lf& "Call function _GetDPI. Then multiply all GUI dimensions by the returned value divided by approximately 96.0.", 10 * $iDPIRat, 5 * $iDPIRat, 220 * $iDPIRat, 80 * $iDPIRat) ;~ $btnClose = GUICtrlCreateButton("Close", 105 * $iDPIRat, 90 * $iDPIRat, 40 * $iDPIRat, 20 * $iDPIRat) ;~ GUISetState() ;~ ;; ;~ while 1 ;~ $iMsg = GUIGetMsg() ;~ If $iMsg = $GUI_EVENT_CLOSE or $iMsg = $btnClose then ExitLoop ;~ WEnd ;~ Exit ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func _GetDPI () ;; Get the current DPI (dots per inch) setting, and the ratio between it and ;; approximately 96 DPI. ;; ;; Retrun a 1D array of dimension 3. Indices zero is the dimension of the array ;; minus one. Indices 1 = the current DPI (an integer). Indices 2 is the ratio ;; should be applied to all GUI dimensions to make the GUI automatically adjust ;; to suit the various DPI settings. ;; ;; Author: Phillip123Adams ;; Posted: August, 17, 2005, originally developed 6/04/2004, ;; AutoIT 3.1.1.67 (but earlier v3.1.1 versions with DLLCall should work). ;; ;; Note: The dll calls are based upon code from the AutoIt3 forum from a post ;; by this-is-me on Nov 23 2004, 10:29 AM under topic "@Larry, Help!" Thanks ;; to this-is-me and Larry. Prior to that, I was obtaining the current DPI ;; from the Registry: ;; $iDPI = RegRead("HKCU\Control Panel\Desktop\WindowMetrics", "AppliedDPI") ;; Local $a1[3] Local $iDPI, $iDPIRat, $Logpixelsy = 90, $hWnd = 0 Local $hDC = DllCall("user32.dll", "long", "GetDC", "long", $hWnd) Local $aRet = DllCall("gdi32.dll", "long", "GetDeviceCaps", "long", $hDC[0], "long", $Logpixelsy) Local $hDC = DllCall("user32.dll", "long", "ReleaseDC", "long", $hWnd, "long", $hDC) $iDPI = $aRet[0] ;; Set a ratio for the GUI dimensions based upon the current DPI value. Select Case $iDPI = 0 $iDPI = 96 $iDPIRat = 94 Case $iDPI < 84 $iDPIRat = $iDPI / 105 Case $iDPI < 121 $iDPIRat = $iDPI / 96 Case $iDPI < 145 $iDPIRat = $iDPI / 95 Case Else $iDPIRat = $iDPI / 94 EndSelect $a1[0] = 2 $a1[1] = $iDPI $a1[2] = $iDPIRat ;; Return the array Return $a1 EndFunc $dpi = _getDPI() msgbox(0,"dpi",$dpi[1])
    1 point
×
×
  • Create New...