Leaderboard
Popular Content
Showing content with the highest reputation on 11/30/2013 in all areas
-
Extended Message Box - New Version: 16 Feb 24
hudsonhock reacted to Melba23 for a topic
Are you annoyed by the limitations of the standard Windows message dialog created by MsgBox? Would you like to have coloured backgrounds and text? To choose the justification and font? Do you want to be able to place the message box other than in the centre of the screen? Centred on your GUI, for example, or at a particular location on screen? What about having user-defined text on as many buttons as you need? And user-defined icons? Or a visible countdown of the timeout? Finally, would you like to choose whether the message box has a button on your already too-crowded taskbar? If the answer to any of these questions is "YES" then the ExtMsgBox UDF is for you! [NEW VERSION] 16 Feb 24 Changed: Some additional functionality added to the "TimeOut" parameter of _ExtMsgBox: - A positive integer sets the EMB timeout as before. - A negative integer will double the size of the countdown timer if it is used. - A colon-delimited string (eg: "10:5") will set the normal EMB timeout (first integer) and will also initially disable the EMB buttons for the required period (second integer). New UDF and examples in the zip. Older version changes: ChangeLog.txt As always, I realise nearly all of the DLL calls in these UDFs could be made by using commands in other UDFs like WinAPI.au3 - but as with all my UDFs (which you can find in my sig below) I am trying to prevent the need for any other include files. The UDF and examples (plus StringSize) in zip format: ExtMsgBox.zip Courteous comments and constructive criticisms welcome - guess which I prefer! M231 point -
ZIP.au3 UDF in pure AutoIt
HouseRockerZz reacted to torels for a topic
Hi there! I just wrote a ZIP udf in AutoIt (without external files) which lets you create archives, fill them with files and folders and extract them to your computer these are the functions <<go to the last release's section and jump previous releases's posts>> ======================= Updated ======================= UPDATED 30/6/2008 UPDATED 24/9/2008 Fixed Various Bugs Added Wait Function to let the script sleep until the files havn't been zipped Changed Function Names new format is: _Zip_TheFunction() UPDATED 13/10/2008 _Zip_AddFolder() now changed in _Zip_AddFolderContents() New Function : _Zip_AddFolder() that now adds the whole folder creating a subdirectory in the zip file _Zip_Count() Bug Finally fixed UPDATED 6/11/2008 New Function : _Zip_CountAll() that counts all elements in the archive. Including SubDirectories UPDATED 28/11/2008 New Virtual Zipping Functions this is actually very cool stuff! Maybe useless, but cool. UPDATED 17/03/2009 Added _Zip_Delete($hZipFile, $hFilename, $flag = 1). Very slow but it works... It'll be improved FLAGS WORK! Here are the User CallTip Entries: _Zip_Create($FileName) Create Zip File. Required #include <Zip.au3> _Zip_AddFile($ZipFile, $File2Add, [$flag]) Add file to Zip Archive. Required #include <Zip.au3> _Zip_AddFolder($ZipFile, $Folder, [$flag]) Add folder to Zip Archive. Required #include <Zip.au3> _Zip_AddFolderContents($ZipFile, $Folder, [$flag]) Add folder's content to Zip Archive. Required #include <Zip.au3> _Zip_Delete($ZipFile, $hFileName, [$flag]) _Zip_UnzipAll($ZipFile, $DestPath, [$flag]) Extract all files from Zip Archive. Required #include <Zip.au3> _Zip_Unzip($ZipFile,$FileName, $DestPath, [$flag]) Extract file from Zip Archive. Required #include <Zip.au3> _Zip_Count($ZipFile) Count items in zip. Required #include <Zip.au3> _Zip_CountAll($ZipFile) Count All items in the Zip Archive Including SubDirectories. Required #include <Zip.au3> _Zip_List($ZipFile) List items in zip. Required #include <Zip.au3> _Zip_Search($ZipFile, $SearchString) Search a File in the Zip Archive. Required #include <Zip.au3> _Zip_SearchInFile($ZipFile, $SearchString) Search In each File of the Zip Archive. Required #include <Zip.au3> _Zip_VirtualZipCreate($ZipFile, $Path) Create a Virtual Zip. Required #include <Zip.au3> _Zip_VirtualZipDelete($VirtualZipHandle) Delete a Virtual Zip. Required #include <Zip.au3> Example Script ; Zip Example ; _________________________________ ; ; Zip UDF Example by torels_ ; _________________________________ #include "Zip.au3" Dim $Zip, $myfile $myfile = @DesktopDir & "\foo.au3" $Zip = _Zip_Create(@DesktopDir & "\zip_002.zip") ;Create The Zip File. Returns a Handle to the zip File _Zip_AddFile($Zip,$myfile) ;add $myfile to the zip archive _Zip_AddFolder($Zip,@desktopdir & "\Folder_001",4) ;Add a folder to the zip file (files/subfolders will be added) _Zip_AddFolderContents($Zip, @DesktopDir & "\MyFolder") ;Add a folder's content in the zip file MsgBox(0,"Items in Zip","there are " & _Zip_Count($Zip) & " items in " & $Zip) ;Msgbox Counting Items in $Zip MsgBox(0,"Items in Zip","there are " & _Zip_CountAll($Zip) & " Elements in " & $Zip) ;Msgbox Counting Elements in $Zip $search = _Zip_Search($Zip,"foo.au3") ;Returns an array containing the search results For $i = 0 to UBound($search) - 1 ; Print Each ConsoleWrite($search[$i]) & @LF ; Corresponding value Next ; In The Console $list = _Zip_List($Zip) ;Returns an array containing all the files in the zip file ConsoleWrite("============== ZIP Contents ============" & @LF) For $i = 0 to UBound($list) - 1 ConsoleWrite($list[$i] & @LF) ;Print Search Results in the console Next Exit Comments are welcome previous number of downloads: 1787 & a few more XD Zip.au31 point -
Chrome UDF
Velislav reacted to seangriffin for a topic
Chrome support for AutoIT is here! This UDF includes a Chrome Extension (http://developer.chrome.com/extensions/getstarted.html) and Native Messaging Host (http://developer.chrome.com/extensions/messaging.html#native-messaging-host) that integrate with a new Chrome UDF (Chrome.au3) to provide automation support for the Chrome browser. Several steps are required to install the Chrome Extension and Native Messaging Host prior to using the UDF. Please read the INSTALLATION section below. REQUIREMENTS: Windows XP 32-bit, Windows 7 32-bit or Windows 7 64-bit AutoIt3 3.2 or higher Chrome v29 or later (earlier versions are untested) AutoIT for Google Chrome (Chrome extension - see below) AutoIT Chrome Native Messaging Host (see below) INSTALLATION: STEP 1: Install the AutoIT extension into Chrome. Open the following link and download the file named AutoIT for Google Chrome.crx: https://docs.google.com/file/d/0B_6JmwNIIZ06enotRTVFNVdKOXM/edit?usp=sharing Note - you may be prompted to login with a Google account as this file is hosted on Google Drive. In your Chrome browser click on the Chrome menu, then select Tools -> Extensions. Drag the AutoIT for Google Chrome.crx file that you downloaded above, from Windows Explorer, into this page in Chrome. You should now see AutoIT for Google Chrome listed in the Extensions page in Chrome. Ensure that the Enabled checkbox next to AutoIT for Google Chrome is checked. Also make sure the Allow access to file URLs box is checked (very important to make EXAMPLE 2 work below)!! STEP 2: Install the AutoIT Chrome Native Messaging Host. Open the following link and download the file named autoit_chrome_native_messaging_host_install.exe: https://docs.google.com/file/d/0B_6JmwNIIZ06eDgxaVJPNUNxa28/edit?usp=sharing Note - you may be prompted to login with a Google account as this file is hosted on Google Drive. Run this file (autoit_chrome_native_messaging_host_install.exe). An installation window will display. Click the Install button. The window will display "Completed" and you can click the Close button. STEP 3: Install the Chrome UDF into AutoIT. Scroll to the DOWNLOAD section below, and save the Chrome.au3 file into your AutoIT Include folder (C:Program FilesAutoIt3Include). Please close your Chrome browser once you've completed these steps. LIST OF FUNCTIONS: EXAMPLE #1: This following example starts up Chrome and navigates to the URL http://www.december.com/html/demo/form.html. It then automatically completes the HTML form in this page (a series of text, radio, and checkbox input elements and select elements) and clicks the Send this survey button. The script waits for the next page to load, and retrieves the various elements from the page to the AutoIT console. chrome_example.au3 EXAMPLE #2: The following is an example of the automation of an offline HTML page (file URL). First, download the file named chrome_udf_example_2.html to your C: folder: https://docs.google.com/file/d/0B_6JmwNIIZ06SWduMjZGTVViNlU/edit?usp=sharing Then run the following AutoIT script: chrome_example_2.au3 Note that you must have checked the Allow access to file URLs box in the Chrome extension to make this work! DOWNLOAD: Latest Version - v0.5 (29/09/13) Chrome.au31 point -
Command Prompt
MadaraUchiha reacted to johnmcloud for a topic
So many examples so i'll put mine: #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <Constants.au3> #include <GuiEdit.au3> #include <Misc.au3> Global $SEND_Line = "", $DOS, $hDLL = DllOpen("user32.dll") $hGUI = GUICreate("C:\WINDOWS\system32\cmd.exe", 600, 300, -1, -1) $hEdit = GUICtrlCreateEdit("johnmcloud TEST Version" & @CRLF & @CRLF, 0, 0, 600, 300, BitOR($WS_VSCROLL, $ES_AUTOVSCROLL, $ES_WANTRETURN)) GUICtrlSetFont(-1, 10, 400, 0, "Lucida Console") GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW) $DOS = Run(@ComSpec, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD + $STDIN_CHILD) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch $DOS_Stdout = Oem2Ansi(StdoutRead($DOS)) $DOS_Stderr = Oem2Ansi(StderrRead($DOS)) $TMP_Line = GUICtrlRead($hEdit) If $DOS_Stdout Or $DOS_Stderr Then If $DOS_Stdout <> $SEND_Line Then If StringLen($DOS_Stderr) > 0 Then $DOS_Stdout = StringSplit($DOS_Stdout, @CRLF) _GUICtrlEdit_AppendText($hEdit, $DOS_Stderr & @CRLF & $DOS_Stdout[5]) Else _GUICtrlEdit_AppendText($hEdit, $DOS_Stdout) EndIf Else If $DOS_Stderr <> $SEND_Line Then _GUICtrlEdit_AppendText($hEdit, $DOS_Stderr) EndIf EndIf If _IsPressed("0D", $hDLL) Then $SEND_Line = StringMid($TMP_Line, StringInStr($TMP_Line, @CRLF, 0, -2)) $SEND_Line = StringMid($SEND_Line, StringInStr($SEND_Line, ">") + 1) StdinWrite($DOS, $SEND_Line) Sleep(200) EndIf WEnd ProcessClose($DOS) Func Oem2Ansi($Text) Local $aText = DllCall("user32.dll", "Int", "OemToChar", "str", $text, "str", "") Return $aText[2] EndFunc ;==>Oem2Ansi It's not perfect but have want the OP like, the copyright1 point -
Ray casting with AutoIt
DeltaRocked reacted to UEZ for a topic
Looks very cool! I'm curious to see how you want to implement textures with GDI+. Btw, long time ago Eukalyptus coded a prototype of 3D Wolfenstein with textures -> Prototype 3D Wolfenstein in AutoIt (video only)! Br, UEZ1 point -
Good job, thank you. Any hope of getting TCPConnect()'s timeout fixed?1 point