Leaderboard
Popular Content
Showing content with the highest reputation on 08/16/2013 in all areas
-
For reference >This UDF handles critical errors that do not involve a compiled having been altered. Still don't see a real need for what the OP wants though.2 points
-
mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples1 point
-
This is a UDF I created for myself, to handle file locking on an SQLite database that was being shared on a network. Since I did not want to run a process on the server to handle the file locking, I needed a way to avoid write conflicts from the clients themselves. ********** Thanks to an ISP problem, the ZIP download is not available. The most recent code will be maintained here. ********** Updated to work with 64-bit Win7 Minor performance enhancement as proposed by orbs (see >post #15) If you want to see it in action, before implementing it in your own production scripts, I have written up a little demo here: Make sure to set $logpath and $logfile to a proper location on your PC or network. Run the demo as many times as you like on a single machine to simulate multiple machines, or run on several machines. You will be able to see when each session gets its "lock" on the log file. You can also look at the log file itself to see what sessions/machines got access. NOTE: Because of the way Windows handles multitasking, you will probably see groupings of the same session getting its lock several times before the next one. This is because Windows does not do a very good job of sharing the processor between applications, so one session may make several iterations before Windows pulls processor time away for the next session. You will see a better distribution if you actually use multiple machines rather than simulated machines. For those who are wanting them, here are the "help" files that were included in the original ZIP file. Nothing spectacular. They are just a cut back demo designed to look like what would be in the help file if this were included.1 point
-
GuiCtrlPicButton Simulate Reaction A simple example for simulate reaction of buttons created with GUICtrlCreatePic who by default don't react when are pressed or when mouse is over ( and also for avoid the use of big multi dimensional arrays as i already done by the past ) If you want to create your own buttons as those i have used in script try chimply.com website, it's free ! example 1 GuiCtrlPicButton_SimulateReaction+Files.au3 example 2 Digicode 1.0.0.1.au3 Buttons are included in script. Hope it can help !1 point
-
File Name: AutoIt v3.3.9.17 Beta File Submitter: Jon File Submitted: 15 Aug 2013 File Category: Beta 3.3.9.17 (15th August, 2013) (Beta) AutoIt: - Added: StringReverse() - a UTF16 compatible string reversal function. - Added: FileReadToArray() - native version of _FileReadToArray(). - Changed: Some misc internal rewrites in array assignment mean that some large internal array assignments (StringRegExp() for example) may be slightly quicker. Maybe. - Fixed #2366: For loop not working as expected. UDFs: Others: - Added: Sublime Text AutoIt.tmLanguage file to the editors folder. This contains a list of up to date functions. - Fixed: StringRegExpGUI missing from the help file index menu. Plus, lots of helpfile changes. Click here to download this file1 point
-
in my understanding that it was supposed to be a joke word, a kind of charades But as I can see, not very successful. ...does not matter...1 point
-
Syntax Issue
creamers reacted to JLogan3o13 for a topic
InetGet("kjfngkdfjgn.com", @TempDir & "\Test.txt" If FileExists(@TempDir & "\Test.txt") Then MsgBox(0, "", "Works!") FileDelete(@TempDir & "\Test.txt") EndIf1 point -
Could you get yourself some chill-pills and take them at regular intervals? Seriously: You are becoming pretty annoying around here with: Your multiple subsequent replies in threads Your so called opinion which often doesn't contribute to the topic. So, please slow down, relax and stick to a single reply at the time. Use the Edit button when you forgot to mention something. Jos1 point
-
@ James, are you implying that "normal" users can not suggest new ideas? i'm not sure if i should be insulted or flattered1 point
-
Please stop using full stops at the beginning of a sentence. A configurable icon is a different thing altogether.1 point
-
drbyte, One more version #include <array.au3> #include <File.au3> #include <Excel.au3> ; ------------------------------------------------------------------------------------ ; create these files in @scriptdir\test\ for testing ; ------------------------------------------------------------------------------------ local $result[8] $result[0]="material-1a_124567.pdf" $result[1]="material-1b_12345_12345.pdf" $result[2]="material-1c_12345_nesting.pdf" $result[3]="material-1d_us_04030-2010-09-03.pdf" $result[4]="material-1e_z35_SL1020_01.pdf" $result[5]="material-1f_W1305050.pdf" $result[6]="material-1g_SL1025_02.pdf" $result[7]="material-1h_painting.pdf" for $1 = 0 to ubound($result) - 1 fileopen(@scriptdir & '\test\' & $result[$1],10) Next ; ------------------------------------------------------------------------------------ ; start of script that you'll use ; ------------------------------------------------------------------------------------ ; list all .pdf type files from a specific directory $atemp_Files = _FileListToArray(@ScriptDir & '\test\', '*.pdf', 1) ; create final result array with 2 dimensions local $aFiles[ubound($atemp_Files)][2] ; populate 1ST dimension of final result array with complete file name (not path) for $1 = 0 to ubound($atemp_Files) - 1 $aFiles[$1][0] = $atemp_Files[$1] next ; populate 2ND dimension of final result array with stripped out file name local $aTmp for $1 = 1 to ubound($aFiles) - 1 $aTmp = stringregexp($aFiles[$1][0],'[^_]*_(.*)\.pdf',3) if isarray($aTmp) then $aFiles[$1][1] = $aTmp[0] next _arraydelete($aFiles,0) ; ------------------------------------------------------------------------------------ ; create spreadsheet (shamelessly plagarized from soonyee91) ; ------------------------------------------------------------------------------------ Local $oExcel=_ExcelBookNew() For $1 = 0 to ubound($aFiles) - 1 _ExcelWriteCell($oExcel,$aFiles[$1][0],$1,1) _ExcelWriteCell($oExcel,$aFiles[$1][1],$1,5) next Msgbox(0,"","Write to excel file complete! Excel will close without saving!") _ExcelBookClose($oExcel,0) $oExcel="" kylomas1 point
-
fikri1979, Nothing to forgive, we all started somewhere... My understanding of what you want: 1 - you create an AutoIT app to gather some data 2 - you want to populate fields in an external app using this data 3 - when the button control is actioned on your app you want to press a button on the external app If this is true it is easy enough to do assuming the external app is using standard Windows controls. Have patience and someone with experience automating apps will guide you through this. kylomas1 point
-
AndreyS http://pastebin.com/iasqvvsN1 point
-
Then noone here has a clue about what a security hole is.1 point
-
1 point
-
I found a security hole in the compiler
0xdefea7 reacted to JLogan3o13 for a topic
If only the world were filled with hackers who thought they'd stumbled on something big by opening a script in Notepad++, we'd all be safe!1 point -
GDI+ animated loading screens build 2014-06-20 (32 examples)
Wombat reacted to mesale0077 for a topic
;thank you UEZ ;coded by UEZ build 2013-08-15 #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> _GDIPlus_Startup() Global Const $STM_SETIMAGE = 0x0172;, $IMAGE_BITMAP = 0 Global $iW = 400, $iH = 25, $iBGColor = 0xFFFFFF Global Const $hGUI = GUICreate("Strip Progressbar", $iW, $iH, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST) GUISetBkColor($iBGColor) Global Const $iPic = GUICtrlCreatePic("", 0, 0, $iW, $iH) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState() Global $hHBmp_BG, $hB, $iSleep = 30, $hTooltip GUIRegisterMsg($WM_TIMER, "PlayAnim") DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0) Global $fPerc = 0, $aPos, $iPosX, $iPosY Global $aColors[7][2] = [[0xFFEE5F5B, 0xFFF07673],[0xFFABCC04, 0xFFBBD636],[0xFF78CCEE, 0xFF93D6F1],[0xFFFFBB58, 0xFFFFC97A],[0xFFFF6677, 0xFFFF8795],[0xFF78CCEE,0xFFFFC97A],[0xFF78CCEE,0xe8e5d9]] Global $iRandom = Random(0, UBound($aColors) - 1, 1) $aPos = WinGetPos($hGUI) $iPosX = $aPos[0] $iPosY = $aPos[1] + $aPos[3] Global $iColorTP = BitShift(BitAND(BitAND(0x00FFFFFF, $aColors[$iRandom][1]), 0xFF), -16) + BitAND(0x0000FF00, $aColors[$iRandom][1]) + BitShift(BitAND(BitAND(0x00FFFFFF, $aColors[$iRandom][1]), 0xFF0000), 16) ;convert to BGR Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ToolTip("") GUIRegisterMsg($WM_TIMER, "") _WinAPI_DeleteObject($hHBmp_BG) _GDIPlus_Shutdown() GUIDelete() Exit EndSwitch Until False Func PlayAnim() $fPerc += 0.25 If $fPerc > 100 Then $fPerc = 0 Switch $fPerc Case 0 To 19 $iRandom = 1 Case 20 To 29 $iRandom = 2 Case 30 To 49 $iRandom = 3 Case 50 To 69 $iRandom = 4 Case 70 to 89 $iRandom = 5 Case 90 to 100 $iRandom = 6 EndSwitch $iColorTP = BitShift(BitAND(BitAND(0x00FFFFFF, $aColors[$iRandom][1]), 0xFF), -16) + BitAND(0x0000FF00, $aColors[$iRandom][1]) + BitShift(BitAND(BitAND(0x00FFFFFF, $aColors[$iRandom][1]), 0xFF0000), 16) ;convert to BGR $hHBmp_BG = _GDIPlus_StripProgressbar($fPerc, $iW, $iH, 0xFF000000 + $iBGColor, $aColors[$iRandom][0], $aColors[$iRandom][1]) $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp_BG) If $hB Then _WinAPI_DeleteObject($hB) _WinAPI_DeleteObject($hHBmp_BG) ToolTip(StringFormat("%02d %", $fPerc), $iPosX + $fPerc / 100 * $iW - 1, $iPosY, "", "", 3) $hTooltip = WinGetHandle(StringFormat("%02d %", $fPerc)) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hTooltip, "wstr", "", "wstr", "") DllCall("user32.dll", "int", "SendMessage", "hwnd", $hTooltip, "int", 1043, "int", $iColorTP, "int", 0) EndFunc ;==>PlayAnim Func _GDIPlus_StripProgressbar($fPerc, $iW, $iH, $iBgColorGui = 0xFFF0F0F0, $iFgColor = 0xFFEE5F5B, $iBGColor = 0xFFF07673, $sText = "Loading...", $iTextColor = 0x000000, $iDir = -1, $iSpeed = 1, $sFont = "Arial", $bFlip = False, $bHBitmap = True) If $fPerc < 0 Then $fPerc = 0 If $fPerc > 100 Then $fPerc = 100 Local $hBitmap = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iW, "int", $iH, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0) $hBitmap = $hBitmap[6] Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsClear($hCtxt, $iBgColorGui) Local $iWidth = $iH * 2, $iLen = $iWidth / 2, $iY Local $hBmp = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iH, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0) $hBmp = $hBmp[6] Local Const $hCtxt_Bmp = _GDIPlus_ImageGetGraphicsContext($hBmp) Local $hPen = _GDIPlus_PenCreate($iFgColor), $iPenSize = Int($iH / 12) Local $hPen2 = _GDIPlus_PenCreate(0x40000000, $iPenSize) _GDIPlus_GraphicsClear($hCtxt_Bmp, $iBGColor) Local Static $iX = 0 For $iY = 0 To $iH - 1 Switch $iDir Case 1 _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, $iX + $iY, $iY, $iX + $iY + $iLen, $iY, $hPen) _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, $iX + $iY - 2 * $iLen, $iY, $iX + $iY - 1 * $iLen, $iY, $hPen) Case Else _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, -$iX + $iY, $iY, -$iX + $iY + $iLen, $iY, $hPen) _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, -$iX + $iY + 2 * $iLen, $iY, -$iX + $iY + 3 * $iLen, $iY, $hPen) EndSwitch Next Local $tPoint1 = DllStructCreate("float;float") Local $tPoint2 = DllStructCreate("float;float") DllStructSetData($tPoint1, 1, $iW / 2) ;x1 DllStructSetData($tPoint2, 1, $iW / 2) ;x2 Local $hLineBrush If $bFlip Then _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, 0, 0, $iWidth, 0, $hPen2) DllStructSetData($tPoint2, 2, $iH * 2 / 3) ;y2 DllStructSetData($tPoint1, 2, $iH / 3) ;y1 $hLineBrush = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrush", "struct*", $tPoint1, "struct*", $tPoint2, "uint", 0x00FFFFFF, "uint", 0xB0FFFFFF, "int", 0, "int*", 0) $hLineBrush = $hLineBrush[6] _GDIPlus_GraphicsFillRect($hCtxt_Bmp, 0, $iH * 2 / 3 + 1, $iW, $iH / 3, $hLineBrush) Else _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, 0, $iH - $iPenSize / 2, $iWidth, $iH - $iPenSize / 2, $hPen2) DllStructSetData($tPoint1, 2, 0) ;y1 DllStructSetData($tPoint2, 2, $iH / 3) ;y2 $hLineBrush = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrush", "struct*", $tPoint1, "struct*", $tPoint2, "uint", 0xB0FFFFFF, "uint", 0x00FFFFFF, "int", 0, "int*", 0) $hLineBrush = $hLineBrush[6] _GDIPlus_GraphicsFillRect($hCtxt_Bmp, 0, 0, $iW, $iH / 3, $hLineBrush) EndIf $iX = Mod($iX + $iSpeed, $iWidth) Local $hTextureBrush = DllCall($ghGDIPDll, "uint", "GdipCreateTexture", "handle", $hBmp, "int", 0, "int*", 0) $hTextureBrush = $hTextureBrush[3] _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $fPerc / 100 * $iW, $iH, $hTextureBrush) If $bFlip Then DllCall($ghGDIPDll, "uint", "GdipImageRotateFlip", "handle", $hBitmap, "int", 6) DllCall($ghGDIPDll, "int", "GdipSetTextRenderingHint", "handle", $hCtxt, "int", 4) Local $hBrush = _GDIPlus_BrushCreateSolid(0x40000000 + $iTextColor) Local $hFormat = _GDIPlus_StringFormatCreate() Local $hFamily = _GDIPlus_FontFamilyCreate($sFont) Local $hFont = _GDIPlus_FontCreate($hFamily, $iH * 3 / 5, 2) Local $tLayout = _GDIPlus_RectFCreate(0, 0, $iW, $iH) _GDIPlus_StringFormatSetAlign($hFormat, 1) _GDIPlus_GraphicsDrawStringEx($hCtxt, $sText, $hFont, $tLayout, $hFormat, $hBrush) _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PenDispose($hPen) _GDIPlus_PenDispose($hPen2) _GDIPlus_GraphicsDispose($hCtxt) _GDIPlus_GraphicsDispose($hCtxt_Bmp) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_BrushDispose($hTextureBrush) _GDIPlus_BrushDispose($hLineBrush) If $bHBitmap Then Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) Return $hHBITMAP EndIf Return $hBitmap EndFunc ;==>_GDIPlus_StripProgressbar ;thank you UEZ1 point -
#include <File.au3> $aFiles = _FileListToArray(@ScriptDir, '*.pdf', 1) For $i = 1 To $aFiles[0] $iFilelength = StringLen($aFiles[$i]) ConsoleWrite($aFiles[$i] & @LF) $sTrimmed = StringMid($aFiles[$i],13, $iFilelength - (12 + 4)) ConsoleWrite($sTrimmed & @LF) Next1 point
-
GDI+ animated loading screens build 2014-06-20 (32 examples)
Wombat reacted to mesale0077 for a topic
;coded by UEZ build 2013-08-14 #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> _GDIPlus_Startup() Global Const $STM_SETIMAGE = 0x0172;, $IMAGE_BITMAP = 0 Global $iW = 400, $iH = 25, $iBGColor = 0xFFFFFF Global Const $hGUI = GUICreate("Monochromatic Blinker", $iW, $iH, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST) GUISetBkColor($iBGColor) Global Const $iPic = GUICtrlCreatePic("", 0, 0, $iW, $iH) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState() Global $hHBmp_BG, $hB, $iSleep = 30 GUIRegisterMsg($WM_TIMER, "PlayAnim") DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0) Global $fPerc = 0, $aPos, $iPosX, $iPosY Global $aColors[5][2] = [[0xFFEE5F5B, 0xFFF07673],[0xFFABCC04, 0xFFBBD636],[0xFF78CCEE, 0xFF93D6F1],[0xFFFFBB58, 0xFFFFC97A],[0xFFFF6677, 0xFFFF8795]] Global $iRandom = Random(0, UBound($aColors) - 1, 1) $aPos = WinGetPos($hGUI) $iPosX = $aPos[0] $iPosY = $aPos[1] + $aPos[3] Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ToolTip("") GUIRegisterMsg($WM_TIMER, "") _WinAPI_DeleteObject($hHBmp_BG) _GDIPlus_Shutdown() GUIDelete() Exit EndSwitch Until False Func PlayAnim() $hHBmp_BG = _GDIPlus_StripProgressbar($fPerc, $iW, $iH, 0xFF000000 + $iBGColor, $aColors[$iRandom][0], $aColors[$iRandom][1]) $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp_BG) If $hB Then _WinAPI_DeleteObject($hB) _WinAPI_DeleteObject($hHBmp_BG) $fPerc += 0.25 If $fPerc > 100 Then $fPerc = 0 ToolTip(StringFormat("%02d %", $fPerc), $iPosX + $fPerc / 100 * $iW - 1, $iPosY, "", "", 3) $H_TOOLTIP1 = WinGetHandle(StringFormat("%02d %", $fPerc)) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $H_TOOLTIP1, "wstr", "", "wstr", "") DllCall("user32.dll", "int", "SendMessage", "hwnd", $H_TOOLTIP1, "int", 1043, "int", 0xe8e6d9, "int", 0) EndFunc ;==>PlayAnim Func _GDIPlus_StripProgressbar($fPerc, $iW, $iH, $iBgColorGui = 0xFFF0F0F0, $iFgColor = 0xFFEE5F5B, $iBGColor = 0xFFF07673, $sText = "Loading...", $iTextColor = 0x000000, $iDir = -1, $iSpeed = 1, $sFont = "Arial", $bFlip = False, $bHBitmap = True) If $fPerc < 0 Then $fPerc = 0 If $fPerc > 100 Then $fPerc = 100 Local $hBitmap = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iW, "int", $iH, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0) $hBitmap = $hBitmap[6] Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsClear($hCtxt, $iBgColorGui) Local $iWidth = $iH * 2, $iLen = $iWidth / 2, $iY Local $hBmp = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iH, "int", 0, "int", $GDIP_PXF32ARGB, "ptr", 0, "int*", 0) $hBmp = $hBmp[6] Local Const $hCtxt_Bmp = _GDIPlus_ImageGetGraphicsContext($hBmp) Local $hPen = _GDIPlus_PenCreate($iFgColor), $iPenSize = Int($iH / 12) Local $hPen2 = _GDIPlus_PenCreate(0x40000000, $iPenSize) _GDIPlus_GraphicsClear($hCtxt_Bmp, $iBGColor) Local Static $iX = 0 For $iY = 0 To $iH - 1 Switch $iDir Case 1 _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, $iX + $iY, $iY, $iX + $iY + $iLen, $iY, $hPen) _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, $iX + $iY - 2 * $iLen, $iY, $iX + $iY - 1 * $iLen, $iY, $hPen) Case Else _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, -$iX + $iY, $iY, -$iX + $iY + $iLen, $iY, $hPen) _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, -$iX + $iY + 2 * $iLen, $iY, -$iX + $iY + 3 * $iLen, $iY, $hPen) EndSwitch Next Local $tPoint1 = DllStructCreate("float;float") Local $tPoint2 = DllStructCreate("float;float") DllStructSetData($tPoint1, 1, $iW / 2) ;x1 DllStructSetData($tPoint2, 1, $iW / 2) ;x2 Local $hLineBrush If $bFlip Then _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, 0, 0, $iWidth, 0, $hPen2) DllStructSetData($tPoint2, 2, $iH * 2 / 3) ;y2 DllStructSetData($tPoint1, 2, $iH / 3) ;y1 $hLineBrush = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrush", "struct*", $tPoint1, "struct*", $tPoint2, "uint", 0x00FFFFFF, "uint", 0xB0FFFFFF, "int", 0, "int*", 0) $hLineBrush = $hLineBrush[6] _GDIPlus_GraphicsFillRect($hCtxt_Bmp, 0, $iH * 2 / 3 + 1, $iW, $iH / 3, $hLineBrush) Else _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, 0, $iH - $iPenSize / 2, $iWidth, $iH - $iPenSize / 2, $hPen2) DllStructSetData($tPoint1, 2, 0) ;y1 DllStructSetData($tPoint2, 2, $iH / 3) ;y2 $hLineBrush = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrush", "struct*", $tPoint1, "struct*", $tPoint2, "uint", 0xB0FFFFFF, "uint", 0x00FFFFFF, "int", 0, "int*", 0) $hLineBrush = $hLineBrush[6] _GDIPlus_GraphicsFillRect($hCtxt_Bmp, 0, 0, $iW, $iH / 3, $hLineBrush) EndIf $iX = Mod($iX + $iSpeed, $iWidth) Local $hTextureBrush = DllCall($ghGDIPDll, "uint", "GdipCreateTexture", "handle", $hBmp, "int", 0, "int*", 0) $hTextureBrush = $hTextureBrush[3] _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $fPerc / 100 * $iW, $iH, $hTextureBrush) If $bFlip Then DllCall($ghGDIPDll, "uint", "GdipImageRotateFlip", "handle", $hBitmap, "int", 6) DllCall($ghGDIPDll, "int", "GdipSetTextRenderingHint", "handle", $hCtxt, "int", 4) Local $hBrush = _GDIPlus_BrushCreateSolid(0x40000000 + $iTextColor) Local $hFormat = _GDIPlus_StringFormatCreate() Local $hFamily = _GDIPlus_FontFamilyCreate($sFont) Local $hFont = _GDIPlus_FontCreate($hFamily, $iH * 3 / 5, 2) Local $tLayout = _GDIPlus_RectFCreate(0, 0, $iW, $iH) _GDIPlus_StringFormatSetAlign($hFormat, 1) _GDIPlus_GraphicsDrawStringEx($hCtxt, $sText, $hFont, $tLayout, $hFormat, $hBrush) _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush) _GDIPlus_PenDispose($hPen) _GDIPlus_PenDispose($hPen2) _GDIPlus_GraphicsDispose($hCtxt) _GDIPlus_GraphicsDispose($hCtxt_Bmp) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_BrushDispose($hTextureBrush) _GDIPlus_BrushDispose($hLineBrush) If $bHBitmap Then Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) Return $hHBITMAP EndIf Return $hBitmap EndFunc ;==>_GDIPlus_StripProgressbar tooltip color1 point -
Ok, this is one of the way to write the prefix "material-1a, material-1b & etc" to excel range A1 in column order: #include <Array.au3> #include <Excel.au3> Local $result[8],$result1 ; below is just some example for you to start ;you can use fileopendialog to retrieve multiple pdf files from certain directory ; then you convert the return value(obtained from fileopendialog) into array ; use pathsplit to obtain filenames only $result[0] = "material-1a_124567.pdf" $result[1]="material-1b_12345_12345.pdf" $result[2]="material-1c_12345_nesting.pdf" $result[3]="material-1d_us_04030-2010-09-03.pdf" $result[4]="material-1e_z35_SL1020_01.pdf" $result[5]="material-1f_W1305050.pdf" $result[6]="material-1g_SL1025_02.pdf" $result[7]="material-1h_painting.pdf" Local $oExcel=_ExcelBookNew() For $i =0 to 7 $result1=stringsplit($result[$i],"_",2) _ExcelWriteCell($oExcel,$result1[0],$i+1,1) next Msgbox(0,"","Write to excel file complete! Excel will close without saving!") _ExcelBookClose($oExcel,0) $oExcel=""1 point