Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/23/2012 in all areas

  1. Beege

    Snipster - Updated 9/13/11

    Current Version - 1.6 Snipster is a place holder for all your common or uncommon autoit code that you want to be quickly accessible when your writing scripts. It is built to work along side SciTE, but can be used on its own also. Forever I used Gary Frosts cSnippet and was very happy with it, but for a while now the version that comes with autoit doesnt really work (one of my reasons for writing this). Snipster does a lot of the original features cSnippet did and many more. Some of these features include: Create new snippet from code selected in SciTECreate new snippet from code on ClipboardSend Snippet to ClipboardSend Snippet to SciTEEdit, Delete, Create New SnippetsOpen Snippet in SciTESome new features include:Syntax HighlightingCustomizable Hotkeys for the features given aboveLaunch Snippet (x86 or x64 preference)Extra docking methodsResizeable windows that automatically snap to each other and desktop edgesImport all snippets from cSnippet More Snapshots: A little bit about how the program functions.. The syntax highlighting works by generating a RTF (Rich Text File) from the .au3 (snippet file). All of the syntax highlighting is done in a separate process so that it doesn't slow down the main program. Any time you select a different snippet, the program checks its RTF folder (hidden folder located @scripdir) to see if a RTF file exists for the selected snippet. If it does the RTF file is loaded. If not the .au3 file will be loaded and a message is sent to the syntax converter process to generate the RTF file. If the generator is busy it will be added to a queue. When the RTF file is complete a message will be sent back to the main program telling it that the RTF file is ready. If you are still viewing that same snippet the program will automatically switch to the newly generated RTF. This automatic switching Im talking about really worked out well I think. Even when your scrolling, the switch happens pretty seamlessly. Any kind of feedback will be most appreciated. I want to know about bugs, things you like, things you didn't like, things you would like. Seriously dont hold back and thanks for looking. Binary Snipster_binary.html Source Code Snipster_source.html Note: The .html links are just to help me keep track of downloads. Open the .html file and a download dialog will display. Special Thanks go to: Yashied - All hiswonderul UDF's (TVExplorer, Restart, HotKeyInput used here) Ward - his MemoryDll and Hash Functions trancexx - her MailSlot UDF MrCreatoR - his original HTML Syntax Highlighter code that inspired my RTF Highlighter Gary Frost - cSnippet Updates 6/13/11 - Updated Wards MemoryDLL 6/13/11 - Added Drag and Drop for treeview. Any .au3 file you want to add just drop it on the treeview. - Changed to different version of Wards MD5. MemoryDll no longer needed. 6/14/11 - Fixed bug in syntax highlighter that was copying and adding first line of file to end of script6/21/11 - Rewrote syntax converter. This greatly increased speed and color syntax "consistancy." - Fixed bug that was not coloring Function Keyword if it was the very first word of a script. 6/23/11 - Still had bug with function keyword being first. Think I got it this time..9/10/11 - Made changes to the way edit and treeview windows hide themselves. - Added window position checks at startup and settings gui. - Fixed toolbar icons index numbers for win xp. (Thanks Tlem) 9/13/11 - Added cSnippet import function- Added About Box - Changed "Delete Snippet warning" default value to true
    1 point
  2. Update : Version 1.0.0.1 Optimized whole code, added redim step var. Hi, I had to create Excel files for my needs, but I wondered how to do it because xlsx files are not raw editable; so I searched for a way do it. Excel can open multiple files type, and the XML is a good way to do it so here it is. It creates an Excel XML file, with which you will be able to : -Create Rows -Create Cells and set it's color -Set column width -Set global text horizontal align -Set XML author -Set XML creation date -Set XML compagny And of course you can easily add features. Here is an example : #include "Excel_XML.au3" $iRow = _ExcelXML_Row_Add() _ExcelXML_Column_SetWidth(1, 100) _ExcelXML_Cell_Add($iRow, "Row 1, Cell 1") _ExcelXML_Column_SetWidth(2, 200) _ExcelXML_Cell_Add($iRow, "Column width set to 200px") $iRow = _ExcelXML_Row_Add() $iCell = _ExcelXML_Cell_Add($iRow, "Cell color red") _ExcelXML_Cell_SetColor($iCell, 0xFF0000) _ExcelXML_Cell_Add($iRow, "Excel XML UDF") $hFile = FileOpen(@ScriptDir & "\Excel_XML test.xml", 2) FileWrite($hFile, _ExcelXML_Assemble()) FileClose($hFile) _ExcelXML_Destroy() And what you are waiting for : Excel_XML.au3 (Previous : 53 downloads) Enjoy !
    1 point
  3. Since there are WAY to many posts on how to SRE something I thought I would create a nice little tester. This thing does SRE and SRER. Loads files to test. Gets internet content to test. And more! Here it is: SRETesterV2.1.au3 Prev DL - 211 Enjoy!
    1 point
  4. This UDF is now part of AutoIt since 3.3.12.0. New versions of Microsoft Office have been released since the last changes were made to the Excel UDF. The new extensions (e.g. xlsx) are not (fully) supported, new functions are missing etc. The rewrite of the Excel UDF delivers changes in the following areas: Works with as many instances of Excel as you like - not just one Works with any Workbook - not just the active one Works with any Worksheet - not just the active one Only does what you tell it to do - no implicit "actions" Only one function to read from a cell or a range Only one function to write a string, an 1D or 2D array to a cell or a range Support for every file format Excel supports Speed enhancements when transferring data from/to an Excel sheet (20 - 100 times faster) 2014-03-22 - Beta 5 Known bugs None The example scripts have been tested with Excel 2010 and AutoIt 3.3.10.2 on Windows 7. You need to run the scripts with the latest AutoIt production version (3.3.10.x)! Please test with Excel 2003 and Excel 2007 and post changes you need/want to see in the next beta version! Excel Rewrite Beta 5.zip has been removed as it is now part of AutoIt since 3.3.12.0. (627 downloads) History.txt
    1 point
  5. BrewManNH

    break out of do/until

    You're missing an EndIf
    1 point
  6. water

    break out of do/until

    Put the Sleep in your loop and reduce it to Sleep(1000) so it waits for a second and then checks the color again. If TimerDiff > 18000000 then exit the loop.
    1 point
  7. BrewManNH

    break out of do/until

    That will never work. This might. Local $begin = TimerInit() Do If TimerDiff($begin) >= 1800000 Then ExitLoop Until PixelGetColor(1120, 800) = "0x00FF00"
    1 point
  8. water

    break out of do/until

    You then have two conditions to exit the loop if met: expression and timer. Have a look at TimerInit/TimerDiff.
    1 point
  9. @FireFox Done: #include <File.au3> Local $sScriptPath = FileOpenDialog("select au3", @ScriptDir, "AutoIt3 Script (*.au3)", 3) If @error Then Exit -1 If FileExists($sScriptPath & "_Debug.au3") Then FileDelete($sScriptPath & "_Debug.au3") EndIf Local $aLines, $sOutPut = "Global $__iLineNumber=0" & @CRLF Local $blSkipNextLine = False Local $iLine = 1, $sCurrentLine, $sFunc = "", $sIndent = "" _FileReadToArray($sScriptPath, $aLines) While $iLine <= $aLines[0] $sCurrentLine = $aLines[$iLine] $sLineStripWS = StringStripWS($aLines[$iLine], 3) If StringInStr($sLineStripWS, "EndFunc", 0, 1, 1, 7) Then $sFunc = "" EndIf If StringInStr($sLineStripWS, "#", 0, 1, 1, 1) Or StringInStr($sLineStripWS, ";", 0, 1, 1, 1) Or _ StringInStr($sLineStripWS, "Select", 0, 1, 1, 6) Or StringInStr($sLineStripWS, "Switch", 0, 1, 1, 6) Or _ StringInStr($sLineStripWS, "EndSelect", 0, 1, 1, 9) Or StringInStr($sLineStripWS, "EndSwitch", 0, 1, 1, 9) Or _ StringInStr($sLineStripWS, "EndIf", 0, 1, 1, 5) Or StringInStr($sLineStripWS, "Next", 0, 1, 1, 4) Or _ StringInStr($sLineStripWS, "WEnd", 0, 1, 1, 4) Or StringInStr($sLineStripWS, "Exit", 0, 1, 1, 4) Or _ StringInStr($sLineStripWS, "EndFunc", 0, 1, 1, 7) Or StringLen($sLineStripWS) = 0 Then $sOutPut &= $sCurrentLine & @CRLF $iLine += 1 ContinueLoop EndIf If StringInStr($sLineStripWS, "Func", 0, 1, 1, 4) Then $sFunc = $sCurrentLine EndIf If $blSkipNextLine Then $blSkipNextLine = False Else $sIndent = "" While StringIsSpace(StringLeft($sCurrentLine, StringLen($sIndent) + 1)) $sIndent = StringLeft($sCurrentLine, StringLen($sIndent) + 1) WEnd ;$sOutPut &= "$__iLineNumber=" & $iLine & " & ': " & StringReplace($sCurrentLine, "'", '"') & "'" & @CRLF ;If $sFunc Then ;$sOutPut &= $sIndent & "$__iLineNumber=" & $iLine & ' & " - " & "' & $sFunc & '"' & @CRLF $sOutPut &= $sIndent & "$__iLineNumber=" & $iLine & ' & " - " & ' & "'" & _TruncatePath(StringReplace($sLineStripWS, "'", '"'), 300) & "'" & @CRLF ;Else ; $sOutPut &= $sIndent & "$__iLineNumber=" & $iLine & @CRLF ;EndIf EndIf $sOutPut &= $sCurrentLine & @CRLF If StringRight($sCurrentLine, 2) = " _" Then $blSkipNextLine = True EndIf $iLine += 1 WEnd FileWrite($sScriptPath & "_Debug.au3", $sOutPut) Func _TruncatePath($sPath, $iValue) Local $sRet = DllCall("Shlwapi.dll", "BOOL", "PathCompactPath", "int", 0, "str", $sPath, "uint", $iValue) Return $sRet[2] EndFunc ;==>_TruncatePath I added the following line to have at least the first 300 characters corresponding to the original line of the program! _TruncatePath(StringReplace($sLineStripWS, "'", '"'), 300) The result is this: Have patience, is still in progress... Are more new stuff, wait! Thank you! JS
    1 point
  10. JohnOne, Try this one from Webdings. #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $cButton = GUICtrlCreateButton("2", 10, 10, 80, 30) GUICtrlSetFont(-1, 14, 400, 0, "Webdings") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23
    1 point
  11. PunProgram, Please read the Forum Rules - particularly the bit about not discussing Keyloggers and other forms of malware - before you post again. Thread locked. M23
    1 point
  12. DaleHohm

    Catching IE download.

    I have tested this. The following script will prove it to you. Perhaps you are seeing a different error. #include <IE.au3> $oIE = _IECreate("[url="http://www.autoitscript.com"]www.autoitscript.com[/url]") MsgBox(0, "Set Mode", "Change to compatability mode, or not.") $oIE.document.parentWindow.eval('alert(document.documentMode);') $oIE.document.parentWindow.eval("var oXHR = new XMLHttpRequest();") $oXHR = $oIE.document.parentWindow.eval("oXHR;") MsgBox(0, "Test Object", "isObj($oXHR) = " & IsObj($oXHR)) Also, I have tried adding the meta tag to set compatability mode, but it does not appear to change the browser mode after load: #include <IE.au3> $oIE= _IECreate("[url="http://www.autoitscript.com"]http://www.autoitscript.com[/url]") ConsoleWrite($oIE.document.documentMode & @CRLF) $o_head = _IETagNameGetCollection($oIE, "head", 0) $o_element = $oIE.document.createElement('meta') $o_element.httpEquiv = 'X-UA-Compatible' $o_element.content = "IE=7" $o_head.insertBefore($o_element, $o_head.firstChild) ConsoleWrite($oIE.document.documentMode & @CRLF) So, currently the only ways I know to affect compatability mode are to use the IE UI and set all sites to compatability mode, set specific sites to compatability mode or to automate the IE UI to set the current page to compatability mode. Dale
    1 point
×
×
  • Create New...