Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/01/2016 in all areas

  1. Sers, while working on another project I was in need of desktop notifications. I wanted an own implementation and from time to time the code grew and I thought about sharing it with the world. I know that there is a similar UDF out there but when my project got bigger an UDF was the best choice for me. As you can see the UDF's differ in usage and style of notifications. So, what do we have? The UDF offers the usage of permanent desktop notifications for your own script in a very easy way. Notifications are starting in the bottom right corner of your main screen and will be shown on top until there is no more space. Further notifications will be shown if previous ones are closed. The notifications have a nice minimalistic design in two colors. By default they match the look of the dark taskbar in Windows 10, but colors and other things can be set differently if wished (see example scripts). The UDF works for GUIOnEventMode activated and deactivated and detects it automatically. Show me! Each notification has its GUI, a title, the message, a seperating line, date label, time label and a closing button (and if activated, a border around the notification). The color of the title, message, seperating line, date, time and closing button (+ border if activated) have all the text color. Right now notifications have a fixed size. I thought about variable sizes but did not add it because I didn't need it so far. Some people may notice the shorter seperating line when border is activated, thats just because of better looks Notifications will be colored as the following: Windows 10: they match the design of the taskbar Windows 8/8.1: On most designs: they match the border color of active windows, else they are black with transparency (see screenshot) Windows 7 and earlier: black with transparency (sry aero) How do I use notifications in my script? include UDF call _Notifications_Startup() (after you determined if you want to use GUIOnEventMode or not) If GUIOneventMode deactivated: call _Notifications_CheckGUIMsg($__GUIMsg) in your main loop create a notification using _Notifications_Create($__title, $__message) Between step 2 and 3 you can set various options: _Notifications_SetAnimationTime _Notifications_SetBorder _Notifications_SetButtonText _Notifications_SetBkColor _Notifications_SetColor _Notifications_SetDateFormat _Notifications_SetSound _Notifications_SetTextAlign _Notifications_SetTimeFormat _Notifications_SetTransparency You can also set own functions to be called when notifications are clicked (see advanced example). And now? You can find more information in the UDF. There also are two example scripts to show the usage for GUIOnEventMode activated and deactivated. Another advanced example shows the usage of the Set-Functions. Thats it? Yup, have fun. Changelog Notifications.au3 ( v1.2) Notifications GUIMsg Example.au3 Notifications OnEvent Example.au3 Notifications Advanced Example.au3
    1 point
  2. However, there is a it took me several hours to figure out how to do it on other windows in runtime, so I tought it might help others. So you want to remove buttons like this: #include <WinAPI.au3> #include <Constants.au3> #include <WindowsConstants.au3> $h = WinGetHandle("Untitled - Note") $iOldStyle = _WinAPI_GetWindowLong($h, $GWL_STYLE) ConsoleWrite("+ old style: " &amp;amp; $iOldStyle &amp;amp; @CR) $iNewStyle = BitXOr($iOldStyle, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX) _WinAPI_SetWindowLong($h, $GWL_STYLE, $iNewStyle) _WinAPI_ShowWindow($h, @SW_SHOW) or remove even the close button: instead of $iNewStyle = BitXOr($iOldStyle, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX)use $iNewStyle = BitXOr($iOldStyle, $WS_SYSMENU) The cool part about these is that you can still close the window with ALT+F4 or minimize it clicking the tray icon. The trickiest part caused me the biggest headache that if you just set the window style with a SetWindowLong() API call, but don't run _WinAPI_ShowWindow($h, @SW_SHOW) the following can happen. To show up properly after the style change, I tried redrawing the window, redrawing everything, sending WM_PAINT message to the Window, calling SetWindowLong() with different handles and options, nothing worked, until I found this comment. So it is very important to run it after setting the style. You can find more about Window styles on MSDN or Autoit help Now, what if you want only disable the buttons, but don't want to remove them ? Like this: (The close button is "greyed" out, the other two are still visible. but if you click them, nothing happens.) The following forum topic solution is very good: You can disable any of you want with these functions: ; Constants from http://msdn.microsoft.com/en-us/library/windows/desktop/ms646360(v=vs.85).aspx Const $SC_CLOSE = 0xF060 Const $SC_MOVE = 0xF010 Const $SC_MAXIMIZE = 0xF030 Const $SC_MINIMIZE = 0xF020 Const $SC_SIZE = 0xF000 Const $SC_RESTORE = 0xF120 Func GetMenuHandle($hWindow, $bRevert = False) If $bRevert = False Then $iRevert = 0 Else $iRevert = 1 EndIf $aSysMenu = DllCall("User32.dll", "hwnd", "GetSystemMenu", "hwnd", $hWindow, "int", $iRevert) ConsoleWrite("+ Menu Handle: " &amp;amp; $aSysMenu[0] &amp;amp; @CRLF) Return $aSysMenu[0] EndFunc Func DisableButton($hWindow, $iButton) $hSysMenu = GetMenuHandle($hWindow) DllCall("User32.dll", "int", "RemoveMenu", "hwnd", $hSysMenu, "int", $iButton , "int", 0) DllCall("User32.dll", "int", "DrawMenuBar", "hwnd", $hWindow) EndFunc Func EnableButton($hWindow, $iButton) $hSysMenu = GetMenuHandle($hWindow, True) DllCall("User32.dll", "int", "RemoveMenu", "hwnd", $hSysMenu, "int", $iButton , "int", 0) DllCall("User32.dll", "int", "DrawMenuBar", "hwnd", $hWindow) EndFunc by calling the functions like this: DisableButton($handle, $SC_CLOSE) DisableButton($handle, $SC_MAXIMIZE) DisableButton($handle, $SC_RESTORE) DisableButton($handle, $SC_MINIMIZE)Same with EnableButton(). If you disable $SC_SIZE, the window will not be resizeable with the mouse. If you disable SC_MOVE, you also cannot move it. Note: everything was tested on Windows 7 with Aero theme. On other system you might not have the same problem (window becoming a ghost after style update). If you test it on other system, please make a feedback about it ! Hope this helps somebody !
    1 point
  3. 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
  4. hi argumentum, for the moment it's all 8s : ... AdlibRegister("GetCoverDATA", 8000) ... AdlibRegister("GetPlayerDATA", 8000) ... i will add a config GUI where u can config this timing for each downloaded DATA. Not a bad idea, just discover that, seems a good improve for make autoit trayicon more easy to use. Thx u for sharing and testing : )
    1 point
  5. wakillon

    Svg2Png

    Convert SVG file to PNG using Cairo and rsvg libraries (and their imports) #Region ;************ Includes ************ #include <File.au3> #EndRegion ;************ Includes ************ ; typedef enum _cairo_status Global Const $CAIRO_STATUS_SUCCESS = 0 Global Const $CAIRO_STATUS_NO_MEMORY = 1 Global Const $CAIRO_STATUS_INVALID_RESTORE = 2 Global Const $CAIRO_STATUS_INVALID_POP_GROUP = 3 Global Const $CAIRO_STATUS_NO_CURRENT_POINT = 4 Global Const $CAIRO_STATUS_INVALID_MATRIX = 5 Global Const $CAIRO_STATUS_INVALID_STATUS = 6 Global Const $CAIRO_STATUS_NULL_POINTER = 7 Global Const $CAIRO_STATUS_INVALID_STRING = 8 Global Const $CAIRO_STATUS_INVALID_PATH_DATA = 9 Global Const $CAIRO_STATUS_READ_ERROR = 10 Global Const $CAIRO_STATUS_WRITE_ERROR = 11 Global Const $CAIRO_STATUS_SURFACE_FINISHED = 12 Global Const $CAIRO_STATUS_SURFACE_TYPE_MISMATCH = 13 Global Const $CAIRO_STATUS_PATTERN_TYPE_MISMATCH = 14 Global Const $CAIRO_STATUS_INVALID_CONTENT = 15 Global Const $CAIRO_STATUS_INVALID_FORMAT = 16 Global Const $CAIRO_STATUS_INVALID_VISUAL = 17 Global Const $CAIRO_STATUS_FILE_NOT_FOUND = 18 Global Const $CAIRO_STATUS_INVALID_DASH = 19 Global Const $CAIRO_STATUS_INVALID_DSC_COMMENT = 20 Global Const $CAIRO_STATUS_INVALID_INDEX = 21 Global Const $CAIRO_STATUS_CLIP_NOT_REPRESENTABLE = 22 Global Const $CAIRO_STATUS_TEMP_FILE_ERROR = 23 Global Const $CAIRO_STATUS_INVALID_STRIDE = 24 Global Const $CAIRO_STATUS_FONT_TYPE_MISMATCH = 25 Global Const $CAIRO_STATUS_USER_FONT_IMMUTABLE = 26 Global Const $CAIRO_STATUS_USER_FONT_ERROR = 27 Global Const $CAIRO_STATUS_NEGATIVE_COUNT = 28 Global Const $CAIRO_STATUS_INVALID_CLUSTERS = 29 Global Const $CAIRO_STATUS_INVALID_SLANT = 30 Global Const $CAIRO_STATUS_INVALID_WEIGHT = 31 Global Const $CAIRO_STATUS_INVALID_SIZE = 32 Global Const $CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED = 33 Global Const $CAIRO_STATUS_DEVICE_TYPE_MISMATCH = 34 Global Const $CAIRO_STATUS_DEVICE_ERROR = 35 Global Const $CAIRO_STATUS_INVALID_MESH_CONSTRUCTION = 36 Global Const $CAIRO_STATUS_DEVICE_FINISHED = 37 Global Const $CAIRO_STATUS_LAST_STATUS = 38 ; typedef enum _cairo_format Global Const $CAIRO_FORMAT_INVALID = -1 Global Const $CAIRO_FORMAT_ARGB32 = 0 Global Const $CAIRO_FORMAT_RGB24 = 1 Global Const $CAIRO_FORMAT_A8 = 2 Global Const $CAIRO_FORMAT_A1 = 3 Global Const $CAIRO_FORMAT_RGB16_565 = 4 Global Const $CAIRO_FORMAT_RGB30 = 5 ; Check libraries. $aList = _FileListToArray ( @ScriptDir, '*.dll', 1, 0 ) For $i = 1 To UBound ( $aList ) -1 If _GetBinaryType ( @ScriptDir & '\' & $aList[$i] ) <> 'i386' Then Exit MsgBox ( 262144+16, 'Error', $aList[$i] & ' is not 32bit !', 5 ) ;~ ConsoleWrite ( $aList[$i] & @TAB & 'Version ' & FileGetVersion ( $aList[$i] ) & @Crlf ) Next #Region ------ Global Variables ------------------------------ FileChangeDir ( @ScriptDir & '\Libraries' ) Global $h_RsvgDll = DllOpen ( @ScriptDir & '\Libraries\librsvg-2-2.dll' ) Global $h_CairoDll = DllOpen ( @ScriptDir & '\Libraries\libcairo-2.dll' ) Global $sPngFilePath = @DesktopDir & '\' & @HOUR & @MIN & @SEC & @MSEC & '.png' Global $sSvgFilePath, $hRsvg, $pCairoSurface, $pCr #EndRegion --- Global Variables ------------------------------ FileChangeDir ( @ScriptDir & '\SVG files' ) $sSvgFilePath = FileOpenDialog ( 'Select a Shape', @WorkingDir, 'Vector Graphic (*.svg)', 1+2, '' ) If @error Then Exit ; Open the SVG image file $hRsvg = _Rsvg_handle_new_from_file ( $sSvgFilePath ) ConsoleWrite ( '!->-- [' & StringFormat ( '%03i', @ScriptLineNumber ) & '] $hRsvg : ' & $hRsvg & @Crlf ) ; Get dimensions $aSize = _Rsvg_handle_get_dimensions ( $hRsvg ) If Not @error Then ConsoleWrite ( '> Width : ' & $aSize[0] & ', Height : ' & $aSize[1] & @Crlf ) ; Create a Surface into which we render the SVG drawing $pCairoSurface = _Cairo_image_surface_create ( $CAIRO_FORMAT_ARGB32, $aSize[0], $aSize[1] ) ConsoleWrite ( '!->-- [' & StringFormat ( '%03i', @ScriptLineNumber ) & '] $pCairoSurface : ' & $pCairoSurface & @Crlf ) ; Create a new Cairo renderer $pCr = _Cairo_create ( $pCairoSurface ) ConsoleWrite ( '!->-- [' & StringFormat ( '%03i', @ScriptLineNumber ) & '] $pCr : ' & $pCr & @Crlf ) ConsoleWrite ( 'Cairo status after _Cairo_create : ' & _Cairo_status ( $pCr ) & @Crlf ) ; Render the SVG into the Cairo buffer _Rsvg_handle_render_cairo ( $hRsvg, $pCr ) ConsoleWrite ( 'Cairo status after _Rsvg_handle_render_cairo : ' & _Cairo_status ( $pCr ) & @Crlf ) ; Save to png _Cairo_surface_write_to_png ( $pCairoSurface, $sPngFilePath ) ConsoleWrite ( 'Cairo status after _Cairo_surface_write_to_png : ' & _Cairo_status ( $pCr ) & @Crlf ) _Cairo_surface_finish ( $pCairoSurface ) ConsoleWrite ( 'Cairo status after _Cairo_surface_finish : ' & _Cairo_status ( $pCr ) & @Crlf ) _Rsvg_handle_close ( $hRsvg ) ConsoleWrite ( 'Cairo status after _Rsvg_handle_close : ' & _Cairo_status ( $pCr ) & @Crlf ) ; Display _BitmapDisplayInWindowsViewer ( $sPngFilePath ) ; Cleanup _Cairo_destroy ( $pCr ) _Cairo_surface_destroy ( $pCairoSurface ) DllClose ( $h_RsvgDll ) DllClose ( $h_CairoDll ) Exit Func _BitmapDisplayInWindowsViewer ( $sFilePath ) If Not FileExists ( $sFilePath ) Then Return SetError ( -1 ) Run ( 'rundll32 shimgvw.dll,ImageView_Fullscreen ' & $sFilePath ) EndFunc ;==> _BitmapDisplayInWindowsViewer() Func _Cairo_create ( $pCairoSurface ) Local $aRet = DllCall ( $h_CairoDll, 'ptr:cdecl', 'cairo_create', 'ptr', $pCairoSurface ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _Cairo_create() Func _Cairo_destroy ( $pCr ) Local $aRet = DllCall ( $h_CairoDll, 'int:cdecl', 'cairo_destroy', 'ptr', $pCr ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _Cairo_destroy() Func _Cairo_image_surface_create ( $iFormat, $iWidth, $iHeight ) Local $aRet = DllCall ( $h_CairoDll, 'ptr:cdecl', 'cairo_image_surface_create', 'int', $iFormat, 'int', $iWidth, 'int', $iHeight ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _Cairo_image_surface_create() Func _Cairo_image_surface_create_for_data ( $iFormat, $iWidth, $iHeight, $iStride ) Local $tStruct = DllStructCreate ( 'byte[' & $iStride*$iHeight & ']' ) Local $aRet = DllCall ( $h_CairoDll, 'ptr:cdecl', 'cairo_image_surface_create_for_data', 'ptr', DllStructGetPtr ( $tStruct ), 'int', $iFormat, 'int', $iWidth, 'int', $iHeight, 'int', $iStride ) If @error Then Return SetError ( @error, 0, 0 ) $tStruct = 0 Return $aRet[0] EndFunc ;==> _Cairo_image_surface_create_for_data() Func _Cairo_status ( $pCr ) Local $aRet = DllCall ( $h_CairoDll, 'int:cdecl', 'cairo_status', 'ptr', $pCr ) If @error Then Return SetError ( @error, 0, 0 ) Switch $aRet[0] Case $CAIRO_STATUS_SUCCESS Return 'SUCCESS' Case $CAIRO_STATUS_NO_MEMORY Return 'NO MEMORY' Case $CAIRO_STATUS_INVALID_RESTORE Return 'INVALID RESTORE' Case $CAIRO_STATUS_INVALID_POP_GROUP Return 'INVALID POP GROUP' Case $CAIRO_STATUS_NO_CURRENT_POINT Return 'NO CURRENT POINT' Case $CAIRO_STATUS_INVALID_MATRIX Return 'INVALID MATRIX' Case $CAIRO_STATUS_INVALID_STATUS Return 'INVALID STATUS' Case $CAIRO_STATUS_NULL_POINTER Return 'NULL POINTER' Case $CAIRO_STATUS_INVALID_STRING Return 'INVALID STRING' Case $CAIRO_STATUS_INVALID_PATH_DATA Return 'INVALID PATH DATA' Case $CAIRO_STATUS_READ_ERROR Return 'READ ERROR' Case $CAIRO_STATUS_WRITE_ERROR Return 'WRITE ERROR' Case $CAIRO_STATUS_SURFACE_FINISHED Return 'SURFACE FINISHED' Case $CAIRO_STATUS_SURFACE_TYPE_MISMATCH Return 'SURFACE TYPE MISMATCH' Case $CAIRO_STATUS_PATTERN_TYPE_MISMATCH Return 'PATTERN TYPE MISMATCH' Case $CAIRO_STATUS_INVALID_CONTENT Return 'INVALID CONTENT' Case $CAIRO_STATUS_INVALID_FORMAT Return 'INVALID FORMAT' Case $CAIRO_STATUS_INVALID_VISUAL Return 'INVALID VISUAL' Case $CAIRO_STATUS_FILE_NOT_FOUND Return 'FILE NOT FOUND' Case $CAIRO_STATUS_INVALID_DASH Return 'INVALID DASH' Case $CAIRO_STATUS_INVALID_DSC_COMMENT Return 'INVALID DSC COMMENT' Case $CAIRO_STATUS_INVALID_INDEX Return 'INVALID INDEX' Case $CAIRO_STATUS_CLIP_NOT_REPRESENTABLE Return 'CLIP NOT REPRESENTABLE' Case $CAIRO_STATUS_TEMP_FILE_ERROR Return 'TEMP FILE ERROR' Case $CAIRO_STATUS_INVALID_STRIDE Return 'INVALID STRIDE' Case $CAIRO_STATUS_FONT_TYPE_MISMATCH Return 'FONT TYPE MISMATCH' Case $CAIRO_STATUS_USER_FONT_IMMUTABLE Return 'USER FONT IMMUTABLE' Case $CAIRO_STATUS_USER_FONT_ERROR Return 'USER FONT ERROR' Case $CAIRO_STATUS_NEGATIVE_COUNT Return 'NEGATIVE COUNT' Case $CAIRO_STATUS_INVALID_CLUSTERS Return 'INVALID CLUSTERS' Case $CAIRO_STATUS_INVALID_SLANT Return 'INVALID SLANT' Case $CAIRO_STATUS_INVALID_WEIGHT Return 'INVALID WEIGHT' Case $CAIRO_STATUS_INVALID_SIZE Return 'INVALID SIZE' Case $CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED Return 'USER FONT NOT IMPLEMENTED' Case $CAIRO_STATUS_DEVICE_TYPE_MISMATCH Return 'DEVICE TYPE MISMATCH' Case $CAIRO_STATUS_DEVICE_ERROR Return 'DEVICE ERROR' Case $CAIRO_STATUS_INVALID_MESH_CONSTRUCTION Return 'INVALID MESH CONSTRUCTION' Case $CAIRO_STATUS_DEVICE_FINISHED Return 'DEVICE FINISHED' Case $CAIRO_STATUS_LAST_STATUS Return 'LAST STATUS' Case Else Return 'UNKNOW ERROR' EndSwitch EndFunc ;==> _Cairo_status() Func _Cairo_status_to_string() Local $aRet = DllCall ( $h_CairoDll, 'str:cdecl', 'cairo_status_to_string' ) If @error Then Return SetError ( @error, 0, 0 ) ;~ If $aRet[0] = '<unknown error status>' Then Return '' Return $aRet[0] EndFunc ;==> _Cairo_status_to_string() Func _Cairo_surface_destroy ( $pCairoSurface ) Local $aRet = DllCall ( $h_CairoDll, 'int:cdecl', 'cairo_surface_destroy', 'ptr', $pCairoSurface ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _Cairo_surface_destroy() Func _Cairo_surface_finish ( $pCairoSurface ) Local $aRet = DllCall ( $h_CairoDll, 'int:cdecl', 'cairo_surface_finish', 'ptr', $pCairoSurface ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _Cairo_surface_finish() Func _Cairo_surface_write_to_png ( $pCairoSurface, $sFilePath ) Local $aRet = DllCall ( $h_CairoDll, 'int:cdecl', 'cairo_surface_write_to_png', 'ptr', $pCairoSurface, 'str', $sFilePath ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _Cairo_surface_write_to_png() Func _GetBinaryType ( $sFilePath ) ; by Dougiefresh Local $hFile = FileOpen ( $sFilePath, 16 ) If $hFile = -1 Then Return SetError ( -1, 0, 'Invalid' ) If BinaryToString ( FileRead ( $hFile, 2 ) ) = 'MZ' Then FileSetPos ( $hFile, 60, 0 ) FileSetPos ( $hFile, Int ( FileRead ( $hFile, 4 ) ) +4, 0 ) Local $sFileRead = FileRead ( $hFile, 2 ) FileClose ( $hFile ) If $sFileRead = '0x6486' Then Return 'AMD64' If $sFileRead = '0x4c01' Then Return 'i386' If $sFileRead = '0x0002' Then Return 'IA64' EndIf FileClose ( $hFile ) Return 'Unknown' EndFunc ;==> _GetBinaryType() Func _Rsvg_handle_close ( $hRsvg ) Local $iError = 0 Local $aRet = DllCall ( $h_RsvgDll, 'ptr:cdecl', 'rsvg_handle_close', 'ptr', $hRsvg, 'int', $iError ) If @error Then Return SetError ( @error, 0, 0 ) If $iError Then Return SetError ( $iError, 0, 0 ) Return $aRet[0] EndFunc ;==> _Rsvg_handle_close() Func _Rsvg_handle_get_dimensions ( $hRsvg ) Local $aSize[4], $tRsvgDimensionData = DllStructCreate ( 'int width;int height;double em;double ex' ) Local $aRet = DllCall ( $h_RsvgDll, 'int:cdecl', 'rsvg_handle_get_dimensions', 'ptr', $hRsvg, 'ptr', DllStructGetPtr ( $tRsvgDimensionData ) ) If @error Then Return SetError ( @error, 0, 0 ) $aSize[0] = $tRsvgDimensionData.width $aSize[1] = $tRsvgDimensionData.height $aSize[2] = $tRsvgDimensionData.em $aSize[3] = $tRsvgDimensionData.ex $tRsvgDimensionData = 0 Return $aSize EndFunc ;==> _Rsvg_handle_get_dimensions() Func _Rsvg_handle_new_from_file ( $sSvgFile ) If Not FileExists ( $sSvgFile ) Then Return SetError ( -1, 0, 0 ) Local $iError = 0 Local $aRet = DllCall ( $h_RsvgDll, 'ptr:cdecl', 'rsvg_handle_new_from_file', 'str', FileGetShortName ( $sSvgFile ), 'int', $iError ) If @error Then Return SetError ( @error, 0, 0 ) If $iError Then Return SetError ( $iError, 0, 0 ) Return $aRet[0] EndFunc ;==> _Rsvg_handle_new_from_file() Func _Rsvg_handle_render_cairo ( $hRsvg, $pCr ) Local $aRet = DllCall ( $h_RsvgDll, 'bool:cdecl', 'rsvg_handle_render_cairo', 'ptr', $hRsvg, 'ptr', $pCr ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] ; Returns TRUE if drawing succeeded. EndFunc ;==> _Rsvg_handle_render_cairo() Func _Rsvg_init() ; deprecated since version 2.36 and should not be used in newly-written code. Local $aRet = DllCall ( $h_RsvgDll, 'int:cdecl', 'rsvg_init' ) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _Rsvg_init() Script and files are available in the downloads Section
    1 point
  6. Myicq, My contribution: #include <Array.au3> Global $aData[][] = [[1,2,3,4,5,6,7,8,9], _ [11,12,13,14,15,16,17,18,19], _ [21,22,23,24,25,26,27,28,29]] $iItemsPerLine = UBound($aData, 2) $iReqPerLine = 3 $iStartIndex = 7 ; <<<<<<<<<<<<<<<<< Alter this to test ; For each row For $iRow = 0 To UBound($aData) - 1 ConsoleWrite(@CRLF & "Row " & $iRow & ":") ; Extract these elements For $j = 1 To $iReqPerLine ; Calculate index $iColumn = $iStartIndex + $j - 1 ; Correct if required $iColumn = Mod($iColumn, $iItemsPerLine) ConsoleWrite(" " & $aData[$iRow][$iColumn]) Next Next ConsoleWrite(@CRLF) M23
    1 point
  7. Reading how the sentences are organized in post #1 makes easy to understand why the problem is huge ^^
    1 point
  8. iamtheky

    FF.au3 (V0.6.0.1b-10)

    @passwd I am not the avatar police, but yours is annoying AF. And I wouldnt read the text next to it, ever.
    1 point
×
×
  • Create New...