Jump to content

Rewrite of the PowerPoint UDF


Recommended Posts

I use to be a C developer.  These Modern OO languages give me fits.  It have a hard time finding how to call a method properly and struggle to look up correctly :(

I got this VBA code (BELOW)  to work in Powerpoint as a macro.  What is the trick to translate it into autoit code?

 I greatly appreciate the help and  I am slowly picking up on how this stuff works.

- Rich

--------------------------------------------------------------------------

Sub IMAGE_ADJUST()

    Dim curSlide As Slide
    Dim curShape As Shape

    For Each curSlide In ActivePresentation.Slides
        For Each curShape In curSlide.Shapes
            With curShape

                .LockAspectRatio = msoFalse

                .ScaleHeight 3.38, msoTrue
                .ScaleWidth 5.13, msoTrue

                'position:
                .Rotation = 0
                .Left = 0
                .Top = 0

            End With
        Next curShape
    Next curSlide

End Sub

Link to post
Share on other sites
  • Replies 95
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Enhanced the PowerPoint UDF to version 1.0. New functions will be added in the future! Comments are welcome!

I have started to rewrite the PowerPoint UDF similar to the Word, Excel and Outlook UDF. The new UDF will not be compatible with the existing one. I will add examples, documentation, a section in th

I know this UDF won't be used on a daily basis like the Excel UDF. That's why I was reluctant for quite some time to start working on it. But as it would be useful for me I now use some of my spare ti

Should be something like this (untested):

; $oPPT is the PowerPoint application object returned by _PPT_Open

Func IMAGE_ADJUST()

    Local $curSlide, $curShape

    For $curSlide In $oPPT.ActivePresentation.Slides
        For $curShape In $curSlide.Shapes
            With $curShape
                .LockAspectRatio = $msoFalse

                .ScaleHeight(3.38, $msoTrue)
                .ScaleWidth(5.13, $msoTrue)

                'position:
                .Rotation = 0
                .Left = 0
                .Top = 0
            EndWith
        Next ; curShape
    Next ; curSlide

EndFunc

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

You are awesome!  Thanks.  The only thing I changed was I $mosTrue and #msoFalse, I just used the Boolean True and False Constants

Thanks again.  I am going to see if I can add a little more automation to it and traverse a directory and fix all the files I have.   Its for a library of songs we use at my church.  Its an older library and everything is in 4x3.  It would take hours to open every one up and fix them, so I was wanting to use this to fix them all. :)

Have a Happy Newyear!

Link to post
Share on other sites

Should be easy to do :)
Use
_FileListToArray or _FileListToArrayRec (recursive Version) to get an array with all the files to process.

Happy New Year!

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Thought I would share with you the final version I have made.  I need to go out to the church building and run it on our computer out there.  I tested it with a couple scenarios and it seemed to work great!  Thanks again for the help!  I am going to find a way to share this with other churches as well who may own the older versions of the songs and are looking for a way to convert their files.

- Rich

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#Include <PowerPoint.au3>
#include <Constants.au3>
#include <String.au3>
#include <Array.au3>
#include <File.au3>

Global $listing
Global $Total_Files
$directory = FileSelectFolder("Choose Folder to Search for Powerpoint Files", "")
   if @error then Exit

list($directory, 0)
$listing = StringTrimRight($listing, 1)
$listing = _StringExplode($listing, "|", 0)
_ArraySort($listing)

MsgBox($MB_SYSTEMMODAL, "CONVERSION", "  " & $Total_Files & " PowerPoint Files Found" & @CRLF & "  Press OK To Begin")

For $iCount = 0 To $Total_Files - 1
    File_Converter($listing[$iCount])
Next


;This Function builds a List of all the files to be converted including sub directories
Func list($path = "", $counter = 0)
  $counter = 0
  $path &= '\'
  Local $Check_File_Type
  Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*')
  If $demand_file = -1 Then Return ''
  While 1
    $file = FileFindNextFile($demand_file)
    If @error Then ExitLoop

    If @extended Then
     If $counter >= 10 Then ContinueLoop
       list($path & $file, $counter + 1)
    Else
       $Check_File_Type = StringRight($file,5)
       if ($Check_File_Type = ".pptx") Then
          $Total_Files = $Total_Files + 1
          $listing &= $path & $file & "|"
        Endif
     EndIf
  WEnd
  FileClose($demand_file)
EndFunc

;This Function Converts the Files from 4x3 to 16x9 and resizes the image in the file
Func File_Converter($File_Name)
   ; Set a variable to represent the 16x9 format
   Local Const $PpSlideSizeOnScreen16x9 = 15
   local $New_File_Name = $File_Name

   ;Create a Powerpoint object
   Local $oPPT = _PPT_Open()

   ;Set a variable with the file path and name to be opened
   Local $sPresentation = "C:\PowerPoint Converter\4by3.pptx"
   Local $sPresentation = $File_Name

   ;Open up the Powerpoint file
   Local $oPresentation = _PPT_PresentationOpen($oPPT, $sPresentation, True)
     if @error then ConsoleWrite ("Failed to Open Presentation"& @CRLF )

   ;Change the powerpoint to a 16 x 9 format
   $oPresentation.PageSetup.SlideSize = $PpSlideSizeOnScreen16x9

   ;Loop thtough all images and adjust them to the full screen size
   Local $curSlide, $curShape
     For $curSlide In $oPPT.ActivePresentation.Slides
         For $curShape In $curSlide.Shapes
             With $curShape
                 .LockAspectRatio = False
                 .ScaleHeight(3.38, True)
                 .ScaleWidth(5.13, True)
                 .Rotation = 0
                 .Left = 0
                 .Top = 0
             EndWith
         Next ; curShape
     Next ; curSlide

   ;Parse new File Name
   $New_File_Name = StringTrimRight($New_File_Name, 5)
   ;Save the Powerpoint with a new filename
   $New_File_Name = $New_File_Name & "(16x9).pptx"
   _PPT_PresentationSaveAs($oPresentation, $New_File_Name,$ppSaveAsPresentation, True)
     if @error then ConsoleWrite ("Failed to SaveAs Presentation"& @CRLF )

   ;Close the new Powerpoint file
   _PPT_PresentationClose($oPresentation)
     if @error then ConsoleWrite ("Failed to Close Presentation"& @CRLF )

   ;Close the Powerpoint program
   _PPT_Close($oPPT)
EndFunc

PowerPoint 4x3 to 16x9 Converter.au3

Edited by JLogan3o13
Link to post
Share on other sites

To speed up processing I suggest to call _PPT_Open once at the top of the script and _PPT_Close before you exit.
At the moment you do this for every presentation.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Another idea is to add HotKeySet to your script.
This could be used to exit your script any time when you encounter problems.
HotKeySet calls a function which then could close the active presentation, close Powerpoint and then exit the script.

Other issues:

  • The ConsoleWrites should write the name of the file being processed to the Console as well. So you know which file causes the problem.
  • _PPT_PresentationClose should be called with parameter $bSave set to False. When _PPT_PresentationSaveAs returns an error you execute _PPT_PresentationClose with parameter $bSave = True. This will fail as well.

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

I added in the ability to convert .ppt and .pptx files in case someone had old powerpoint files.

Did the Open once and close once as well.

-------------------------------------------------------------------------------------------

#Include <PowerPoint.au3>
#include <Constants.au3>
#include <String.au3>
#include <Array.au3>
#include <File.au3>

;Main Code Body
Global $listing
Global $Total_Files
$directory = FileSelectFolder("Choose Folder to Search for Powerpoint Files", "")
   if @error then Exit

;Create an array of Files
list($directory, 0)
$listing = StringTrimRight($listing, 1)
$listing = _StringExplode($listing, "|", 0)
_ArraySort($listing)

;Put a message box up prior to starting the conversion
MsgBox($MB_SYSTEMMODAL, "CONVERSION", "  " & $Total_Files & " PowerPoint Files Found" & @CRLF & "  Press OK To Begin")

;Create a Powerpoint object
Global $oPPT = _PPT_Open()

;Main Loop that goes through each file and converts it from 4x3 to 16x9
For $iCount = 0 To $Total_Files - 1
    File_Converter($listing[$iCount])
Next

;Close the Powerpoint program
_PPT_Close($oPPT)


;This Function builds a List of all the files to be converted including sub directories
Func list($path = "", $counter = 0)
  $counter = 0
  $path &= '\'
  Local $Check_File_Type_ppt
  Local $Check_File_Type_pptx
  Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*')
  If $demand_file = -1 Then Return ''
  While 1
    $file = FileFindNextFile($demand_file)
    If @error Then ExitLoop

    If @extended Then
     If $counter >= 10 Then ContinueLoop
       list($path & $file, $counter + 1)
    Else
       $Check_File_Type_pptx = StringRight($file,5)
       $Check_File_Type_ppt = StringRight($file,4)
       if ($Check_File_Type_pptx = ".pptx" or $Check_File_Type_ppt = ".ppt") Then
          $Total_Files = $Total_Files + 1
          $listing &= $path & $file & "|"
        Endif
     EndIf
  WEnd
  FileClose($demand_file)
EndFunc

;This Function converts the files from 4x3 to 16x9 and resizes the image in the file
Func File_Converter($File_Name)
   ; Set a variable to represent the 16x9 format
   Local Const $PpSlideSizeOnScreen16x9 = 15
   local $New_File_Name = $File_Name
   Local $Check_File_Type_ppt

   ;Set a variable with the file path and name to be opened
   Local $sPresentation = $File_Name

   ;Open up the Powerpoint file
   Local $oPresentation = _PPT_PresentationOpen($oPPT, $sPresentation, True)
     if @error then ConsoleWrite ("Failed to Open Presentation"& @CRLF )

   ;Change the powerpoint to a 16 x 9 format
   $oPresentation.PageSetup.SlideSize = $PpSlideSizeOnScreen16x9

   ;Loop thtough all images and adjust them to the full screen size
   Local $curSlide, $curShape
     For $curSlide In $oPPT.ActivePresentation.Slides
         For $curShape In $curSlide.Shapes
             With $curShape
                 ;Resize the image in the slide
                 .LockAspectRatio = False
                 .ScaleHeight(3.38, True)
                 .ScaleWidth(5.13, True)
                 .Rotation = 0
                 .Left = 0
                 .Top = 0
             EndWith
         Next ; curShape
     Next ; curSlide

   ;Parse new File Name
   $Check_File_Type_ppt = StringRight($New_File_Name, 3)
   ConsoleWrite ("Last 3 characters of a file"& $Check_File_Type_ppt & @CRLF )
   if ($Check_File_Type_ppt = "ppt") Then
     $New_File_Name = StringTrimRight($New_File_Name, 4)
   else
     $New_File_Name = StringTrimRight($New_File_Name, 5)
   EndIf

   ;SaveAs the Powerpoint with a new filename
   $New_File_Name = $New_File_Name & "(16x9)"
   _PPT_PresentationSaveAs($oPresentation, $New_File_Name,$ppSaveAsPresentation, True)
     if @error then ConsoleWrite ("Failed to SaveAs Presentation"& @CRLF )

   ;Close the new Powerpoint file
   _PPT_PresentationClose($oPresentation)
     if @error then ConsoleWrite ("Failed to Close Presentation"& @CRLF )


EndFunc

 

Edited by JLogan3o13
Link to post
Share on other sites

Got some feedback on my code formatting :)  I think I cleaned it up based on the editors settings for tab's

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#Include <PowerPoint.au3>
#include <Constants.au3>
#include <String.au3>
#include <Array.au3>
#include <File.au3>

;Main Code Body
Global $listing
Global $Total_Files
$directory = FileSelectFolder("Choose Folder to Search for Powerpoint Files", "")
    if @error then Exit

;Create an array of files based on the parent directory you choose
list($directory, 0)
$listing = StringTrimRight($listing, 1)
$listing = _StringExplode($listing, "|", 0)
_ArraySort($listing)

;Put a message box up prior to starting the conversion
MsgBox($MB_SYSTEMMODAL, "CONVERSION", "  " & $Total_Files & " PowerPoint Files Found" & @CRLF & "  Press OK To Begin")

;Open Powerpoint Application
Global $oPPT = _PPT_Open()

;Main Loop that goes through each file and converts it from 4x3 to 16x9
For $iCount = 0 To $Total_Files - 1
    File_Converter($listing[$iCount])
Next

;Close the Powerpoint Application
_PPT_Close($oPPT)

;This Function builds a List of all the files to be converted including sub directories
Func list($path = "", $counter = 0)
    $counter = 0
    $path &= '\'
    Local $Check_File_Type_ppt
    Local $Check_File_Type_pptx
    Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*')
    If $demand_file = -1 Then Return ''
        While 1
            $file = FileFindNextFile($demand_file)
                If @error Then ExitLoop
            If @extended Then
                If $counter >= 10 Then ContinueLoop
                    list($path & $file, $counter + 1)
                Else
                    $Check_File_Type_pptx = StringRight($file,5)
                    $Check_File_Type_ppt = StringRight($file,4)
                if ($Check_File_Type_pptx = ".pptx" or $Check_File_Type_ppt = ".ppt") Then
                    $Total_Files = $Total_Files + 1
                    $listing &= $path & $file & "|"
                Endif
            EndIf
        WEnd
    FileClose($demand_file)
EndFunc

;This Function converts the files from 4x3 to 16x9 and resizes the image in the file
Func File_Converter($File_Name)
    Local Const $PpSlideSizeOnScreen16x9 = 15 ;Set a variable to represent the 16x9 format
    Local $New_File_Name = $File_Name
    Local $Check_File_Type_ppt

    ;Set a variable with the file path and name to be opened
    Local $sPresentation = $File_Name

    ;Open up the Powerpoint file
    Local $oPresentation = _PPT_PresentationOpen($oPPT, $sPresentation, True)
        if @error then ConsoleWrite ("Failed to Open Presentation"& @CRLF )

    ;Change the powerpoint to a 16 x 9 format
    $oPresentation.PageSetup.SlideSize = $PpSlideSizeOnScreen16x9

    ;Loop thtough all images and adjust them to the full screen size
    Local $curSlide, $curShape
    For $curSlide In $oPPT.ActivePresentation.Slides
        For $curShape In $curSlide.Shapes
            With $curShape
                ;Resize the image in the slide
                .LockAspectRatio = False
                .ScaleHeight(3.38, True)
                .ScaleWidth(5.13, True)
                .Rotation = 0
                .Left = 0
                .Top = 0
            EndWith
        Next ; curShape
    Next ; curSlide

    ;Parse new File Name
    $Check_File_Type_ppt = StringRight($New_File_Name, 3)
    ConsoleWrite ("Last 3 characters of a file"& $Check_File_Type_ppt & @CRLF )
    if ($Check_File_Type_ppt = "ppt") Then
        $New_File_Name = StringTrimRight($New_File_Name, 4)
    else
        $New_File_Name = StringTrimRight($New_File_Name, 5)
    EndIf

    ;SaveAs the Powerpoint with a new filename
    $New_File_Name = $New_File_Name & "(16x9)"
    _PPT_PresentationSaveAs($oPresentation, $New_File_Name,$ppSaveAsPresentation, True)
        if @error then ConsoleWrite ("Failed to SaveAs Presentation"& @CRLF )

    ;Close the new Powerpoint file
    _PPT_PresentationClose($oPresentation)
        if @error then ConsoleWrite ("Failed to Close Presentation"& @CRLF )
EndFunc

PowerPoint Converter (4x3 to 16x9).au3

Link to post
Share on other sites

How to post code is described here:

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites
#Include <PowerPoint.au3>
#include <Constants.au3>
#include <String.au3>
#include <Array.au3>
#include <File.au3>

;Main Code Body
Global $listing
Global $Total_Files
$directory = FileSelectFolder("Choose Folder to Search for Powerpoint Files", "")
    if @error then Exit

;Create an array of files based on the parent directory you choose
list($directory, 0)
$listing = StringTrimRight($listing, 1)
$listing = _StringExplode($listing, "|", 0)
_ArraySort($listing)

;Put a message box up prior to starting the conversion
MsgBox($MB_SYSTEMMODAL, "CONVERSION", "  " & $Total_Files & " PowerPoint Files Found" & @CRLF & "  Press OK To Begin")

;Open Powerpoint Application
Global $oPPT = _PPT_Open()

;Main Loop that goes through each file and converts it from 4x3 to 16x9
For $iCount = 0 To $Total_Files - 1
    File_Converter($listing[$iCount])
Next

;Close the Powerpoint Application
_PPT_Close($oPPT)



;This Function builds a List of all the files to be converted including sub directories
Func list($path = "", $counter = 0)
    $counter = 0
    $path &= '\'
    Local $Check_File_Type_ppt
    Local $Check_File_Type_pptx
    Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*')
    If $demand_file = -1 Then Return ''
        While 1
            $file = FileFindNextFile($demand_file)
                If @error Then ExitLoop
            If @extended Then
                If $counter >= 10 Then ContinueLoop
                    list($path & $file, $counter + 1)
                Else
                    $Check_File_Type_pptx = StringRight($file,5)
                    $Check_File_Type_ppt = StringRight($file,4)
                if ($Check_File_Type_pptx = ".pptx" or $Check_File_Type_ppt = ".ppt") Then
                    $Total_Files = $Total_Files + 1
                    $listing &= $path & $file & "|"
                Endif
            EndIf
        WEnd
    FileClose($demand_file)
EndFunc



;This Function converts the files from 4x3 to 16x9 and resizes the image in the file
Func File_Converter($File_Name)
    Local Const $PpSlideSizeOnScreen16x9 = 15 ;Set a variable to represent the 16x9 format
    Local $New_File_Name = $File_Name
    Local $Check_File_Type_ppt

    ;Set a variable with the file path and name to be opened
    Local $sPresentation = $File_Name

    ;Open up the Powerpoint file
    Local $oPresentation = _PPT_PresentationOpen($oPPT, $sPresentation, True)
        if @error then ConsoleWrite ("Failed to Open Presentation"& @CRLF )

    ;Change the powerpoint to a 16 x 9 format
    $oPresentation.PageSetup.SlideSize = $PpSlideSizeOnScreen16x9

    ;Loop thtough all images and adjust them to the full screen size
    Local $curSlide, $curShape
    For $curSlide In $oPPT.ActivePresentation.Slides
        For $curShape In $curSlide.Shapes
            With $curShape
                ;Resize the image in the slide
                .LockAspectRatio = False
                .ScaleHeight(3.38, True)
                .ScaleWidth(5.13, True)
                .Rotation = 0
                .Left = 0
                .Top = 0
            EndWith
        Next ; curShape
    Next ; curSlide

    ;Parse new File Name
    $Check_File_Type_ppt = StringRight($New_File_Name, 3)
    ConsoleWrite ("Last 3 characters of a file"& $Check_File_Type_ppt & @CRLF )
    if ($Check_File_Type_ppt = "ppt") Then
        $New_File_Name = StringTrimRight($New_File_Name, 4)
    else
        $New_File_Name = StringTrimRight($New_File_Name, 5)
    EndIf

    ;SaveAs the Powerpoint with a new filename
    $New_File_Name = $New_File_Name & "(16x9)"
    _PPT_PresentationSaveAs($oPresentation, $New_File_Name,$ppSaveAsPresentation, True)
        if @error then ConsoleWrite ("Failed to SaveAs Presentation"& @CRLF )

    ;Close the new Powerpoint file
    _PPT_PresentationClose($oPresentation)
        if @error then ConsoleWrite ("Failed to Close Presentation"& @CRLF )
EndFunc

 

Link to post
Share on other sites

:thumbsup:

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Kanashius
      This UDF can be used to simply edit an Listview. There will be created an inputfield at the position of the subitem, with enter you save, use esc to interrupt,...
      You can specify single rows and cols or single field (giving row and col,...), also you can specify, if a singleclick or a doubleclick is needed to edit.
      If you like it, please leave me a comment, also if you have any suggestions to make it better or if you found bugs.
      I reworked the UDF with AutoIt v3.3.16.1 and added the functionality to use tab to go to the next cell.
      New Version: ListViewEditInput.au3 with example Example.au3
      The old version is left here: ListViewEditInput_v1_1_0.au3 with example Example_v1_1_0.au3
    • By noellarkin
      Other than different methodologies, are there any differences between the two? Does one work out to be faster or more reliable than the other when deployed at scale? I'm trying out both UDFs, was curious which method is preferred by the community.
    • By kurtykurtyboy
      GuiFlatButton is a UDF to easily create regular buttons with different colors for background, foreground, border, hover, focus, etc..
      This started as an effort to change the background color of a button and eventually grew into a full UDF.
      If you've looked around forums for changing button background colors, you have probably noticed that each proposed workaround has its own set of issues/side-effects. The answers usually circle back to 'use ownerdrawn buttons' and 'not worth it'. Well, now it is possible for anyone to easily create ownerdrawn buttons - totally worth it!
      Some issues with other workarounds such as drawing with GDI+ or using a colored label as a 'button':
      Not 'real' buttons so you lose built-in functionality that windows gives to buttons Messy / inefficient code in the main while loop to check for mouse position Slow to respond to click, paint, etc... Having to deal with GUIRegisterMsg messages Not straight-forward to implement GuiFlatButton is not a workaround; it is a technique to respond to Windows' built-in owner-drawn button events.
      With minimal effort, we can now create true simple colored buttons.
      The idea is to create an owner-drawn button using GUICtrlCreateButton then subclass the GUI and controls to handle the button-specific events to paint it however we want.
      This UDF magically does all of this for us! No need to worry about event handling or main while loop logic.
       
      How to use
      It couldn't be any easier! Simply create a new button using the familiar syntax. This creates an ownerdrawn button with default colors.
      $mybutton1 = GuiFlatButton_Create("Button 1", 78, 20, 120, 40) If you want to change the background and text colors:
      GuiFlatButton_SetBkColor(-1, 0x5555FF) GuiFlatButton_SetColor(-1, 0xFFFFFF) Advanced Usage
      Set background/text/border all at once
      GuiFlatButton_SetColors(-1, 0x0000FF, 0xFFFFFF, 0x9999FF) Set ALL colors for ALL button states! (normal, focus, hover, selected)
      Local $aColorsEx = [0x0000FF, 0xFFFFFF, -2, 0x4444FF, 0xFFFFFF, 0xAAAAFF, 0x6666FF, 0xFFFFFF, 0xCCCCFF, 0x0000EE, 0xFFFFFF, 0x7777EE] GuiFlatButton_SetColorsEx(-1, $aColorsEx) Set default colors to apply to any future buttons
      ;set colors GuiFlatButton_SetDefaultColors(0x0000FF, 0xFFFFFF, 0x9999FF) ;create buttons $mybutton1 = GuiFlatButton_Create("Button 1", 12, 20, 120, 40) $mybutton2 = GuiFlatButton_Create("Button 2", 143, 20, 120, 40) Set ALL color defaults
      ;set colors Local $aColorsEx = [0x0000FF, 0xFFFFFF, -2, 0x4444FF, 0xFFFFFF, 0xAAAAFF, 0x6666FF, 0xFFFFFF, 0xCCCCFF, 0x0000EE, 0xFFFFFF, 0x7777EE] GuiFlatButton_SetDefaultColorsEx($aColorsEx) ;create buttons $mybutton1 = GuiFlatButton_Create("Button 1", 12, 20, 120, 40) $mybutton2 = GuiFlatButton_Create("Button 2", 143, 20, 120, 40)  
      Available Functions
       
      Simple Example

      #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include "GuiFlatButton.au3" Example() ;GUI with one button Func Example() Local $hGUI, $mybutton1 $hGUI = GUICreate("GuiFlatButton Ex0", 275, 120) GUISetBkColor(0x333333) Local $idLabel = GUICtrlCreateLabel("Click the button", 10, 100, 150, 30) GUICtrlSetColor(-1, 0xFFFFFF) ;create new button then set the background and foreground colors $mybutton1 = GuiFlatButton_Create("Button 1" & @CRLF & "Line 2", 78, 20, 120, 40, $BS_MULTILINE) GuiFlatButton_SetBkColor(-1, 0x5555FF) GuiFlatButton_SetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW, $hGUI) Local $i = 0 Local $iMsg While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop Case $mybutton1 $i += 1 GUICtrlSetData($idLabel, $i) ConsoleWrite($i & @CRLF) EndSwitch Sleep(10) WEnd GUIDelete() EndFunc ;==>Example
      Menu/Toolbar Example

      #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include "GuiFlatButton.au3" Example() ;Example GUI with toolbar Func Example() Local $hGUI, $idLabel, $aButtons, $iTbSize $hGUI = GUICreate("GuiFlatButton Ex2", 300, 200) GUISetBkColor(0x444444) $idLabel = GUICtrlCreateLabel("Click a button", 10, 180, 150, 30) GUICtrlSetColor(-1, 0xFFFFFF) $aButtons = createToolbar() $iTbSize = UBound($aButtons) GUISetState(@SW_SHOW, $hGUI) Local $i = 0 Local $iMsg While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop Case $aButtons[0] To $aButtons[$iTbSize - 1] ConsoleWrite("1") GUICtrlSetData($idLabel, GuiFlatButton_Read($iMsg)) EndSwitch Sleep(10) WEnd GUIDelete() EndFunc ;==>Example Func createToolbar() Local $aButtons[6] Local $bkColor = 0x777777 Local $textColor = 0xFFFFFF Local $borderColor = 0x999999 Local $aBtnClrs[12] = [0x777777, 0xFFFFFF, $GUI_BKCOLOR_TRANSPARENT, 0x888888, 0xFFFFFF, $GUI_BKCOLOR_TRANSPARENT, 0x999999, 0xFFFFFF, $GUI_BKCOLOR_TRANSPARENT, 0x666666, 0xFFFFFF, $GUI_BKCOLOR_TRANSPARENT] For $i = 0 To UBound($aButtons) - 1 $aButtons[$i] = GuiFlatButton_Create("B" & $i, $i * 50, 0, 50, 17) GuiFlatButton_SetColorsEx($aButtons[$i], $aBtnClrs) Next Return $aButtons EndFunc ;==>createToolbar  
      Icon Example
      You can even easily add icons to your buttons -- just create a new button and send it an icon!

      #include <GDIPlus.au3> #include "GuiFlatButton.au3" Example() ;buttons with Icon images Func Example() ;get images for demonstration _GDIPlus_Startup() ;initialize GDI+ Local $hIcon = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 258, 24, 24) ;extract the 'Save' icon Local $hBitmap = _GDIPlus_BitmapCreateFromHICON($hIcon) ;Create Bitmap from Icon (for demonstration) Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) ;Create HBitmap from Bitmap _GDIPlus_BitmapDispose($hBitmap) ;dispose the bitmap _GDIPlus_Shutdown() ;done with GDI+ Local $hGUI = GUICreate("GuiFlatButton Ex5", 255, 400) GUISetBkColor(0xEEEEEE) ;set default colors of future buttons Local $aColorsEx = _ [0xE2E5E8, 0X000000, 0x888888, _ ; normal : Background, Text, Border 0xE2E5E8, 0X000000, 0x333333, _ ; focus : Background, Text, Border 0xE8E8E8, 0X000000, 0x666666, _ ; hover : Background, Text, Border 0xDDDDDD, 0X000000, 0xAAAAAA] ; selected : Background, Text, Border GuiFlatButton_SetDefaultColorsEx($aColorsEx) ;normal button with icon $label1 = GUICtrlCreateLabel( "$BS_TOOLBUTTON -->", 5, 10) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Local $mybutton1 = GuiFlatButton_Create("Save", 130, 5, 50, 48, $BS_TOOLBUTTON) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybutton1), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align top Local $mybuttonT = GuiFlatButton_Create("Top", 5, 65, 120, 55, $BS_TOP) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonT), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align top-left Local $mybuttonTL = GuiFlatButton_Create("Top-Left", 5, 125, 120, 55, BITOR($BS_TOP, $BS_LEFT)) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonTL), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align top-right Local $mybuttonTR = GuiFlatButton_Create("Top-Right", 5, 185, 120, 55, BITOR($BS_TOP, $BS_RIGHT)) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonTR), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align left Local $mybuttonL = GuiFlatButton_Create("Left", 5, 245, 120, 55, $BS_LEFT) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonL), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align bottom Local $mybuttonB = GuiFlatButton_Create("Bottom", 130, 65, 120, 55, $BS_BOTTOM) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonB), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align bottom-left Local $mybuttonBL = GuiFlatButton_Create("Bottom-Left", 130, 125, 120, 55, BITOR($BS_BOTTOM, $BS_LEFT)) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonBL), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align bottom-right Local $mybuttonBR = GuiFlatButton_Create("Bottom-Right", 130, 185, 120, 55, BITOR($BS_BOTTOM, $BS_RIGHT)) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonBR), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align right Local $mybuttonR = GuiFlatButton_Create("Right", 130, 245, 120, 55, $BS_RIGHT) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonR), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) GuiFlatButton_SetState($mybuttonR, $GUI_DISABLE ) ;disabled Local $mybuttonDisable = GuiFlatButton_Create("Disabled", 130, 310, 120, 55, $BS_TOOLBUTTON) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonDisable), $BM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap)) GuiFlatButton_SetState($mybuttonDisable, $GUI_DISABLE ) ;clean up! _WinAPI_DestroyIcon( $hIcon ) _WinAPI_DeleteObject( $hHBitmap ) GUISetState(@SW_SHOW, $hGUI) Local $iMsg While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep(10) WEnd GUIDelete() EndFunc ;==>Example  
      I'm sure there are some use-cases I've forgotten, so feedback is welcome!
       
      Download the latest UDF and several more examples:
      GuiFlatButton_20220919.zip (1,121)
      Update 2022-09-19
      Added update from 05/25 back in after it was accidentally removed
      Update 2022-09-01
      Added $BS_MULTILINE button style
      Added ellipses when text is longer than the button
      Fixed compatibility with Opt("MustDeclareVars", 1)
      Update 2022-05-25
      Fixed issue, buttons disappear when a GUI containing a child window with WS_EX_MDICHILD extended style is moved
      Update 2022-05-24
      Fixed issue releasing subclassing when GUI is deleted but program is not closed
      Fixed occasional white background flicker
      Added function GuiFlatButton_GetPos
      Update 2021-01-02
      Fixed bug, not drawing correctly after deleting GUI with GUIDelete()
      Fixed bug, changing default colors changed all buttons, even previously created buttons
      Made some internal functions more efficient
      Update 2019-04-14
      Fixed bug, not showing pressed down state when clicking rapidly
      Added Icon/Bitmap support!
      Added function GuiFlatButton_SetPos to change the position and/or size of a button
      Update 2019-02-09
      Added 2 new functions to set the button colors globally for all future buttons.
      GuiFlatButton_SetDefaultColors 
      GuiFlatButton_SetDefaultColorsEx

      Credits to:
      Melba23 (UDF template)
      LarsJ (general subclassing code)
      4ggr35510n (TrackMouseEvent example)
      binhnx (disable dragging with $WS_EX_CONTROLPARENT)
      GUIRegisterMsg in AutoIt Help (owner-draw button example)
      funkey (_WinAPI_DrawState example)
       
       
       
       
    • By t0nZ
      Always searching for the "final" solution to my zipping/unzipping needs, I started years ago using WinRar with AutoIT (don't ask me why...) and for the last 10 years I worked well with the _zip.UDF , a good solution using the embedded windows zipfldr.dll.
      But often I work with a lot of data (both multi gigabytes and/or 100K+ files) and I noticed the performance of the windows zip DLL are not so good, the problem is maybe worsened by the mono thread operation using AutoIT +  zipfldr.dll.
      SO my choice is 7zip (7ZA.exe)  also for licence (freeware also for business) reasons, and I wrote a small and simple UDF:
      ; #INDEX# ======================================================================================================================= ; Title .........: _7za ; AutoIt Version : 3.3.16.0 ; Language ......: English ; Description ...: Functions for using 7za.exe archive manipulation app ; Author(s) .....: NSC ; Version .......: 1.2 ; Date ..........: 2022/06/28 ; =============================================================================================================================== ; ------------------------------------------------------------------------------ ; This software is provided 'as-is', without any express or ; implied warranty. In no event will the authors be held liable for any ; damages arising from the use of this software. ; #INCLUDES# =================================================================================================================== ; #include-once #include <AutoItConstants.au3> ; =============================================================================================================================== ; #VARIABLES# =================================================================================================================== ; Global Global $7za_exe = @ScriptDir & "\" & "7za.exe" ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ; _EXEC7za ;_UNcompress_7za ;_COMpress_7za_7z ;_COMpress_7za_zip ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: _EXEC7za ; Description ...: launch 7Za.exe with params and returns exit codes ; Syntax ........: EXEC7za($7zCommands, $archive, $folder[, $show]) ; Parameters ....: $7zCommands - 7zip command line params ; $archive - complete path to the archive ; $folder - the source/destination folder ; $show - optional set the state of 7za console visibility, default @SW_HIDE, ; other values as ShellExecuteWait() ; Return values .: 1 - Success ; 0 - and set @error = 1 ; and ; @extended = 1 (Warning (Non fatal error(s)) ; @extended = 2 (Fatal error) ; @extended = 7 (Command line error) ; @extended = 8 (Not enough memory for operation) ; @extended = 255 (User stopped the process) ; @extended values set by 7za.exe exit codes ; Author ........: NSC ; Modified ......: 2022/05/13 ; Remarks .......: requires 7za.exe in @scriptdir, 7za.exe (7-Zip Extra: standalone console version) ; Thanks to 7-zip.org ; Related .......: ; Link ..........: ; Examples .......: compress a folder recursive with subfolders ; EXEC7za("u -mx4 -bt", c:\folder1\archive.7z", c:\folder1\folderTOcompress\ ) ; uncompress the same folder recursive ; EXEC7za("x -aoa -bt -r", "c:\folder1\archive.7z", "-oc:\folder2\") ; =============================================================================================================================== Func _EXEC_7za($7zCommands, $archive, $folder, $show = @SW_HIDE) Local $return7za = ShellExecuteWait($7za_exe, $7zCommands & ' "' & $archive & '" "' & $folder & '"', '', $SHEX_OPEN, $show) Select Case $return7za = 0 Return 1 Case Else Return SetError(1, $return7za, 0) EndSelect EndFunc ;==>_EXEC_7za ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UNcompress_7za ; Description ...: launch 7Za.exe with preset params to uncompress an archive (.7z or .zip recursively) and returns exit codes ; Syntax ........: _UNcompress_7za($archive, $folder[, $show]) ; Parameters ....: $archive - complete path to the archive ; $folder - the source/destination folder ; $show - optional set the state of 7za console visibility, default @SW_HIDE, ; other values as ShellExecuteWait() ; Return values .: 1 - Success ; 0 - and set @error = 1 ; and ; @extended = 1 (Warning (Non fatal error(s)) ; @extended = 2 (Fatal error) ; @extended = 7 (Command line error) ; @extended = 8 (Not enough memory for operation) ; @extended = 255 (User stopped the process) ; @extended values set by 7za.exe exit codes ; Author ........: NSC ; Modified ......: 2022/05/19 ; Remarks .......: requires 7za.exe in @scriptdir, 7za.exe (7-Zip Extra: standalone console version) ; Thanks to 7-zip.org ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _UNcompress_7za($archive, $folder, $show = @SW_HIDE) Local $return7za = ShellExecuteWait($7za_exe, "x -aoa -bt -r" & ' "' & $archive & '" -o"' & $folder & '"', '', $SHEX_OPEN, $show) Select Case $return7za = 0 Return 1 Case Else Return SetError(1, $return7za, 0) EndSelect EndFunc ;==>_UNcompress_Folder_7za ; #FUNCTION# ==================================================================================================================== ; Name ..........: _COMpress_7za_7z ; Description ...: launch 7Za.exe with precompiled params to compress in .7z format ;a single file, a filtered (*.pdf) bunch of files or a folder (recursively) and returns exit codes ; Syntax ........: _COMpress_7za_7z($archive, $folder[, $show [, $compLvl]] ) ; Parameters ....: $archive - complete path to the archive ; $folder - the source file(s) / folder ; $show - optional set the state of 7za console visibility, default @SW_HIDE, ; other values as ShellExecuteWait() ; $CompLvl - optional compression level (1-9) default 4 ; Return values .: 1 - Success ; 0 - and set @error = 1 ; and ; @extended = 1 (Warning (Non fatal error(s)) ; @extended = 2 (Fatal error) ; @extended = 7 (Command line error) ; @extended = 8 (Not enough memory for operation) ; @extended = 255 (User stopped the process) ; @extended values set by 7za.exe exit codes ; Author ........: NSC ; Modified ......: 2022/06/22 ; Remarks .......: requires 7za.exe in @scriptdir, 7za.exe (7-Zip Extra: standalone console version) ; avoids re-compress of popular archives. ; Thanks to 7-zip.org ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _COMpress_7za_7z($archive, $folder, $show = @SW_HIDE, $CompLvl = 4) If StringRight($folder, 4) = ".zip" Or StringRight($folder, 3) = ".7z" Or StringRight($folder, 4) = ".rar" Or StringRight($folder, 4) = ".lha" Or StringRight($folder, 3) = ".gz" Or StringRight($folder, 7) = ".tar.gz" Or StringRight($folder, 4) = ".iso" Then $CompLvl = 0 EndIf Local $return7za = ShellExecuteWait($7za_exe, 'u -mx' & $CompLvl & ' -mmt -bt' & ' "' & $archive & '" "' & $folder & '"', '', $SHEX_OPEN, $show) Select Case $return7za = 0 Return 1 Case Else Return SetError(1, $return7za, 0) EndSelect EndFunc ;==>_COMpress_7za_7z ; #FUNCTION# ==================================================================================================================== ; Name ..........: _COMpress_7za_zip ; Description ...: launch 7Za.exe with precompiled params to compress in zip format ; a single file, a filtered (*.pdf) bunch of files or a folder (recursively) and returns exit codes ; Syntax ........: _COMpress_7za_zip($archive, $folder[, $show [, $compLvl]] ) ; Parameters ....: $archive - complete path to the archive ; $folder - the source file(s) / folder ; $show - optional set the state of 7za console visibility, default @SW_HIDE, ; other values as ShellExecuteWait() ; $CompLvl - optional compression level (1-9) default 4 ; Return values .: 1 - Success ; 0 - and set @error = 1 ; and ; @extended = 1 (Warning (Non fatal error(s)) ; @extended = 2 (Fatal error) ; @extended = 7 (Command line error) ; @extended = 8 (Not enough memory for operation) ; @extended = 255 (User stopped the process) ; @extended values set by 7za.exe exit codes ; Author ........: NSC ; Modified ......: 2022/06/22 ; Remarks .......: requires 7za.exe in @scriptdir, 7za.exe (7-Zip Extra: standalone console version), ; avoids re-compress of popular archives. ; Thanks to 7-zip.org ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _COMpress_7za_zip($archive, $folder, $show = @SW_HIDE, $CompLvl = 9) If StringRight($folder, 4) = ".zip" Or StringRight($folder, 3) = ".7z" Or StringRight($folder, 4) = ".rar" Or StringRight($folder, 4) = ".lha" Or StringRight($folder, 3) = ".gz" Or StringRight($folder, 7) = ".tar.gz" Or StringRight($folder, 4) = ".iso" Then $CompLvl = 0 EndIf Local $return7za = ShellExecuteWait($7za_exe, 'u -tzip -mx' & $CompLvl & ' -mmt -bt' & ' "' & $archive & '" "' & $folder & '"', '', $SHEX_OPEN, $show) Select Case $return7za = 0 Return 1 Case Else Return SetError(1, $return7za, 0) EndSelect EndFunc ;==>_COMpress_7za_zip You have to provide 7za.exe, in scriptdir in some way, maybe with a fileinstall or embedding in some way. 
      Daily I use most of the time:
      _UNcompress_7za
      _COMpress_7za_7z
      so I'am almost done with these funcs....
      Also I made a quick and dirty benchmark on some real world data (for me at least) , comparing the windows DLL, the zip ULTRA by 7zip and the various 7zip levels.

      My choice is level 4 (time/size) but your mileage may vary...
      Also, extracting many thousands of little files from a 7z archive with 7zip is waaaay fast in respect to other solutions.
    • By Kanashius
      This UDF can be used to draw at the Desktop Wallpaper (Windows 8+) with GDI+ without using files.
      The example runs with 60-120fps at my machine, so the speed is acceptable.
      When the script exits, the original wallpaper is restored.
      Have fun :).
      PS: The UDF uses the window between the background and the icons, so it could be used to add an own child window at the desktop. Just look at the begin of __Wallpaper_Startup ($hWorkerW).
       
      Example:
       
      WallpaperUDF.au3 WallpaperUDF Example.au3
×
×
  • Create New...