Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/15/2013 in all areas

  1. BinaryToAu3Kompressor v1.0.5.4 It's now possible to see the best compression ratio using LZMA, LZNT and Base64 compressions with differents combinations. Nothing too complicate, you drag'n drop a file on the picture and script Test all compression types and return the ratios. ( Test duration depends of file size, slowest compression is LZNT, but all decompressions are fast ) Free to you after, to choose the compression(s) you want... Yes, LZMA needs a dll ( embedded & compressed in script ) but brings a powerfull compression. It opens scite with your file compressed to an au3 script with or without decompression function as you want. Hold Left Shift key when clicking button for just copy script to clipboard. Use the 3 compressions at a time works but doesn't give a good ratio, that's why i don't display it. Usefull for little files you want include in your scripts ! No externals files needed, they are already in script. Previous downloads : 1103 Source and Executable BinaryToAu3Kompressor will be added to the next version of >SciTEHopper Thanks to Ward for his >Base64.au3 and LZMA.au3, and trancexx for his >LZNT functions and his >Base64Decode function.
    2 points
  2. If you're going to use 2 GUI's I'd suggest losing the second While loop because it's going to block everything in the first GUI until you close the 2nd GUI. Then you should be using GUIGetMsg(1) to return an array with more information, which is important because it will tell you which GUI it is getting the messages from and you can act on that information to make it so both GUIs are still able to be controlled.
    1 point
  3. The wiki has a great tutorial about how to write multi GUI scripts.
    1 point
  4. ; #FUNCTION# ==================================================================================================================== ; Name...........: _RecFileListToArray ; Description ...: Lists files andor folders in a specified path with optional recursion to defined level and result sorting ; Syntax.........: _RecFileListToArray($sPath[, $sInclude_List = "*"[, $iReturn = 0[, $iRecur = 0[, $iSort = 0[, $iReturnPath = 1[, $sExclude_List = ""[, $sExclude_List_Folder]]]]]]]) ; Parameters ....: $sPath - Initial path used to generate filelist. If path ends in then folders will be returned with an ending ; $sInclude_List - Optional: filter for included results (default "*"). Multiple filters must be separated by ";" ; $iReturn - Optional: specifies whether to return files, folders or both and omits those with certain attributes ; 0 - Return both files and folders (Default) ; If non-recursive Include/Exclude_List applies to files and folders ; If recursive Include/Exclude_List applies to files only, all folders are searched unless excluded using $sExclude_List_Folder ; 1 - Return files only - Include/Exclude_List applies to files only, all folders searched if recursive ; 2 - Return folders only - Include/Exclude_List applies to folders only for searching and return ; Add one or more of the following to $iReturn to omit files/folders with that attribute ; + 4 - Hidden files and folders ; + 8 - System files and folders ; + 16 - Link/junction folders ; Note: Uses a different search algorithm and takes approx 50% longer ; $iRecur - Optional: specifies whether to search recursively in subfolders and to what level ; 1 - Search in all subfolders (unlimited recursion) ; 0 - Do not search in subfolders (Default) ; Negative integer - Search in subfolders to specified depth ; $iSort - Optional: sort ordered in alphabetical and depth order ; 0 - Not sorted (Default) ; 1 - Sorted ; 2 - Sorted with faster algorithm (assumes files sorted within each folder - requires NTFS drive) ; $iReturnPath - Optional: specifies displayed path of results ; 0 - File/folder name only ; 1 - Relative to initial path (Default) ; 2 - Full path included ; $sExclude_List - Optional: filter for excluded results (default ""). Multiple filters must be separated by ";" ; $sExclude_List_Folder - Optional: only used if $iReturn = 0 AND $iRecur = 1 to exclude folders matching the filter
    1 point
  5. What they said ^^. This is a part of what I was saying before. I provided a short snippet as an example of how to use the UDF. If you want to realize just how powerful it is, you have to take the time to learn how it works, and why things do what they do. That drive will only serve to help you in your new career.
    1 point
  6. I think you're overreacting to what has been said. You asked us a question, in a forum where there is no obligation from anybody to help you, or even acknowledge your existence. We're here solely because we want to be. We're here because we want to continue to learn and help people who need helping - like yourself. However, whilst we may be here to help, we're not here to do everything for people, we'll advise and guide but not write write code for you unless the person is in a good mood. If you look back at our replies, you'll notice people have been both advising and guiding. jaberwocky here has pointed out that this would be an excellent opportunity for you to further your AutoIt skills. Whilst the original code you posted was in C++, learning just AutoIt isn't going to help you here. Learning one section of law doesn't make you a lawyer, like if you're a paralegal, you still need to know about other things related, just like being a programmer, learning AutoIt isn't about solely learning AutoIt, you pick up logic skills, puzzle solving abilities, and maybe even C skills. guinness has shown you what kind of keywords to search Google with. That's a very useful skill and one that I and many others use every day. You can't possibly know everything, so remember that others will have had the same problem before. I told you to search for WinAPI calls, that's all you're essentially going to need. The very nice trancexx, who happens to be a former AutoIt core-developer herself has pretty much told you everything you're going to need for your code. Between the four people I quoted above, we've most likely spent thousands of hours learning and practising code, not just in AutoIt but solving problems, corsswords, everything helps. Take some time to learn C and you'll find yourself a better programmer. In conclusion Oliver, we've done everything to help you except write the code for you. Which we're not here to do.
    1 point
  7. I'm Lazy? Parasitic? Are you serius? I'll report your post If i don't know C++ maybe it's my fault, but everyone say "it's so easy" but for me it's not, i have see entire script posted fro people with "just an idea", why don't you write what you have write to me to THAT people? It's not concerning autoit, i'm not asking "how to do an array or how to delete a file", but how to traslate a C++ BECAUSE I DON'T UNDESTRAND IT! If you don't what to help, youir post is usless so please stay out ot this. Thanks
    1 point
  8. Have you looked at the link provided to the UDF he suggested in that post? It will tell you what each parameter of _RecFileListToArray will do. In this example it will search subfolders too.
    1 point
  9. guinness

    Form Builder beta

    Well firstly people would have to be willing to translate.
    1 point
  10. To post code on the forum, please use the following procedure: Click the Code button on the editor toolbar. Select the code type (for most people this will either be AutoIt or Plain Text - AutoIt is the default) Paste or type your code and then click OK.
    1 point
  11. My sameple shows how to do that...use filewrite, or create your own logging function to output to file (rather than the consolewrite). You probably want to validate that the window state and control state are in a good state to allow interaction (enabled, visible, etc) WinGetState ControlCommand...options isvisible, isenabled Then, I would suggest creating functions to loop for those expected states for a the callers amount of time (example: 5 seconds should handle load times for most apps on most comps...if you want to handle for slower, up to longer max wait)...if not in the expected state, return false, else return true
    1 point
  12. UEZ

    GDI+ Wrapping Text

    Try this: #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> ;~ #include "StringSize.au3" ; GDI Fonts ; Get a font, show some text. ; Credit: Melba ; For: StringSize UDF ; http://www.autoitscript.com/forum/topic/114034-stringsize-m23-new-version-16-aug-11/ ; Credit: ReFran and UEZ ; For: GDI Repainting ; Source: http://www.autoitscript.com/forum/topic/135199-table-wit-gdiborder-lines-dont-redraw/ ; Credit: loremipsum.net ; For: Lorem Ipsum text ; Source: http://www.loremipsum.net/ AutoItSetOption("MustDeclareVars", 1) Global Const $_ATTRIB = 1, $_NAME = 2, $_SIZE = 3, $_WEIGHT = 4, $_COLOR = 7 ; $aFont indices Global Const $_TEXT = 0, $_WIDTH = 2, $_HEIGHT = 3 ; $aStringSize indices Global $aFont, $aStringSize, $hGUI, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout, $aInfo, $sText Main() Func Main() ; Sample Text $sText = _ " 1 - Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt" & @CRLF & _ " 2 - ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci" & @CRLF & _ " 3 - tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum" & @CRLF & _ " 4 - iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat" & @CRLF & _ " 5 - nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum" & @CRLF & _ " 6 - zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis" & @CRLF & _ " 7 - eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non" & @CRLF & _ " 8 - habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes" & @CRLF & _ " 9 - demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus" & @CRLF & _ "10 - dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica," & @CRLF & _ "11 - quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta " & @CRLF & _ "12 - decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes" & @CRLF & _ "13 - in futurum. ##" ; Get font data $aFont = _ChooseFont() If Not IsArray($aFont) Then Return -1 _GDIPlus_Startup() $aFont[$_ATTRIB] = Number($aFont[$_ATTRIB]) ; _ChooseFont() returns an array of strings which must be converted for use $aFont[$_SIZE] = Number($aFont[$_SIZE]) $aFont[$_WEIGHT] = Number($aFont[$_WEIGHT]) ;~ $aStringSize = _StringSize($sText, $aFont[$_SIZE], $aFont[$_WEIGHT], $aFont[$_ATTRIB], $aFont[$_NAME]) $aStringSize = _GDIPlus_MeasureString($sText, $aFont[$_NAME], $aFont[$_SIZE], $aFont[$_ATTRIB]) ;~ _GDIPlus_MeasureString($sString, $sFont = "Arial", $fSize = 12, $iStyle = 0) If Not IsArray($aStringSize) Then Return -1 ; Build GUI $hGUI = GUICreate("GDI+ Font Test (13 Lines)", $aStringSize[0] + 20, $aStringSize[1] + 50) GUICtrlCreateLabel("Font: " & $aFont[$_NAME] & ", Size: " & $aFont[$_SIZE] & ", Attribute: " & $aFont[$_ATTRIB] & ", Weight: " & $aFont[$_WEIGHT] & ", Color: " & $aFont[$_COLOR], 10, 10, $aStringSize[0], 20) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hBrush = _GDIPlus_BrushCreateSolid("0xFF" & StringMid($aFont[$_COLOR], 3)) $hFormat = _GDIPlus_StringFormatCreate() $hFamily = _GDIPlus_FontFamilyCreate($aFont[$_NAME]) $hFont = _GDIPlus_FontCreate($hFamily, $aFont[$_SIZE], $aFont[$_ATTRIB]) $tLayout = _GDIPlus_RectFCreate(10, 30, $aStringSize[0], $aStringSize[1]) ;~ $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sText, $hFont, $tLayout, $hFormat) GUIRegisterMsg($WM_PAINT, "_WMPAINT") GUISetState(@SW_SHOW, $hGUI) ; Message Loop Do Until GUIGetMsg() == $GUI_EVENT_CLOSE ; Clean up _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc ;==>Main Func _WMPAINT() ; Repaints the GDI+ stuff (border & text) ; I only tested this on Win7 (x32 and x64), but it *should* be compatible with other Windows versions _WinAPI_RedrawWindow($hGUI, 0, 0, $RDW_UPDATENOW) _GDIPlus_GraphicsDrawStringEx($hGraphic, $sText, $hFont, $tLayout, $hFormat, $hBrush) _GDIPlus_GraphicsDrawRect($hGraphic, 10, 30, $aStringSize[0], $aStringSize[1]) _WinAPI_RedrawWindow($hGUI, 0, 0, $RDW_VALIDATE) EndFunc ;==>_WMPAINT Func _GDIPlus_MeasureString($sString, $sFont = "Arial", $fSize = 12, $iStyle = 0, $bRound = True) Local $aSize[2] Local Const $hFamily = _GDIPlus_FontFamilyCreate($sFont) If Not $hFamily Then Return SetError(1, 0, $aSize) Local Const $hFormat = _GDIPlus_StringFormatCreate() Local Const $hFont = _GDIPlus_FontCreate($hFamily, $fSize, $iStyle) Local Const $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0) Local Const $hGraphic = _GDIPlus_GraphicsCreateFromHWND(0) Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sString, $hFont, $tLayout, $hFormat) $aSize[0] = $bRound ? Round($aInfo[0].Width, 0) : $aInfo[0].Width $aSize[1] = $bRound ? Round($aInfo[0].Height, 0) : $aInfo[0].Height _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_GraphicsDispose($hGraphic) Return $aSize EndFunc ;==>_GDIPlus_MeasureStringBr, UEZ
    1 point
  13. Wombat, I understand and empathize with your motives - I recently landed a new customer by showing I have at least a baseline knowledge in a language they use (GOSU). Just be careful not to oversell yourself; you don't want to present a top notch program if you don't understand what makes it so. Whatever you end up presenting, make sure you understand the mechanics (i.e. how a GUI is built, how a search for files works, etc.), rather than presenting a wall of code you cannot explain. Good luck.
    1 point
  14. A friend did up a Gui code for McAfee Commandline scanner. I was asked to make action code for it. Well, I optimized alittle and made some working code. So, for any McAfee lovers, this is for you. Requirements: Download SuperDat file from http://www.mcafeesecurity.com/us/downloads...es/superdat.asp for scanning operation. McAfee_Gui_v1.1.zip Edit: v1.1 - Added Ahmedmb's AutoExtract code. Edit: Updated to follow new line continuation methods.
    1 point
×
×
  • Create New...