Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/24/2014 in all areas

  1. ImageSplitter v1.0.0.7 ImageSplitter split an image into pieces that can be used - for collage art. - for website optimisation (speed up the preview of images) - for printing purposes (big poster) - for create a puzzle. Load an image by menu or by drag&drop (jpg, gif, png and bmp are supported) Choose a format and select Columns and Rows numbers you want. Once Split Image processing is finished a folder with all splitted image parts will be opened. Parts of image are from left to right and from top to bottom. Button was made online with chimply.com the easy and free buttons generator ! ChangeLog version 1.0.0.7 : DPI Resolution can be preserved as original or changed. Multi files Split is now possible ( Only by Menu - Open - Multi files Split) previous downloads : 189 ImageSplitter v1.0.0.7.au3 is available in the Download Section Hope you like it !
    2 points
  2. jguinch

    Lottery - Challenge

    OK, I have 4 lines, with error checks, using the ternary operator (of course) ! While @error = 0 Local $comp[] = [ ( Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) ) , SetError( ( UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){0}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){1}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){2}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){3}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){4}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){5}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){6}([^,]+).*", ",$1,"), 3 ) ) = 7 ) ? 1 : 0 ) ] WEnd Local $a[] = [ InputBox("Lottery", "Enter your numbers from 1 to 49, separates by a comma (ex : 1,5,10,37,15,43,2)", "1,2,3,4,5,6,7", "", 500, 150) , ( StringRegExp($a[0], "^(([1-9]|([1-4]\d)),){6}([1-9]|([1-4]\d))$") ) ? 1 : (0 * MsgBox(16, "Lottery", "You must enter 7 numbers, separate by a comma")) , (($a[1] = 0) ? 0 : (((UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){0}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){1}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){2}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){3}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){4}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){5}([^,]+).*", ",$1,"), 3 ) ) + UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){6}([^,]+).*", ",$1,"), 3 ) ) ) = 7 ) ? 1 : 0 * MsgBox(16, "Lottery", "You cannot choose a same number more than one time") ) ) , StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){0}([^,]+).*", ",$1,") ) + StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){1}([^,]+).*", ",$1,") ) + StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){2}([^,]+).*", ",$1,") ) + StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){3}([^,]+).*", ",$1,") ) + StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){4}([^,]+).*", ",$1,") ) + StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){5}([^,]+).*", ",$1,") ) + StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){6}([^,]+).*", ",$1,") ) , (( $a[2] = 0 )? 0 : MsgBox(0, "", "You " & (( $a[3] = 7 ) ? "win" : "loose" ) & @CRLF & @CRLF & "Computer choice : " & $comp[0] & @CRLF & "Your choice : " & $a[0] & @CRLF & @CRLF & "You found " & $a[3] & " good numbers" ) ) ] For more visibility, with underscores : While @error = 0 Local $comp[] = [ ( Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) & "," & Random (1, 49, 1) ) , _ SetError( ( _ UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){0}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){1}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){2}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){3}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){4}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){5}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($comp[0], ",", ",,") & "," , StringRegExpReplace($comp[0] , "(?:[^,]+,){6}([^,]+).*", ",$1,"), 3 ) ) = 7 ) ? 1 : 0 ) ] WEnd Local $a[] = [ InputBox("Lottery", "Enter your numbers from 1 to 49, separates by a comma (ex : 1,5,10,37,15,43,2)", "1,2,3,4,5,6,7", "", 500, 150) , _ ( StringRegExp($a[0], "^(([1-9]|([1-4]\d)),){6}([1-9]|([1-4]\d))$") ) ? 1 : (0 * MsgBox(16, "Lottery", "You must enter 7 numbers, separate by a comma")) , _ (($a[1] = 0) ? 0 : _ (((UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){0}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){1}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){2}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){3}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){4}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){5}([^,]+).*", ",$1,"), 3 ) ) + _ UBound( StringRegExp( "," & StringReplace($a[0], ",", ",,") & "," , StringRegExpReplace($a[0] , "(?:[^,]+,){6}([^,]+).*", ",$1,"), 3 ) ) ) = 7 ) ? 1 : 0 * MsgBox(16, "Lottery", "You cannot choose a same number more than one time") ) ) , _ StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){0}([^,]+).*", ",$1,") ) + _ StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){1}([^,]+).*", ",$1,") ) + _ StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){2}([^,]+).*", ",$1,") ) + _ StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){3}([^,]+).*", ",$1,") ) + _ StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){4}([^,]+).*", ",$1,") ) + _ StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){5}([^,]+).*", ",$1,") ) + _ StringRegExp("," & $comp[0] & ",", StringRegExpReplace($a[0] , "(?:[^,]+,){6}([^,]+).*", ",$1,") ) , _ (( $a[2] = 0 )? 0 : _ MsgBox(0, "", "You " & (( $a[3] = 7 ) ? "win" : "loose" ) & @CRLF & @CRLF & "Computer choice : " & $comp[0] & @CRLF & "Your choice : " & $a[0] & @CRLF & @CRLF & "You found " & $a[3] & " good numbers" ) _ ) _ ] Is this OK ?
    2 points
  3. 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
  4. mLipok

    ACROBAT Error

    Windows 7 Pro 64bit Acrobat Reader 9.5.3 When I use Global $o_AutoIt_MyErrFunc = ObjEvent("AutoIt.Error", "_AutoIt_MyErrFunc") $oPDF = ObjCreate("AcroPDF.PDF.1") Func _AutoIt_MyErrFunc() ; Com Error Handler $s_error_log = _ "$o_AutoIt_MyErrFunc.number is: " & @TAB & $o_AutoIt_MyErrFunc.number & @CRLF & _ "$o_AutoIt_MyErrFunc.windescription:" & @TAB & $o_AutoIt_MyErrFunc.windescription & @CRLF & _ "$o_AutoIt_MyErrFunc.description is: " & @TAB & $o_AutoIt_MyErrFunc.description & @CRLF & _ "$o_AutoIt_MyErrFunc.source is: " & @TAB & $o_AutoIt_MyErrFunc.source & @CRLF & _ "$o_AutoIt_MyErrFunc.helpfile is: " & @TAB & $o_AutoIt_MyErrFunc.helpfile & @CRLF & _ "$o_AutoIt_MyErrFunc.helpcontext is: " & @TAB & $o_AutoIt_MyErrFunc.helpcontext & @CRLF & _ "$o_AutoIt_MyErrFunc.lastdllerror is: " & @TAB & $o_AutoIt_MyErrFunc.lastdllerror & @CRLF & _ "$o_AutoIt_MyErrFunc.scriptline is: " & @TAB & $o_AutoIt_MyErrFunc.scriptline & @CRLF & _ "$o_AutoIt_MyErrFunc.retcode is: " & @TAB & $o_AutoIt_MyErrFunc.retcode & @CRLF & @CRLF ConsoleWrite($s_error_log) EndFunc ;==>_AutoIt_MyErrFunc Then I take back that info in console Anybody know why ?
    1 point
  5. mikell

    Lottery - Challenge

    Interesting "egg of Columbus" concept, but the error checking for the inputbox is still missing Another egg to do this in less than 3 lines ?
    1 point
  6. Yes fast but a bit gourmand in cpu. Thanks for your feedback !
    1 point
  7. Yes, like a 2d array. You can do something like For y = 0 to YY For x = 0 to XX Copy image to main gfx handle at position x, y, w/XX, h/YY Next Next more easily. Br, UEZ
    1 point
  8. Check the Helpfile for _VersionCompare(). Jos
    1 point
  9. jdelaney

    Lottery - Challenge

    Tricky ^^. Good call, though, czardas.
    1 point
  10. MallikarjunReddy, This works for me: GUICtrlCreateIcon ("user32.dll", -3, 1, 20) M23
    1 point
  11. Here is little help: $sOuterHtml = _IEPropertyGet($oIE, "outerhtml") StringRegExp($sOuterHtml,'(?is)<span class="Texto_Negrito" id="lblTotal">(.*)</span>',3)
    1 point
  12. Here is an example script to retrieve title, Author, Keywords, Subject, Creator, Producer, CreationDate: $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler $sFilePath = "C:tempTest.pdf" $oApp = ObjCreate("AcroExch.App") ; start Adobe Acrobat $oDoc = ObjCreate("AcroExch.AVDoc") ; connect to Ac Viewer If $oDoc.Open($sFilePath, "") Then ; open the file $oPDDoc = $oDoc.GetPDDoc $sAuthor = $oPDDoc.GetInfo("Author") $sTitle = $oPDDoc.GetInfo("Title") $sKeywords = $oPDDoc.GetInfo("Keywords") $sSubject = $oPDDoc.GetInfo("Subject") $sCreator = $oPDDoc.GetInfo("Creator") $sProducer = $oPDDoc.GetInfo("Producer") $sCreationDate = $oPDDoc.GetInfo("CreationDate") MsgBox(64, "PDF Info", "Author: " & $sAuthor & @CRLF & _ "Title: " & $sTitle & @CRLF & _ "Subject: " & $sSubject & @CRLF & _ "Keywords: " & $sKeywords & @CRLF & _ "Creator: " & $sCreator & @CRLF & _ "Producer: " & $sProducer & @CRLF & _ "CreationDate: " & $sCreationDate) EndIf $oApp.exit() ; close process ; release objects $oDoc = 0 $oApp = 0 $oPDDoc = 0 ; This is my custom defined error handler Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Endfunc A good reference for Acrobat X.
    1 point
×
×
  • Create New...