Leaderboard
Popular Content
Showing content with the highest reputation on 07/12/2013 in all areas
-
You can find a lot of libraries (DLLs) to create OpenGL windows and contexts, to load images and data into textures, to load 3D models, and to call functions that are not in opengl32.dll. Are all these external libraries necessary? The zip files below contains UDFs to create contexts, load images and models, and call functions without any external libraries. They also contains a number of examples. Well, it's not quite true that I do not use any DLLs at all. In some examples I'm using The Embedded Flat Assembler (FASM) UDF by Ward (includes fasm.dll) to optimize loops. This is the ExLauncher, that can be used to run the examples: Press Play to run the first example, and Next to run the following examples. In the Samples menu you can select OpenGL 1.1, 2.1, and 3.3 examples. With Samples | Models you can open the 3D model Viewers, and run 3D model examples. With Samples | Templates you can see a number of templates, as you can use as a start for your own examples. The documentation is divided into five chapters: Chapter 1 is mostly about OpenGL 1.x. Topics like calling functions, creating a rendering context, and loading images into textures are also covered.Chapter 2 deals with OpenGL 2.x and the new concepts that appeared in these versions. Most important is the concept of shaders.Chapter 3 is mostly about OpenGL 3.x. There is also a section on OpenGL/GLSL versions and a section on error handling.Chapter 4 is about implementing a model loader for Wavefront (OBJ) 3D models.Chapter 5 is a summary.In bottom of the post you can download zip files. Use ExLauncher.au3 in top folder to run examples. To view Wavefront (OBJ) 3D models see section 4.0. Chapter 1 is mostly about OpenGL 1.x. Topics like calling functions, creating a rendering context, and loading images into textures are also covered. 1.1 Calling functions Functions defined in OpenGL 1.2 and higher and functions defined in extensions are part of the software that belongs to the video card. To access these functions you normally use a function loading library e.g. GLEW. You can also access the functions manually: 1.2 Rendering contexts (Update 2013-09-21) With OpenGL 3.0 and higher there are more ways to create a rendering context. In the OpenGL wiki the terms simple and proper are used to describe two different types of contexts. Update: New MSAA context. 1.3 Textures and images (Update 2013-09-21) A texture is an OpenGL object that contains an image. Without an image loading library or at least an image loading function it can be tricky to load an image into a texture. These functions loads BMP, GIF, ICO, JPG, PNG, RGB, RGBA, TGA, TGA(RLE), TIF and WMF files. Update: Anisotropic filter (bottom of spoiler). 1.4 OpenGL 1.1 examples (Update 2013-08-03) SamplesOpenGL 1.1 contains the OpenGL 1.1 examples. Here is a list: 1.5 Run examples (Update 2013-08-03) You can run examples in the Samples folder by double clicking, or you can run them from Scite. The easiest is to use ExLauncher.au3 in the top folder: 1.6 Threads example Imagine that when you move the mouse across the screen, it'll create a track on the screen that follows your mouse. Then imagine that there isn't just one track, but many tracks that are slightly offset relative to each other. This is threads: Chapter 2 deals with OpenGL 2.x and the new concepts that appeared in these versions. Most important is the concept of shaders. 2.1 New concepts In the last versions of OpenGL 1.x and especially in version 2.0 and 2.1 a new set of concepts showed up. It was concepts such as shaders, attributes, uniforms and vertex buffer objects (VBOs): 2.2 Shaders Shaders were introduced in OpenGL 2.0. A shader is a program running on the GPU. You write a shader in the OpenGL Shading Language (GLSL). It's a C-like language: 2.3 Math functions When you use shaders in OpenGL 2.0 and higher you don't use old functions like glMultMatrix, glRotate, glTranslate, gluLookAt or gluPerspective. You have to use a new set of functions that works with the functionality of the shaders: 2.4 OpenGL 2.1 examples (Update 2013-06-16) SamplesOpenGL 2.1 contains the OpenGL 2.1 examples. All these examples are based on shaders and the new concepts in OpenGL 2.1. Here is a list: Chapter 3 is mostly about OpenGL 3.x. There is also a section on OpenGL/GLSL versions and a section on error handling. 3.1 OpenGL versions OpenGL versions and corresponding GLSL version: 3.2 Error handling OpenGL error handling is done with glGetError and glGet-functions. Initialize error handling before a group of commands and check errors after the last command. Here error handling is illustrated with LoadGLSLshader in oglIncludesoglLoadShaders.au3: 3.3 OpenGL 3.3 examples (Update 2013-06-16) SamplesOpenGL 3.3 contains the OpenGL 3.3 examples. Most of these examples are added in an update on 2013-06-16. Chapter 4 is about implementing a model loader for Wavefront (OBJ) 3D models 4.0 View 3D models (New 2014-05-04) Added a few pictures that shows how the model Viewers works. 4.1 3D models (New 2013-08-03) When you need a 3D model in your OpenGL project you probably just want to find the model on the internet and load it into your project with some kind of model loading function. 4.2 Wavefront (OBJ) loader (Update 2013-09-21) A Wavefront 3D model (Wavefront .obj file) consists usually of two files: An OBJ-file (Object files) which contains vertices, texture coordinates, normal vectors and face triangles to describe the geometry of the model. And a MTL-file (Material files) with material definitions to describe the look of the model. Material definitions are parameters for the OpenGL glMaterial command to describe the light reflectivities of the surface of the model, and definitions of texture maps to put on the surface of the model. 4.3 Wavefront (OBJ) viewer (Update 2013-09-21) SamplesModelsModel Viewer contains two viewers for Wavefront (OBJ) 3D models. Model Viewer (OBJ) 1.1.au3 is an OpenGL 1.1 version (2.0 or lower) and Model Viewer (OBJ) 2.1.au3 is a 2.1 version (2.1 or higher). Model Viewer (OBJ).au3 calls the proper script depending on your OpenGL version. The latter can be opened through the Tools menu in ExLauncher.au3. 4.4 Example models (Update 2013-09-21) The Models folder at the top level contains the example models. The SamplesModels folder at the top level contains the viewers and the au3-scripts to run the examples. Example models are split into two groups: Samples and models. Models are further divided into three groups: Small, medium and large models: 4.5 Large models (Update 2013-09-21) The optimizations provided in this update and the 2013-08-24 update has largely eliminated the problems of large models. 4.6 Using the models (Update 2013-09-21) SamplesModelsOpenGL 1.1 and SamplesModelsOpenGL 2.1 contains some small examples which shows how to use the models. 4.7 Software (Update 2013-08-24) Blender is a program to edit 3D models. AssimpView is a model viewer. Both of these programs are able to export a model as a Wavefront (OBJ) triangle mesh. 4.8 Next version (Update 2013-09-21) Some issues should be handled in the next version: 4.9 Summary (Update 2013-09-21) This is a summary of the main features and limitations for the Wavefront (OBJ) 3D model loader: Chapter 5 is a summary 5.1 Sources for the UDFs (New 2013-06-16) The zipfile contains a number of OpenGL UDFs in the oglIncludes folder. This is a description of the sources for these UDFs: 5.2 Updates (New 2014-05-04) The example was released 2013-05-19. This is a summary of the updates. Zip files and downloads Included UDFs FASM.au3 and MemoryDll.au3 by Ward to optimize loops. The UDFs are included in the code zip. Contents of the code zip The zipfiles contains a number of files and folders: ExLauncher.au3 - to start the examples, run this fileImages - images used in the examples (not since 2014-05-04)Models - Wavefront (OBJ) 3D example modelsIncludes - utility functions and UDFsoglIncludes - OpenGL related constants and functionsSamples - a collection of examples and templatesTools - a few OpenGL toolszLinks - links to dokuUpdate 2014-05-04 for AutoIt 3.3.10 (code): OpenGL2-3.3.10.7z Downloads at Dropbox The images and 3D models can be downloaded from OpenGL Images and Models at Dropbox. The folder contains three 7z-files: Images.7z, 3.5 MB - the images from the first release 2013-05-19. You need these images, but if you have already installed the images, you do not need to download this package.ModelSamples.7z, 1.66 MB - sample 3D models. If you want to test the Wavefront (OBJ) 3D models and the model loading functions, you need this package.Models.7z, 39.15 MB (250 MB uncompressed) - larger models. The pictures in post 13, 14 and 16 are created from models in this package.If you don't want to test any 3D models there is no need to download and install the last two packages.Click the Download button in upper right corner to download all three packages in one big zip. Testet on XP 32 bit with a NVIDIA video card supporting OpenGL 3.3 and Win 7 64 bit with an Intel card supporting OpenGL 3.1. Use ExLauncher.au3 in top folder to run examples. To view Wavefront (OBJ) 3D models see section 4.0. AutoIt 3.3.8 You can get the 2013-09-21 version for 3.3.8 here. You need the images and possibly the 3D models. x64 issues (no x64 issues in 3.3.10)1 point
-
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
-
Form Builder beta
mLipok reacted to BuckMaster for a topic
Update v1.0.6 Major script overhaul, I literally started over from scratch only adding parts of code from the old script that were solid. I don’t have a help file made as of now so I am going to explain all of the functionality in this post - Form Builder is no longer bi-directional, you now toggle between script mode and GUI mode using a button in the top right or F4 - The script no longer recompiles on every change but instead inserts changes into the script - Form Builder no longer cares about Event mode or GuiGetMsg mode - No more .gui files, you now edit .au3 scripts directly - Script edit is now a SciLexer control, includes syntax highlighting, folding, call tips, keywords, and inline error annotations. - Script output console is now at the bottom in script mode - Main GUI menu redone, most functions from SciTe have been added along with their hotkeys - All restrictions to editing the script have been removed - GDI+ and Graphic editors removed - Cleanup of script, stability greatly increased - Hotkeys no longer use _IsPressed they now use GUIAccelerator keys (with exception to a few) - Multiple scripts can be open - Form Builder buffers the open scripts and adds an asterisk * to scripts that have been modified - Rich Edit, GUIScrollbars, Dummy, and Updown are disabled for now until I can add them - GUI Menu controls cannot be created as of now but will be rendered in the editor - Undo and Redo actions in script mode and GUI mode added, the GUI undo and redo buffer is cleared switching between modes - The Undo and Redo buffers do not have a limit but are cleared when switching between modes or scripts - Undo and Redo actions do not work for controls that have no control handle - The Treeview now works as a Go to function for controls and functions in script mode - Form Builder now tries to preserve as much of the original content as possible, it will save whitespace in-between parameters and comments on controls - Treeview context menu reworked, much more responsive - Unicode support added File -> Encoding -> UTF-8 - Language support added, I added a couple of language files and used Google translate just so I could size my GUI's for different languages, I do not support what those language files say - Selecting a GUI in the Treeview in GUI mode will allow you to change the GUI's Handle, Position, Background Color, State, Cursor, Font, Font Size and Font Attributes - Auto Declare is no longer hiding in the settings, it is now on the top right and is a toggle between Off, Global and Local - Help File Lookup added (Ctrl + H), allows you to search selected text in the help file, Any variable will be searched and the first result will be displayed, any string will be searched as a keyword in the index - Added current script line, column, and selection length in the bottom left - Standard undeclared style constants are checked before script execution and the script will prompt if an undefined style constant is found - You can now toggle script whitespace, EOL characters, line numbers, margins and output in the View menu - View -> Toggle All Folds works as it does in SciTe, only base level folds are changed and the first fold found determines whether to expand or contract - Form Builder Settings redone - Bugs with submitting data and control selection have been fixed - Fixed problems with frequently called repetitive functions causing issues with large scripts - Fixed bugs with B, I, U and S font attribute buttons getting stuck and called when enter was pressed Update v1.0.7 - Help File Look-up hotkey changed to Ctrl+B - Replace hotkey changed to Ctrl+H - Changes to $SCN_MODIFIED so only text events are notified - Bookmarks added, Ctrl+M to add or delete a Bookmark from the current line - Edit -> Bookmarks -> Set Bookmark changes the currently selected Bookmark - Edit -> Clear Current Bookmarks deletes only the currently selected Bookmark - Allows you to change foreground and background colors of Bookmarks - Added F2 hotkey for Next Bookmark - Added Shift+F2 hotkey for Previous Bookmark - Fixed a bug that made it so script annotation did not show up for some people - Script errors and warnings now add a Bookmark on each line - Ctrl+E hotkey added to clear all Bookmarks and Annotations - Minor GUI tweaks - Fixed a bug with the GUI Style undo action - Undo and Redo actions for GUI windows will now update the window properties if the GUI is selected - F4 Hotkey no longer switches modes, switching modes is now F10 - F4 is to toggle next error or warning message, works like it does in SciTe, bookmarks the line and highlights the error in the console - Shift+F4 Hotkey added to toggle previous error or warning message - Shift+F5 Hotkey added to clear script output - Ctrl+F5 Hotkey added as SyntaxCheck Prod - Form Builder now performs a SyntaxCheck before entering GUI Mode and prompts on Error or Warning - Language Select Menu Added Settings -> Lanugage - Icons added to main menu - Languages added to all new menu items and msgbox's - Language Files updated for new data - Language Support added for Arabic, Chinese, Dutch, French, German, Hebrew, Japanese, Swedish, Thai, and Vietnamese [ Google Translate ] - Fixed bug with updating a language that made it look like ANSI and UTF-8 were both selected - Added redo button next to undo button - Font attribute buttons Bold, Italic, Underline and Strike-Out changed to labels Update v1.0.8 - Somehow a main function got deleted causing the script to crash on some changes - Fixed some issues with updating Languages Hotkeys Ctrl + N - New Blank Script Ctrl + G - New GUI Script Ctrl + O - Open Script Ctrl + Shift + S - Save As Ctrl + S - Save Esc - Close Open Script Alt + F4 - Exit Ctrl + Z - Undo Ctrl + Y - Redo Ctrl + X - Cut Ctrl + C - Copy Ctrl + V - Paste Ctrl + A - Select All Ctrl + W - Clear inline script annotation Ctrl + E - Clear inline script annotation and bookmarks Ctrl + F - Find Ctrl + F3 - Find Next Shift + F3 - Find Previous (doesn’t work yet) Ctrl + B - Help File Lookup F5 - Go Alt + F5 - Beta Run F7 - Build Ctrl + F7 - Compile F11 - Full screen F8 - Toggle Show/Hide Script Output Ctrl + I - Open Include Ctrl + H - Replace F1 - AutoIt Help File Ctrl + D - Duplicate Control Delete - Delete Control Ctrl + Shift + 8 - Toggle Show/Hide Script Whitespace Ctrl + Shift + 9 - Toggle Show/Hide Script EOL characters Ctrl - GUI Mode multicontrol selection F10 - Switch Modes F4 - Next Message Shift+F4 - Previous Message Shift+F5 - Clear Output Ctrl+M - Add Bookmark F2 - Next Bookmark Shift+F2 - Previous Bookmark Basic GUI Mode How To Create a Control - click a control on the left - click in the GUI you wish to add the control Left Click: Click and drag to auto resize the control Right Click: Creates the control at a standard size Select a Control - click inside the control or select it in the treeview Change a controls Data - First select the control - modify the controls data on the right, press enter to submit changes state, cursor, font and resizing update when you change the data - when modifying the data parameter the script recognizes if there is a variable in the data and will add quotes accordingly ex. data parameter = $data, End result in script: GUICtrlCreateButton($data, 50, 50, 100, 20) ex. data parameter = data, End result in script: GUICtrlCreateButton("data", 50, 50, 100, 20) ex. data parameter = "data"&$data, End result in script: GUICtrlCreateButton("data"&$data, 50, 50, 100, 20) Applying an Image to a control - select a control - control styles must be applied to some controls before adding an image - click the ... button next to the Image input in the Control Properties area in the bottom right - select the image you want to display, allows jpg, bmp, gif, ico and dll files - selecting a dll will open another prompt to choose which resource to display Control Grouping - multiple controls must be selected - press the group controls button - control grouping allows you to resize and move multiple controls at the same time, as of now groups are deleted when leaving GUI mode I only have a couple odds and ends to finish up before everything should be complete, I need to add Undo and Redo actions for copying and duplicating controls and a couple other minor things, eventually I want to try to add all of the UDF controls as well. If people are willing to translate the language file I would be very grateful, the ones I have right now are from Google translate, I only used them for testing and have no idea what they say. I want to thank Kip, Prog@ndy, Isi360 and all of the other contributors on this forum, without you guys i don't think i could have written this script. Please post any comments, problems or suggestions, BuckMaster * I only used one "magic number" on my main close case statement, only for faster locating, and i don't care. Form Builder Source.zip Form Builder.zip1 point -
Network Interface Info, Statistics, and Traffic
mesale0077 reacted to Ascend4nt for a topic
Network Interface Info, Statistics, and Traffic (incl. IP, TCP, UDP and ICMP) This is an example of getting and displaying Network Interface Information, Statistics and Traffic. Previously this was just a means to getting Network statistics (specifically IP, TCP, UDP, and ICMP), but now it includes Internet Interface information, as well as Interface-specific statistics. Since this UDF can be used in different ways, let me cover Statistics first: Network Statistics Information Stats example output To retrieve Statistics information, you can call one of the four _Network_xxxxStatistics() functions for IP, TCP, UDP, or ICMP Statistics. These functions accept 1 argument which specifies which protocol to use. Basically, zero is IPv4 and non-zero is IPv6. It defaults to IPv4 if no arguments. Here's the functions: Protocol Statistics Functions: _Network_IPStatistics() -> receives IP statistics _Network_TCPStatistics() -> TCP statistics _Network_UDPStatistics() -> UDP statistics _Network_ICMPStatistics() -> ICMP statistics - To get per-interface statistics requires 2 calls. One call is required to collect information on adapters into an array. Once this information is retrieved, multiple calls to _Network_InterfaceEntryInfo() can be made for each indexed network interface. Note that _Network_IPv4AdaptersInfo() is the only adapter/interface information function which doesn't get index information - so don't use it unless you want further interface information. The main UDF functions to use are: Network Adapter & Interface Functions: _Network_IPv4AdaptersInfo() -> Retrieves information on Physical IPv4 adapters _Network_IPv4AdaptersInfoEx() -> Retrieves much more info on Physical IPv4 adapters _Network_IPv4AddressTable() -> Retrieves information on IPv4 Interfaces _Network_IPAllAddressTable() -> Retrieves information on both IPv4 and IPv6 interfaces Network Statistics for a Given Interface: _Network_InterfaceEntryInfo() -> For a given interface index, retrieves statistics - The simplest way to get overall traffic is to use _Network_IPAllAddressTable() (or _Network_IPv4AddressTable() for IPv4 only) to collect an array of info about interfaces. This needs to be done only once. Then, to collect statistics, for each row in the interface array, call _Network_InterfaceEntryInfo() with $aIPAddressTable[$i][0] to get the statistics for that network interface. IMPORTANT: Note that for all statistics, the data received/sent are represented as 32-bit numbers, and subject to wraparound after 4GBs of data has been transferred. Network Interface Information Regarding Network Interface Information, nearly every function except those ending in xxStatistics(), will return various info regarding the network adapters or interfaces. Currently, IPv4 and IPv6 addresses are retrieved for the interface, as well as for Gateway, DHCP, DNS and WINS servers (there's some XP issues here as to which functions to use - see UDFs). The number of IP addresses (since there can be more than one assigned to each interface) is controlled via a parameter $bGetAllIPs. If this value is non-zero, multiple IP addresses are returned in a string separated by "|" (pipe symbol). Also note that the MAC/Physical Address is returned by most functions as well. These are properly formatted into a hex string in the form "01-23-45-67-89-ab". There is one issue with converting IPv6 addresses - on pre-Vista O/S's (Win XP I'm looking at you) WSAStartup must be called by the code. This is all handled internally, but if you have code that relies on WSAStartup/Cleanup, keep it in mind and let me know if I can better accommodate any potential conflicts. Further notes: - The TCP Statistics gives information about the number of segments sent/received, rather than the # of packets. I'm not totally clear on the association, however here's some links: What's the difference between a TCP segment and a TCP packet? Whats the difference between a Packet, Segment and Frame? - I'm not sure how segments, packets, or datagrams map to # of bytes, or what API functions I might use to figure this out. Any help there would be appreciated. Alternatives: While I have opened access to a lot of detailed network and performance information, there are alternatives - check out Netstat (-e for performance stats) or my >Performance Counters UDF's, which has a lot of varied stats (one example of these: >Network Usage). Following is the example, included in the ZIP file. Note there's a cr@pload of info dumped to the console, so you'll probably want to redirect output or copy-and-paste from the output console: ; ======================================================================================================== ; <NetworkStatsExample.au3> ; ; Example of reading and displaying Network Interface Information and Statistics ; (using <NetworkStatistics.au3> UDF) ; Statistics information, including IP, TCP*, UDP, and ICMP and internet interface traffic, ; are displayed in a 'Splash' window - with both IPv4 and IPv6 data separated ; ; Author: Ascend4nt ; ======================================================================================================== #include "_NetworkStatistics.au3" ; -------------------- HOTKEY FUNCTION & VARIABLE -------------------- Global $bHotKeyPressed = False Func _EscPressed() $bHotKeyPressed=True EndFunc ; -------------------- MAIN PROGRAM CODE -------------------- HotKeySet("{Esc}", "_EscPressed") Local $hSplash, $sSplashText ; Network Stats Local $aUDPStats, $aTCPStats, $aIPStats, $aICMPStats Local $aUDPv6Stats, $aTCPv6Stats, $aIPv6Stats, $aICMPv6Stats Local $aIPv4Adapters, $nAdapters Local $aIPv4AddrTable, $aIPAllAddrTable, $nInterfaces, $aNIEntryInfo Local $sSeparator = "-----------------------------------------" ; IP Stats: IPv4 and IPv6 For $i = 0 To 1 $aIPStats = _Network_IPStatistics($i) If @error Then ConsoleWrite("_Network_IPStatistics("&$i&") error: "&@error&", @extended="&@extended&@CRLF) ContinueLoop EndIf If $i Then ConsoleWrite("IP [IPv6] Stats:") Else ConsoleWrite("IP [IPv4] Stats:") EndIf ConsoleWrite( _ " [0] = IP Forwarding Status: [1 = Enabled, 2 = Disabled] : " & $aIPStats[0] & _ ", [1] = Default initial time-to-live (TTL) for datagrams : " & $aIPStats[1] & @CRLF & _ ", [2] = # Received Datagrams : " & $aIPStats[2] & _ ", [3] = # Received Datagrams w/Header errors : " & $aIPStats[3] & _ ", [4] = # Received Datagrams w/Address errors : " & $aIPStats[4] & @CRLF & _ ", [5] = # Forwarded Datagrams : " & $aIPStats[5] & _ ", [6] = # Received Datagrams w/Unknown Protocol : " & $aIPStats[6] & _ ", [7] = # Received Datagrams Discarded : " & $aIPStats[7] & @CRLF & _ ", [8] = # Received Datagrams Delivered : " & $aIPStats[8] & _ ", [9] = # Requested Outgoing Datagrams : " & $aIPStats[9] & _ ", [10] = # Outgoing Datagrams Discarded : " & $aIPStats[10] & @CRLF & _ ", [11] = # Transmitted Datagrams Discarded : " & $aIPStats[11] & _ ", [12] = # Datagrams w/o Routes that were Discarded : " & $aIPStats[12] & _ ", [13] = TimeOut for Reassembling Incoming Fragmented Datagrams : " & $aIPStats[13] & @CRLF & _ ", [14] = # Datagrams Requiring Reassembly : " & $aIPStats[14] & _ ", [15] = # Datagrams Successfully Reassembled : " & $aIPStats[15] & _ ", [16] = # Datagrams that Failed to be Reassembled : " & $aIPStats[16] & @CRLF & _ ", [17] = # Datagrams that were Fragmented Successfully : " & $aIPStats[17] & _ ", [18] = # Datagrams not Fragmented, and Discarded : " & $aIPStats[18] & _ ", [19] = # Fragments created (for Datagrams) : " & $aIPStats[19] & @CRLF & _ ", [20] = # of Interfaces : " & $aIPStats[20] & _ ", [21] = # of IP addresses associated with PC : " & $aIPStats[21] & _ ", [22] = # of Routes in the Routing table : " & $aIPStats[22] & _ @CRLF) ConsoleWrite($sSeparator & @CRLF) Next ; TCP Stats: IPv4 and IPv6 For $i = 0 To 1 $aTCPStats = _Network_TCPStatistics($i) If @error Then ConsoleWrite("_Network_TCPStatistics("&$i&") error: "&@error&", @extended="&@extended&@CRLF) ContinueLoop EndIf If $i Then ConsoleWrite("TCP [IPv6] Stats:") Else ConsoleWrite("TCP [IPv4] Stats:") EndIf ConsoleWrite( _ "[0] Rto Algorithm = " & $aTCPStats[0] & _ ",[1] Rto Min = " & $aTCPStats[1] & _ ",[2] Rto Max = " & $aTCPStats[2] & _ ",[3] #Max Connections = " & $aTCPStats[3] & _ ",[4] #Active Opens = " & $aTCPStats[4] & _ ",[5] #Passive Opens = " & $aTCPStats[5] & @CRLF & _ " [6] #Failed Connection Attempts = " & $aTCPStats[6] & _ ",[7] #Established Connections that were Reset = " & $aTCPStats[7] & _ ",[8] #Established Connections [current] = " & $aTCPStats[8] & @CRLF & _ " [9] #Recvd Segments = " & $aTCPStats[9] & _ ",[10] #Sent Segments = " & $aTCPStats[10] & _ ",[11] #Retransmitted Segments = " & $aTCPStats[11] & @CRLF & _ " [12] #Receive Errors = " & $aTCPStats[12] & _ ",[13] #Sent Segments with Reset Flag = " & $aTCPStats[13] & _ ",[14] #Connections = " & $aTCPStats[14] & _ @CRLF) ConsoleWrite($sSeparator & @CRLF) Next ; UDP Stats: IPv4 and IPv6 For $i = 0 To 1 $aUDPStats = _Network_UDPStatistics($i) If @error Then ConsoleWrite("_Network_UDPStatistics("&$i&") error: "&@error&", @extended="&@extended&@CRLF) ContinueLoop EndIf If $i Then ConsoleWrite("UDP [IPv6] Stats:") Else ConsoleWrite("UDP [IPv4] Stats:") EndIf ConsoleWrite( _ " [0] #Recvd Datagrams = " & $aUDPStats[0] & _ ",[1] #Discarded Datagrams [invalid port] = " & $aUDPStats[1] & _ ",[2] #Erroneous Datagrams = " & $aUDPStats[2] & @CRLF & _ " [3] #Sent Datagrams = " & $aUDPStats[3] & _ ",[4] #UDP Listener Entries = " & $aUDPStats[4] & _ @CRLF) ConsoleWrite($sSeparator & @CRLF) Next ; ICMP Stats: IPv4 and IPv6 For $i = 0 To 1 $aICMPStats = _Network_ICMPStatistics($i) If @error Then ConsoleWrite("_Network_ICMPStatistics("&$i&") error: "&@error&", @extended="&@extended&@CRLF) ContinueLoop EndIf ConsoleWrite("ICMP [IPv"&4+($i*2)&"] Stats:" & _ " [0] = # Incoming ICMP Messages : " & $aICMPStats[0] & _ ", [1] = # Incoming ICMP Errors : " & $aICMPStats[1] & _ ", [2] = # Outgoing ICMP Messages : " & $aICMPStats[2] & _ ", [3] = # Outgoing ICMP Errors : " & $aICMPStats[3] & _ @CRLF) ConsoleWrite($sSeparator & @CRLF) Next ; IPv4 Adapters Info (very basic info) _Network_IPv4AdaptersInfo() ConsoleWrite($sSeparator & @CRLF) ; IPv4 Adapters Info (comprehensive info) $aIPv4Adapters = _Network_IPv4AdaptersInfoEx() $nAdapters = @extended ConsoleWrite("# of Adapters: "&$nAdapters&@CRLF) For $i = 0 To $nAdapters - 1 ConsoleWrite("Adapter #"&$i+1&":" & _ " [0] Index #"& $aIPv4Adapters[$i][0] & _ ", [1] Type = " & $aIPv4Adapters[$i][1] & _ ", [2] DHCP Enabled Flag = " & $aIPv4Adapters[$i][2] & _ ", [3] WINS Enabled Flag = " & $aIPv4Adapters[$i][3] & _ ", [4] Physical [MAC] Address: " & $aIPv4Adapters[$i][4] & _ ", [5] (0) = " & $aIPv4Adapters[$i][5] & @CRLF & _ ", [6] Description: "& $aIPv4Adapters[$i][6] & _ ", [7] [Empty '']: " & $aIPv4Adapters[$i][7] & _ ", [8] Adapter/Service Name [GUID] = " & $aIPv4Adapters[$i][8] & _ ", [9] [Empty] = " & $aIPv4Adapters[$i][9] & _ ", [10] [Empty] = " & $aIPv4Adapters[$i][10] & @CRLF & _ ", [11] IPv4 Address(es): "& $aIPv4Adapters[$i][11] & _ ", [12] IP Address Mask(s): "& $aIPv4Adapters[$i][12] & @CRLF & _ ", [13] Gateway IPv4 Address(es): "& $aIPv4Adapters[$i][13] & _ ", [14] Gateway Address Mask(s) : "& $aIPv4Adapters[$i][14] & @CRLF & _ ", [15] DHCP IPv4 Address(es) = " & $aIPv4Adapters[$i][15] & _ ", [16] DHCP Address Mask(s) = " & $aIPv4Adapters[$i][16] & _ ", [17] DHCP LeaseObtained Time = " & $aIPv4Adapters[$i][17] & _ ", [18] DHCP LeaseExpires Time = " & $aIPv4Adapters[$i][18] & @CRLF & _ ", [19] Primary WINS Server IP = " & $aIPv4Adapters[$i][19] & _ ", [20] Primary WINS Server Address Mask = " & $aIPv4Adapters[$i][20] & _ ", [21] Secondary WINS Server IP(s) = " & $aIPv4Adapters[$i][21] & _ ", [22] Secondary WINS Server Address Mask(s) = " & $aIPv4Adapters[$i][22] & @CRLF) ConsoleWrite($sSeparator & @CRLF) Next ; IPv4 Interface Info alt #2 $aIPv4AddrTable = _Network_IPv4AddressTable() $nInterfaces = @extended ConsoleWrite(@CRLF) For $i = 0 To $nInterfaces - 1 ConsoleWrite("Adapter #"&$i+1&": [0] Interface Index # = " & $aIPv4AddrTable[$i][0] & _ ", [1] IPv4 Address = " & $aIPv4AddrTable[$i][1] & _ ", [2] Subnet Mask = " & $aIPv4AddrTable[$i][2] & _ ", [3] Broadcast Address = " & $aIPv4AddrTable[$i][3] & @CRLF & _ " [4] Max Reassembly Size = " & $aIPv4AddrTable[$i][4] & _ ", [5] Address Type/State = " & $aIPv4AddrTable[$i][5] & @CRLF) Next ConsoleWrite($sSeparator & @CRLF) ; IPv4 and IPv6 Interface Info (includes everything except Address Masks) ; params: 0 (IPv4 AND IPv6), 0 (don't get all IP's), 0 (don't include down-status interfaces) $aIPAllAddrTable = _Network_IPAllAddressTable(0, 0, 0) $nInterfaces = @extended ConsoleWrite($sSeparator & @CRLF) For $i = 0 To $nInterfaces - 1 ConsoleWrite("Interface #"&$i+1&": [0] Index #"& $aIPAllAddrTable[$i][0] & _ ", [1] Type = " & $aIPAllAddrTable[$i][1] & _ ", [2] Operational Status = " & $aIPAllAddrTable[$i][2] & _ ", [3] Flags = 0x" & Hex($aIPAllAddrTable[$i][3], 8) & _ ", [4] Physical [MAC] Address: " & $aIPAllAddrTable[$i][4] & _ ", [5] MTU = " & $aIPAllAddrTable[$i][5] & @CRLF & _ ", [6] Description: "& $aIPAllAddrTable[$i][6] & _ ", [7] Friendly Name: " & $aIPAllAddrTable[$i][7] & _ ", [8] Adapter/Service Name [GUID] = " & $aIPAllAddrTable[$i][8] & @CRLF & _ ", [9] Max Receive Speed [Vista+] = " & $aIPAllAddrTable[$i][9] & _ ", [10] Max Transmit Speed [Vista+] = " & $aIPAllAddrTable[$i][10] & @CRLF & _ ", [11] IPv4 Address(es): "& $aIPAllAddrTable[$i][11] & _ ", [12] IPv6 Address(es): "& $aIPAllAddrTable[$i][12] & @CRLF & _ ", [13] DNS IPv4 Address(es): "& $aIPAllAddrTable[$i][13] & _ ", [14] DNS IPv6 Address(es): "& $aIPAllAddrTable[$i][14] & @CRLF & _ ", [15] Gateway IPv4 Address(es) [Vista+]: "& $aIPAllAddrTable[$i][15] & _ ", [16] Gateway IPv6 Address(es) [Vista+]: "& $aIPAllAddrTable[$i][16] & @CRLF & _ ", [17] DHCP IPv4 Address(es) [Vista+]: "& $aIPAllAddrTable[$i][17] & _ ", [18] DHCP IPv6 Address(es) [Vista+]: "& $aIPAllAddrTable[$i][18] & @CRLF & _ ", [19] WINS IPv4 Address(es) [Vista+]: "& $aIPAllAddrTable[$i][19] & _ ", [20] WINS IPv6 Address(es) [Vista+]: "& $aIPAllAddrTable[$i][20] & @CRLF & _ ", [21] Connection Type [Vista+] = " & $aIPAllAddrTable[$i][21] & _ ", [22] Tunnel Type [Vista+] = " & $aIPAllAddrTable[$i][22] & @CRLF) ; Interface Statistics & Info for Given index $aNIEntryInfo = _Network_InterfaceEntryInfo($aIPAllAddrTable[$i][0]) ;~ ConsoleWrite("_Network_InterfaceEntryInfo return, @error = " & @error & ", @extended = " & @extended & @CRLF) ConsoleWrite("Interface #"&$i+1&" Entry Info: [0] Interface Index = " & $aNIEntryInfo[0] & _ ", [1] Interface Type = " & $aNIEntryInfo[1] & _ ", [2] Operational Status = " & $aNIEntryInfo[2] & _ ", [3] Admin Status = " & $aNIEntryInfo[3] & _ ", [4] Physical Address = " & $aNIEntryInfo[4] & _ ", [5] MTU [Max Trans. Unit] in bytes = " & $aNIEntryInfo[5] & @CRLF & _ ", [6] Description = " & $aNIEntryInfo[6] & _ ", [7] Interface Name = " & $aNIEntryInfo[7] & @CRLF & _ ", [8] Last change [1/100th second] = " & $aNIEntryInfo[8] & _ ", [9] Interface Speed [bps] = " & $aNIEntryInfo[9] & @CRLF & _ ", [10] # Recvd Data [in Octets] = " & $aNIEntryInfo[10] & _ ", [11] # Recvd Unicast Packets = " & $aNIEntryInfo[11] & _ ", [12] # Recvd Non-Unicast Packets = " & $aNIEntryInfo[12] & _ ", [13] # Recvd Packets Discarded [no error] = " & $aNIEntryInfo[13] & _ ", [14] # Recvd Packets Discarded [error] = " & $aNIEntryInfo[14] & _ ", [15] # Recvd Packets Discarded [unk. protocol] = " & $aNIEntryInfo[15] & @CRLF & _ ", [16] # Sent Data [in Octets] = " & $aNIEntryInfo[16] & _ ", [17] # Sent Unicast Packets = " & $aNIEntryInfo[17] & _ ", [18] # Sent Non-Unicast Packets = " & $aNIEntryInfo[18] & _ ", [19] # Sent Packets Discarded [no error] = " & $aNIEntryInfo[19] & _ ", [20] # Sent Packets Discarded [error] = " & $aNIEntryInfo[20] & @CRLF & _ ", [21] Transmit Queue Length [n/a] = " & $aNIEntryInfo[21] & @CRLF) ConsoleWrite($sSeparator & @CRLF) Next $hSplash=SplashTextOn("Network Usage Information", "", 520, 24 + (19 * 15) + ($nInterfaces * (5.5 * 15)), Default, Default, 16+4, "Lucida Console", 11) ; Start loop Do $aIPStats = _Network_IPStatistics() $aTCPStats = _Network_TCPStatistics() $aUDPStats = _Network_UDPStatistics() $aICMPStats = _Network_ICMPStatistics() $aIPv6Stats = _Network_IPStatistics(1) $aTCPv6Stats = _Network_TCPStatistics(1) $aUDPv6Stats = _Network_UDPStatistics(1) $aICMPv6Stats = _Network_ICMPStatistics(1) $sSplashText = StringFormat("%35s", "== TCP Stats ==") & @CRLF $sSplashText &= StringFormat("IPv4: [Segments] Recvd = %10u | Sent = %10u", $aTCPStats[9], $aTCPStats[10]) & @CRLF $sSplashText &= StringFormat("IPv6: [Segments] Recvd = %10u | Sent = %10u", $aTCPv6Stats[9], $aTCPv6Stats[10]) & @CRLF $sSplashText &= StringFormat("<Total Connections> IPv4: %10u | IPv6: %10u", $aTCPStats[14], $aTCPv6Stats[14]) & @CRLF $sSplashText &= @CRLF & StringFormat("%35s", "== UDP Stats ==") & @CRLF $sSplashText &= StringFormat("IPv4: [Datagrams] Recvd = %10u | Sent = %10u", $aUDPStats[0], $aUDPStats[3]) & @CRLF $sSplashText &= StringFormat("IPv6: [Datagrams] Recvd = %10u | Sent = %10u", $aUDPv6Stats[0], $aUDPv6Stats[3]) & @CRLF $sSplashText &= StringFormat("<Total Listeners> IPv4: %10u | IPv6: %10u", $aUDPStats[4], $aUDPv6Stats[4]) & @CRLF $sSplashText &= @CRLF & StringFormat("%35s", "== IP Stats ==") & @CRLF $sSplashText &= StringFormat("IPv4: [Datagrams] Recvd = %10u | Sent = %10u", $aIPStats[2], $aIPStats[9]) & @CRLF $sSplashText &= StringFormat("IPv6: [Datagrams] Recvd = %10u | Sent = %10u", $aIPv6Stats[2], $aIPv6Stats[9]) & @CRLF $sSplashText &= @CRLF & StringFormat("%35s", "== ICMP Stats ==") & @CRLF $sSplashText &= StringFormat("IPv4: [Messages] Recvd = %10u | Sent = %10u", $aICMPStats[0], $aICMPStats[2]) & @CRLF $sSplashText &= StringFormat("IPv6: [Messages] Recvd = %10u | Sent = %10u", $aICMPv6Stats[0], $aICMPv6Stats[2]) & @CRLF For $i = 0 To $nInterfaces - 1 ;~ $aNIEntryInfo = _Network_InterfaceEntryInfo($aIPv4AddrTable[$i][0]) ;~ $sSplashText &= @CRLF & StringFormat("%35s", "== IP " & $aIPv4AddrTable[$i][1] & " ==" ) & @CRLF $aNIEntryInfo = _Network_InterfaceEntryInfo($aIPAllAddrTable[$i][0]) If @error Then ConsoleWrite("_Network_InterfaceEntryInfo return, @error = " & @error & ", @extended = " & @extended & @CRLF) ExitLoop EndIf If $aIPAllAddrTable[$i][11] <> "" Then $sSplashText &= @CRLF & StringFormat("%40s", "== IPv4 " & $aIPAllAddrTable[$i][11] & " ==" ) & @CRLF Else $sSplashText &= @CRLF & StringFormat("%52s", "== IPv6 " & $aIPAllAddrTable[$i][12] & " ==" ) & @CRLF EndIf $sSplashText &= StringFormat("%45.56s", $aNIEntryInfo[6]) & @CRLF ; Octet *should* be the same as Bytes.. $sSplashText &= StringFormat("Data (Octets/Bytes): Recvd = %10u | Sent = %10u", $aNIEntryInfo[10], $aNIEntryInfo[16]) & @CRLF $sSplashText &= StringFormat("Unicast Packets: Recvd = %10u | Sent = %10u", $aNIEntryInfo[11], $aNIEntryInfo[17]) & @CRLF $sSplashText &= StringFormat("Non-Unicast Packets: Recvd = %10u | Sent = %10u", $aNIEntryInfo[12], $aNIEntryInfo[18]) & @CRLF Next $sSplashText &= @CRLF & StringFormat("%35s", "[ESC] Exits") & @CRLF ControlSetText($hSplash, "", "[CLASS:Static; INSTANCE:1]", $sSplashText) Sleep(500) Until $bHotKeyPressed NetworkStatistics.zip ~prev version. downloads: >100 Updates: 2013-07-11: Changed: _Network_IPv4AdaptersInfoEx() now returns all IP's (if requested) and Address Masks Fixed: WSALastError call possible crash with non-array variable Changed: _Network_IPAllAddressTable() now allows 'down' status interfaces to be returned Added: Some comments on development, info on getting additional stats in the UDF 2013-07-06: Added: Much more Adapter Information Changed: Example is now separate from the UDF Fixed some minor issues here and there Changed: Global Handle to IPHLPAPI.DLL is now contained in the UDF and used to speed up function calls Misc. Other fixes I didn't keep track of! 2013-07-02: Hotfix: Ipv6 indexing error Fixed: indexing, updated and enhanced output Changed: Various functions return arrays even if failure - this is to make XP pre-SP1 and also collection of IPv6 less troublesome. @error should still be checked on return though! Added: Adapter and Interface information and statistics collection 2013-06-20: Now covers all the 'p's - IP and ICMP now added1 point -
File Name: AutoIt v3.3.9.7 Beta File Submitter: Jon File Submitted: 12 Jul 2013 File Category: Beta AutoIt: - Added: @OSVersion supports Windows 8.1 - Added: Regular expressions (PCRE engine) now using the new native 16bit mode and also compiled with UCP/UTF support. - Fixed #1698: GUICtrlSetLimit(), limit 32767 - Changed: Lots of helpfile changes/fixes. - Changed: Default manifest file on AutoIt and compiled exes is set for "AsInvoker" and tagged with compatibility for Vista/Win7/Win8 and Win8.1. Aut2Exe: - Added: OS manifest options now include Windows 8.1. UDFs: - Added #2354: _ArrayTranspose to the Array UDF. - Changed: Array UDF now takes into consideration empty arrays. Click here to download this file1 point
-
gigi1, The $S_OK Global constant is defined in WinAPIConstants.au3 - as quick search just like the one I have done would have shown you. I suggest you change the name of the constant in your script. M23 P.S. And if you believe that using a variable named $s_OK rather then the string "OK" will make the script harder to understand, then you need to rethink your encryption strategy. But in accordance with my own directive above, we will go no further down that road in this thread. Edit: It is also defined in GUIListView.au3 but only as a Local constant.1 point
-
problem, Can you please explain this line: $request = _winhttpopenrequest($connect, "GET", "/captcha/captcha.php") Why do you want the CAPTCHA? M231 point
-
regread/copy?
olo reacted to JLogan3o13 for a topic
You mean REG command is external to AutoIt, right?1 point -
Text Selection Color Change
DatMCEyeBall reacted to Melba23 for a topic
DatMCEyeBall, In "real" English - as opposed to those appalling bastardised dialects spoken in our old colonies (including yours) - the "my" in that phrase (not sentence) refers to the person carrying out the defined action. An example to clarify: "DatMCEyBall is a wannabee grammar Nazi - and his continued posting about the written English of others is becoming annoying" Clear now? M231 point -
$ValueOfThisTopic = ($bMostlyArguing Or $bDiscussingArabic) ? -1 : 1 in the negatives i'm afraid... On a side note, C, C++ and D allow the result to be used as an LValue so that you can conditionally modify/assign values to different variables: (which ? x : y) += 51 point
-
1 point
-
I don't share this opinion. Arabic is a beautiful and very ornamentic script. Have you ever been to one of the arabic countries or south of spain?1 point
-
WinActivate ($My program)
steve20020 reacted to Queener for a topic
I no longer use notepad as notepad++ is the best. You can do some changes in these. #RequireAdmin is not needed, but I always like to use that. #RequireAdmin GOHERE() Func GOHERE() if WinExists("new 1 - Notepad++") Then sleep(500) WinActive("new 1 - Notepad++") send( "Test") Exit Else GOTHERE() EndIf EndFunc Func GOTHERE() Run("notepad.exe") sleep(500) WinActive("new 1 - Notepad++") send("test") Exit EndFunc1 point -
WinActivate ($My program)
steve20020 reacted to 0xdefea7 for a topic
Check this out: http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm1 point -
Good to see that it works. The code can be slightly optimized. You don't need DllStructGetPtr(): Func glReadPixels( $x, $y, $width, $height, $format, $type, $pixels ) DllCall( "opengl32.dll", "none", "glReadPixels", "int", $x, "int", $y, "int", $width, "int", $height, "uint", $format, "uint", $type, "struct*", $pixels ) EndFunc Local Static $iDump = 0 If $iDump = 0 Then Local $tBuffer = DllStructCreate( "byte[" & $iWidth * $iHeight * 3 & "]" ) glReadPixels( 0, 0, $iWidth, $iHeight, $GL_RGB, $GL_UNSIGNED_BYTE, $tBuffer ) Local $hFile = FileOpen( "image.data", 18 ) FileWrite( $hFile, DllStructGetData( $tBuffer, 1 ) ) FileClose( $hFile ) $iDump = 1 EndIfIf you have a small example that shows how you do that tile picking, I would like to see it. Regards Lars.1 point
-
New MVPs
DigitalFacade82 reacted to Melba23 for a topic
In case anyone had not noticed, I am happy to announce that we have three new MVPs: PhoenixXL, FireFox and kylomas. I am sure you will all join in with my hearty congratulations to them all. M231 point