Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/16/2015 in all areas

  1. Note that this is a real Windows Explorer. But only the right pane. All functionality of Windows Explorer is working. E.g. keyboard shortcuts, the context (right click) menu, cut, copy, paste, drag & drop and automatic update of the window. Implementations There are three implementations: An implementation for Vista, 7 and 8, an implementation for Windows XP, and a SysListView32 based implementation for Vista, 7 and 8. The latter is named SysLv32.au3 in the examples. This is more or less the Windows XP implementation adapted for Vista, 7 and 8. Functionality The implementations are based on Shell interfaces. This means that most functionality of Windows Explorer is working automatically without any additional code. Other features: Position Explorer window in GUISpecify root and start foldersSpecify an initial icon view modeSpecify an icon view mode for the DesktopSpecify a file filter to filter files by extensionUse folder flags $FWF_NOBACKBROWSING, $FWF_SINGLESEL and $FWF_NOSUBFOLDERSBrowse to child/parent folder with Enter/Backspace keysDelete, disable and insert items in the context menuExecute context menu commands in codeDocumentation Use ExplorerWindowCreate() to create the right pane window. This function is located in Explorer\<Implementation>\WindowsExplorer.au3. You find documentation for the function in top of the file. Documentation for the Vista, 7, 8 implementation is included in the Examples section below. Ini file To handle Rename, New and View in the context menu, it's necessary to be able to identify these items. This seems only to be possible to do, by identifying the names. Because the names are localized, an ini file is used to store the names. Especially the View command depends on the ini file. If the View command isn't recognized, the icon view modes are not set properly. Rename and New commands are depending on the ini file, when the commands are selected with the keyboard. More information in the sections below. First release 2013-11-28 In first release Explorer right pane windows are created with enough functionality to get it to work. There are two implementations: One for Vista, 7 and 8, and one for Windows XP. First update 2014-03-14 This update consists primarily of bug fixes in first release. Because both APIConstants.au3 and WinAPIEx.au3 are included, the scripts can't run on AutoIt 3.3.10 without modifications. A new implementation for Vista, 7 and 8 is added. This implementation is based on a SysListView32 control. This is more or less the Windows XP implementation adapted for Vista, 7 and 8. Second update 2014-04-23 The implementations are based on Shell interfaces, and most functionality of Windows Explorer is working automatically. But you still have to integrate that functionality into your script. Especially you have to take care of keystrokes in combination with various controls and windows. E.g. the rename edit box, the context menu and dialog boxes. This update introduces an ini file: Explorer\Inifiles\ContextMenu.ini Third update 2014-05-02 The third update is mostly about the context menu. It's divided into two parts. The first part is about manipulating the context menu. The example shows how to delete, disable and add custom menu items. The second part shows how to execute context menu commands in code. The example implements Cut, Copy and Paste buttons. The spoiler section starts with an explanation of the message flow and message handlers. Final release 2014-05-10 Left, top, width and height parameters are added to the ExplorerWindowCreate() function. This makes it easier to position the Explorer window in the GUI. When the GUI is resized, the Explorer window is resized so that margins are retained. The margins can be used for buttons or other controls. The new parameters are implemented in the examples. Redundant code is moved from example files to common files. Some minor bug fixes. This is the final release of the small examples. It should not be too difficult to reuse the examples and code. I'm currently working on a large example where an address bar, a toolbar, a left pane and a status bar is implemented besides the right pane. This is a much bigger example, and it'll be more difficult to reuse the code. I'll probably add this example to a new thread. Final release, Vista update 2014-06-21 The Vista, 7, 8 example in first release dated 2013-11-28 was based on Vista code. The XP example was based on XP code. But most of the additional code in the next updates was XP code (see post 40). This meant that some functionality wasn't implemented completely under Vista and later. E.g. icon view modes. Examples The zip contains seven folders at the top level: 1. Basic example2. Position and size3. Navigation buttons4. Toolbar example5. Context menu6. Cut-copy-pasteExplorerThe first six folders are examples. The Explorer folder contains common files and includes. Resources specific for a particular example are contained in the example folder. There are three scripts for each example: Vista, 7, 8.au3, SysLv32.au3 and Windows XP.au3. Other examples (Vista and later) in posts below: Three examples where all panes are implemented (not just the right pane)You can find an example which implements the other panes in this post.This example shows how to merge all include files into a single Include folder.Implement proper tab order between LV and TV, and update LV on up/down keys in TV here.An example that shows how to cancel drag/drop operations can be found here. AutoIt 3.3.8 If you want to run the scripts on AutoIt 3.3.8 you need APIConstants.au3 and WinAPIEx.au3 by Yashied. The UDFs are not included in the zip. You must enable the UDFs in top of ShellFunctions.au3. The UDFs are already added, but commented out. And you must comment out the 3.3.10 UDFs in ShellFunctions.au3 and WERPFuncs.au3. Testet on XP 32 bit and Win 7 32/64 bit. The scripts can be run as both 32 and 64 bit programs. If you are running a 64 bit Windows you should run the scripts as 64 bit programs. Windows Explorer right pane.7z
    1 point
  2. For BMP it should be the same as the PNG but without transparency. For GIF it is dithered because of 8-bit (max. 256 color). For JPG you can set the quality but not with that code.
    1 point
  3. Try this: #include <GDIPlus.au3> _GDIPlus_Startup() $hImage = _GDIPlus_BitmapCreateFromMemory(InetRead("http://lifestyle.classifiedads4free.com/wp-content/uploads/2014/06/clash-of-clans-logo-672x321.png", 8)) $iW = _GDIPlus_ImageGetWidth($hImage) $iH = _GDIPlus_ImageGetHeight($hImage) $hImage_new = _GDIPlus_BitmapCreateFromScan0($iW, $iH) $hGfx = _GDIPlus_ImageGetGraphicsContext($hImage_new) _GDIPlus_GraphicsDrawImageRect($hGfx, $hImage, 0, 0, $iW, $iH) _GDIPlus_ImageSaveToFile($hImage_new, @ScriptDir & "\clash-of-clans-logo-672x321.jpg") _GDIPlus_ImageSaveToFile($hImage_new, @ScriptDir & "\clash-of-clans-logo-672x321.gif") _GDIPlus_ImageSaveToFile($hImage_new, @ScriptDir & "\clash-of-clans-logo-672x321.bmp") _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_ImageDispose($hImage) _GDIPlus_ImageDispose($hImage_new) _GDIPlus_Shutdown()I cannot tell you why this effect appears when the image is directly saved!
    1 point
  4. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <InetConstants.au3> #include <MsgBoxConstants.au3> #Include <String.au3> #include <INet.au3> #include <Array.au3> #include <File.au3> If IsInstalled("Flash") == 1 Then msgbox("","", "Installed") Else msgbox("","", "Not installed") EndIf Func IsInstalled($progName) Local $InstallPrograms = GetList() If $InstallPrograms == -1 Then Return -1 ; Cannot get list For $program in $InstallPrograms if StringInStr(StringLower($program.Caption),StringLower($progName)) Then ConsoleWrite($program.Caption & " : " & $progName & @CRLF) Return 1; EndIf Next Return -2 ; Didn't find program. EndFunc Func GetList() $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output &= "Computer: " & $strComputer & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Product", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then Return $colItems EndIf Return -1 EndFuncSaludos
    1 point
  5. Fixed yourss... #include <MsgBoxConstants.au3> #include <Array.au3> $TimField = IniReadSectionNames(@DesktopDir & "\Data.ini") _ArrayDisplay($TimField) For $x = 1 To $TimField[0] $TimField1 = IniReadSection(@DesktopDir & "\Data.ini", $TimField[$x]) For $i = 1 To $TimField1[0][0] MsgBox(0, "Section Name " & $x & " n" & $TimField[$x], "Key: " & $TimField1[$i][1] & @CRLF & "Value: " & $TimField1[$i][1]) Next Next A little slow here.. 8)
    1 point
  6. Here's one way to do it, I switched the MsgBox to consolewrite so you won't have to hit Ok 75 times. #include <array.au3> $IniFileName = @DesktopDir & "\Data.ini" $TimField = IniReadSectionNames($IniFileName) _ArrayDisplay($TimField) For $OuterLoop = 1 To $TimField[0] $TimField1 = IniReadSection($IniFileName, $TimField[$OuterLoop]) ConsoleWrite("Section: " & $TimField[$OuterLoop] & @CRLF) For $InnerLoop = 1 To $TimField1[0][0] ConsoleWrite("Key: " & $TimField1[$InnerLoop][1] & @TAB & "Value: " & $TimField1[$InnerLoop][1] & @CRLF) Next Next
    1 point
  7. water

    Open Excel File on Desktop?

    Or #include <Excel.au3> Global $oExcel = _Excel_Open() Global $oWorkbook = _Excel_BookOpen($oExcel, "C:\Users\TEaston\Desktop\Abacus List.xls")
    1 point
  8. Or quotes used instead of angle brackets, like in the link mikell posted.
    1 point
  9. are you sure you created the profiles correctly? check this link maybe it helps in profile creation...Link
    1 point
  10. There is experimental feature available in some latest versions of AutoIt that allows you to create COM objects from modules without any demand on user to register anything. It would be something like this: ; Object identifiers Global Const $sCLSID_OleDocumentProperties = "{58968145-CF05-4341-995F-2EE093F6ABA3}" Global Const $IID_OleDocumentProperties = "{58968145-CF01-4341-995F-2EE093F6ABA3}" $sDll = "dsofile.dll" ; location and name of your dll $hDll = DllOpen($sDll) ; open it ; Experimenal feature. Try with newer versions of AutoIt $oObj = ObjCreate($sCLSID_OleDocumentProperties, $IID_OleDocumentProperties, $hDll) ; Check for errors and work with object ;...
    1 point
×
×
  • Create New...