Jump to content

Search the Community

Showing results for tags 'shortcut'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 18 results

  1. Unfortunately, in Windows 11 the function to add a shortcut to the taskbar for quick access to desktop icons has been removed and since I relatively often need the desktop icons for daily work, I wrote a small tool to help me access the desktop icons faster which I want to share with you. The tool is written for Windows 11, so on older operating systems the result may differ. #pragma compile(FileVersion, 0.8.0.0) #pragma compile(ProductVersion, 3.3.16.1) #pragma compile(LegalCopyright, "UEZ 2022 - 2023") #pragma compile(CompanyName, "UEZ Software Development") #pragma compile(FileDescription, "Toolbar Desktop.exe - a simple toolbar menu app for Windows 11 to access desktop icons faster.") ;don't change because it is needed #pragma compile(Icon, Shell32_39.ico) ;~ #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_Change2CUI=n #AutoIt3Wrapper_Version=p #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_HiDpi=n #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /pe ;/rm ;~ #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3" #Include <Array.au3> #Include <ButtonConstants.au3> #Include <File.au3> #Include <FontConstants.au3> #Include <GDIPlus.au3> #Include <GUIConstantsEx.au3> #Include <GuiImageList.au3> #Include <GuiListView.au3> #Include <GuiMenu.au3> #Include <GuiStatusBar.au3> #Include <Misc.au3> #Include <StaticConstants.au3> #Include <TrayConstants.au3> #Include <WinAPIShellEx.au3> #Include <WinAPISys.au3> #Include <WinAPIvkeysConstants.au3> #Include <WindowsConstants.au3> If @OSBuild < 7600 Then Exit MsgBox($MB_ICONERROR, "ERROR", "This app is using the Win7+ API which means that your operation system is not supported!", 10) If @OSBuild < 22000 Then MsgBox($MB_ICONWARNING, "WARNING", "This app is not designed for your operating system." & @CRLF & "The app may not work as intended!", 10) AutoItSetOption("TrayMenuMode", 3) AutoItSetOption("MustDeclareVars", 1) If (Not @Compiled) And (Not FileExists(@ScriptDir & "\_Shell32_39.ico")) Then _Shell32_39ico(True) Global Const $sScriptName = StringTrimRight(@ScriptName, 4) Global Const $sTitle = "Toolbar Desktop ", $sVer = "v0.80 build 2023-08-31 beta" Global $iPID = ProcessExists(@ScriptName) If Not _Singleton(@ScriptName, 1) Or ($iPID <> @AutoItPID And $iPID <> 0) Then Exit MsgBox(16, "ERROR", "An occurence of " & @ScriptName & " is already running", 20) _GDIPlus_Startup() #OnAutoItStartRegister "OnAutoItStart" Global $__Restart = False #Region DPI Global Enum $DPI_AWARENESS_INVALID = -1, $DPI_AWARENESS_UNAWARE = 0, $DPI_AWARENESS_SYSTEM_AWARE = 1, $DPI_AWARENESS_PER_MONITOR_AWARE = 2 Global Const $DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = $DPI_AWARENESS_UNAWARE - 3 Global Const $DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = $DPI_AWARENESS_UNAWARE - 4 Global Enum $MDT_EFFECTIVE_DPI = 0, $MDT_ANGULAR_DPI, $MDT_RAW_DPI Global Const $MDT_DEFAULT = $MDT_EFFECTIVE_DPI Global Const $WM_DPICHANGED = 0x02E0 Global $AWARENESS Switch @OSBuild Case 9200 To 13999 $AWARENESS = $DPI_AWARENESS_PER_MONITOR_AWARE Case @OSBuild > 13999 $AWARENESS = $DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 EndSwitch Global $iDPI = _WinAPI_SetDPIAwareness($AWARENESS), $iDPI_def = 96, $g_iDPI_ratio1, $g_iDPI_ratio2, $g_iDPI_Prev = $iDPI, $bSorted = 0 $g_iDPI_ratio1 = $iDPI / $iDPI_def $g_iDPI_ratio2 = $g_iDPI_ratio1 ^ - 1 #EndRegion #Region IUIAutomation MS framework Global Const $TreeScope_Children = 2, $UIA_ControlTypePropertyId = 30003, $UIA_NamePropertyId = 30005, $UIA_ButtonControlTypeId = 50000 Global Const $sCLSID_CUIAutomation = "{FF48DBA4-60EF-4201-AA87-54103EEF594E}" Global Const $sIID_IUIAutomationElement = "{D22108AA-8AC5-49A5-837B-37BBB3D7591E}" Global $dtagIUIAutomationElement = "SetFocus hresult();" & "GetRuntimeId hresult(ptr*);" & "FindFirst hresult(long;ptr;ptr*);" & "FindAll hresult(long;ptr;ptr*);" & "FindFirstBuildCache hresult(long;ptr;ptr;ptr*);" & "FindAllBuildCache hresult(long;ptr;ptr;ptr*);" & "BuildUpdatedCache hresult(ptr;ptr*);" & "GetCurrentPropertyValue hresult(int;variant*);" & "GetCurrentPropertyValueEx hresult(int;long;variant*);" & "GetCachedPropertyValue hresult(int;variant*);" & "GetCachedPropertyValueEx hresult(int;long;variant*);" & "GetCurrentPatternAs hresult(int;none;none*);" & "GetCachedPatternAs hresult(int;none;none*);" & "GetCurrentPattern hresult(int;ptr*);" & "GetCachedPattern hresult(int;ptr*);" & "GetCachedParent hresult(ptr*);" & "GetCachedChildren hresult(ptr*);" & "CurrentProcessId hresult(int*);" & "CurrentControlType hresult(int*);" & "CurrentLocalizedControlType hresult(bstr*);" & "CurrentName hresult(bstr*);" & "CurrentAcceleratorKey hresult(bstr*);" & "CurrentAccessKey hresult(bstr*);" & "CurrentHasKeyboardFocus hresult(long*);" & "CurrentIsKeyboardFocusable hresult(long*);" & "CurrentIsEnabled hresult(long*);" & "CurrentAutomationId hresult(bstr*);" & "CurrentClassName hresult(bstr*);" & "CurrentHelpText hresult(bstr*);" & "CurrentCulture hresult(int*);" & "CurrentIsControlElement hresult(long*);" & "CurrentIsContentElement hresult(long*);" & "CurrentIsPassword hresult(long*);" & "CurrentNativeWindowHandle hresult(hwnd*);" & "CurrentItemType hresult(bstr*);" & "CurrentIsOffscreen hresult(long*);" & "CurrentOrientation hresult(long*);" & "CurrentFrameworkId hresult(bstr*);" & "CurrentIsRequiredForForm hresult(long*);" & "CurrentItemStatus hresult(bstr*);" & "CurrentBoundingRectangle hresult(struct*);" & "CurrentLabeledBy hresult(ptr*);" & "CurrentAriaRole hresult(bstr*);" & "CurrentAriaProperties hresult(bstr*);" & "CurrentIsDataValidForForm hresult(long*);" & "CurrentControllerFor hresult(ptr*);" & "CurrentDescribedBy hresult(ptr*);" & "CurrentFlowsTo hresult(ptr*);" & "CurrentProviderDescription hresult(bstr*);" & "CachedProcessId hresult(int*);" & "CachedControlType hresult(int*);" & "CachedLocalizedControlType hresult(bstr*);" & "CachedName hresult(bstr*);" & "CachedAcceleratorKey hresult(bstr*);" & "CachedAccessKey hresult(bstr*);" & "CachedHasKeyboardFocus hresult(long*);" & "CachedIsKeyboardFocusable hresult(long*);" & "CachedIsEnabled hresult(long*);" & "CachedAutomationId hresult(bstr*);" & "CachedClassName hresult(bstr*);" & "CachedHelpText hresult(bstr*);" & "CachedCulture hresult(int*);" & "CachedIsControlElement hresult(long*);" & "CachedIsContentElement hresult(long*);" & "CachedIsPassword hresult(long*);" & "CachedNativeWindowHandle hresult(hwnd*);" & "CachedItemType hresult(bstr*);" & "CachedIsOffscreen hresult(long*);" & "CachedOrientation hresult(long*);" & "CachedFrameworkId hresult(bstr*);" & "CachedIsRequiredForForm hresult(long*);" & "CachedItemStatus hresult(bstr*);" & "CachedBoundingRectangle hresult(struct*);" & "CachedLabeledBy hresult(ptr*);" & "CachedAriaRole hresult(bstr*);" & "CachedAriaProperties hresult(bstr*);" & "CachedIsDataValidForForm hresult(long*);" & "CachedControllerFor hresult(ptr*);" & "CachedDescribedBy hresult(ptr*);" & "CachedFlowsTo hresult(ptr*);" & "CachedProviderDescription hresult(bstr*);" & "GetClickablePoint hresult(struct*;long*);" Global Const $sIID_IUIAutomationElementArray = "{14314595-B4BC-4055-95F2-58F2E42C9855}" Global $dtagIUIAutomationElementArray = "Length hresult(int*);" & "GetElement hresult(int;ptr*);" Global Const $sIID_IUIAutomationPropertyCondition = "{99EBF2CB-5578-4267-9AD4-AFD6EA77E94B}" Global $dtagIUIAutomationPropertyCondition = "propertyId hresult(int*);" & "PropertyValue hresult(variant*);" & "PropertyConditionFlags hresult(long*);" Global Const $sIID_IUIAutomation = "{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}" Global $dtagIUIAutomation = "CompareElements hresult(ptr;ptr;long*);" & "CompareRuntimeIds hresult(ptr;ptr;long*);" & "GetRootElement hresult(ptr*);" & "ElementFromHandle hresult(hwnd;ptr*);" & "ElementFromPoint hresult(struct;ptr*);" & "GetFocusedElement hresult(ptr*);" & "GetRootElementBuildCache hresult(ptr;ptr*);" & "ElementFromHandleBuildCache hresult(hwnd;ptr;ptr*);" & "ElementFromPointBuildCache hresult(struct;ptr;ptr*);" & "GetFocusedElementBuildCache hresult(ptr;ptr*);" & "CreateTreeWalker hresult(ptr;ptr*);" & "ControlViewWalker hresult(ptr*);" & "ContentViewWalker hresult(ptr*);" & "RawViewWalker hresult(ptr*);" & "RawViewCondition hresult(ptr*);" & "ControlViewCondition hresult(ptr*);" & "ContentViewCondition hresult(ptr*);" & "CreateCacheRequest hresult(ptr*);" & "CreateTrueCondition hresult(ptr*);" & "CreateFalseCondition hresult(ptr*);" & "CreatePropertyCondition hresult(int;variant;ptr*);" & "CreatePropertyConditionEx hresult(int;variant;long;ptr*);" & "CreateAndCondition hresult(ptr;ptr;ptr*);" & "CreateAndConditionFromArray hresult(ptr;ptr*);" & "CreateAndConditionFromNativeArray hresult(ptr;int;ptr*);" & "CreateOrCondition hresult(ptr;ptr;ptr*);" & "CreateOrConditionFromArray hresult(ptr;ptr*);" & "CreateOrConditionFromNativeArray hresult(ptr;int;ptr*);" & "CreateNotCondition hresult(ptr;ptr*);" & "AddAutomationEventHandler hresult(int;ptr;long;ptr;ptr);" & "RemoveAutomationEventHandler hresult(int;ptr;ptr);" & "AddPropertyChangedEventHandlerNativeArray hresult(ptr;long;ptr;ptr;struct*;int);" & "AddPropertyChangedEventHandler hresult(ptr;long;ptr;ptr;ptr);" & "RemovePropertyChangedEventHandler hresult(ptr;ptr);" & "AddStructureChangedEventHandler hresult(ptr;long;ptr;ptr);" & "RemoveStructureChangedEventHandler hresult(ptr;ptr);" & "AddFocusChangedEventHandler hresult(ptr;ptr);" & "RemoveFocusChangedEventHandler hresult(ptr);" & "RemoveAllEventHandlers hresult();" & "IntNativeArrayToSafeArray hresult(int;int;ptr*);" & "IntSafeArrayToNativeArray hresult(ptr;int*;int*);" & "RectToVariant hresult(struct;variant*);" & "VariantToRect hresult(variant;struct*);" & "SafeArrayToRectNativeArray hresult(ptr;struct*;int*);" & "CreateProxyFactoryEntry hresult(ptr;ptr*);" & "ProxyFactoryMapping hresult(ptr*);" & "GetPropertyProgrammaticName hresult(int;bstr*);" & "GetPatternProgrammaticName hresult(int;bstr*);" & "PollForPotentialSupportedPatterns hresult(ptr;ptr*;ptr*);" & "PollForPotentialSupportedProperties hresult(ptr;ptr*;ptr*);" & "CheckNotSupported hresult(variant;long*);" & "ReservedNotSupportedValue hresult(ptr*);" & "ReservedMixedAttributeValue hresult(ptr*);" & "ElementFromIAccessible hresult(idispatch;int;ptr*);" & "ElementFromIAccessibleBuildCache hresult(iaccessible;int;ptr;ptr*);" #EndRegion IUIAutomation MS framework #Region TichySID Global Const $tagIMAGE_DOS_HEADER = 'WORD e_magic;WORD e_cblp;WORD e_cp;WORD e_crlc;WORD e_cparhdr;WORD e_minalloc;WORD e_maxalloc;WORD e_ss;WORD e_sp;WORD e_csum;WORD e_ip;WORD e_cs;WORD e_lfarlc;WORD e_ovno;WORD e_res[4];WORD e_oemid;WORD e_oeminfo;WORD e_res2[10];LONG e_lfanew;' Global Const $tagIMAGE_FILE_HEADER = 'WORD Machine;WORD NumberOfSections;DWORD TimeDateStamp;DWORD PointerToSymbolTable;DWORD NumberOfSymbols;WORD SizeOfOptionalHeader;WORD Characteristics;' Global $tagIMAGE_OPTIONAL_HEADER = 'WORD Magic;BYTE MajorLinkerVersion;BYTE MinorLinkerVersion;DWORD SizeOfCode;DWORD SizeOfInitializedData;DWORD SizeOfUninitializedData;DWORD AddressOfEntryPoint;DWORD BaseOfCode;DWORD BaseOfData;PTR ImageBase;DWORD SectionAlignment;DWORD FileAlignment;WORD MajorOperatingSystemVersion;WORD MinorOperatingSystemVersion;WORD MajorImageVersion;WORD MinorImageVersion;WORD MajorSubsystemVersion;WORD MinorSubsystemVersion;DWORD Win32VersionValue;DWORD SizeOfImage;DWORD SizeOfHeaders;DWORD CheckSum;WORD Subsystem;WORD DllCharacteristics;PTR SizeOfStackReserve;PTR SizeOfStackCommit;PTR SizeOfHeapReserve;PTR SizeOfHeapCommit;DWORD LoaderFlags;DWORD NumberOfRvaAndSizes;' If @AutoItX64 Then $tagIMAGE_OPTIONAL_HEADER = 'WORD Magic;BYTE MajorLinkerVersion;BYTE MinorLinkerVersion;DWORD SizeOfCode;DWORD SizeOfInitializedData;DWORD SizeOfUninitializedData;DWORD AddressOfEntryPoint;DWORD BaseOfCode;PTR ImageBase;DWORD SectionAlignment;DWORD FileAlignment;WORD MajorOperatingSystemVersion;WORD MinorOperatingSystemVersion;WORD MajorImageVersion;WORD MinorImageVersion;WORD MajorSubsystemVersion;WORD MinorSubsystemVersion;DWORD Win32VersionValue;DWORD SizeOfImage;DWORD SizeOfHeaders;DWORD CheckSum;WORD Subsystem;WORD DllCharacteristics;PTR SizeOfStackReserve;PTR SizeOfStackCommit;PTR SizeOfHeapReserve;PTR SizeOfHeapCommit;DWORD LoaderFlags;DWORD NumberOfRvaAndSizes;' Global Const $tagIMAGE_NT_HEADER = 'DWORD Signature;' & $tagIMAGE_FILE_HEADER & $tagIMAGE_OPTIONAL_HEADER Global Const $tagIMAGE_SECTION_HEADER = 'CHAR Name[8];DWORD VirtualSize;DWORD VirtualAddress;DWORD SizeOfRawData;DWORD PointerToRawData;DWORD PointerToRelocations;DWORD PointerToLinenumbers;WORD NumberOfRelocations;WORD NumberOfLinenumbers;DWORD Characteristics;' Global Const $tagIMAGE_DATA_DIRECTORY = 'DWORD VirtualAddress;DWORD Size;' Global Const $tagIMAGE_BASE_RELOCATION = 'DWORD VirtualAddress;DWORD SizeOfBlock;' Global Const $tagIMAGE_IMPORT_DESCRIPTOR = 'DWORD OriginalFirstThunk;DWORD TimeDateStamp;DWORD ForwarderChain;DWORD Name;DWORD FirstThunk;' Global Const $tagIMAGE_IMPORT_BY_NAME = 'WORD Hint;char Name[1];' Global Const $tagIMAGE_EXPORT_DIRECTORY = 'DWORD Characteristics;DWORD TimeDateStamp;WORD MajorVersion;WORD MinorVersion;DWORD Name;DWORD Base;DWORD NumberOfFunctions;DWORD NumberOfNames;DWORD AddressOfFunctions;DWORD AddressOfNames;DWORD AddressOfNameOrdinals;' Global $_KERNEL32DLL = DllOpen('kernel32.dll') Global $_MFHookPtr, $_MFHookBak, $_MFHookApi = 'LocalCompact' Global Const $tagModule = 'PTR ExportList;PTR CodeBase;PTR ImportList;PTR DllEntry;DWORD Initialized;' Global Const $SID_MEMORY = 1 Global Const $SID_NON_DEFAULT = 2 Global $hTitchysidDll, $iSubsongCount = 0 Global $binSID = _SID_Tune() #EndRegion Global $aTaskbar = WinGetPos("[CLASS:Shell_TrayWnd;INSTANCE:1]", "") Global $i, $aShortcutDetails, $hIcon, $aFileList = ReadDesktopIcons(), $aFileIcons[$aFileList[0] + 1] If @error Then Dim $aFileList[1] $aFileList[0] = 0 MsgBox($MB_ICONWARNING, "Warning", "No desktop icons!", 15) EndIf Global $iLen = 0, $l For $i = 1 To $aFileList[0] $l = StringLen(StringRegExpReplace($aFileList[$i], ".*\\(.*)\..+", "$1")) $iLen = $l > $iLen ? $l : $iLen Next Global $iW = 0, $iH = 0, $iW_def, $iH_def, $iLVBgColor = 0xFFFFFF, $iColumnWidth, $hHBITMAP, $fIconSize = 16 * $g_iDPI_ratio1, $fLVFontSize = 15.5 * $g_iDPI_ratio1 Global Const $hGUI = GUICreate("Toolbar Desktop by UEZ", $iW, $iH, $aTaskbar[1] ? -1 : -10000, $aTaskbar[1] ? -10000 : -1, BitOR($WS_MINIMIZEBOX, $WS_SIZEBOX), $WS_EX_TOPMOST) GUISetFont(8.5, $FW_NORMAL, $GUI_FONTNORMAL, "Arial", $hGUI, $CLEARTYPE_QUALITY) Global $hLV_Font = _WinAPI_CreateFont($fLVFontSize, 0, 0, 0, $FW_MEDIUM, False, False, False, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $CLEARTYPE_QUALITY, 0, "Segoe UI") Global $hLV = _GUICtrlListView_Create($hGUI, "", 0, 0, 0, 0, BitOR($LVS_SINGLESEL, $LVS_NOCOLUMNHEADER, $LVS_LIST)), $iLV = _WinAPI_GetDlgCtrlID($hLV) GUICtrlSendMsg($hLV, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_ONECLICKACTIVATE, $LVS_EX_TRACKSELECT) _GUICtrlListView_SetExtendedListViewStyle($hLV, $LVS_EX_DOUBLEBUFFER) _GUICtrlListView_InsertColumn($hLV, 0, "Desktop App") Global Const $ILC_ORIGINALSIZE = 0x00010000, $ILC_HIGHQUALITYSCALE = 0x00020000 Global $hImageList = DllCall("comctl32.dll", "handle", "ImageList_Create", "int", $fIconSize, "int", $fIconSize, "uint", BitOR($ILC_COLOR32, $ILC_ORIGINALSIZE, $ILC_HIGHQUALITYSCALE), "int", $aFileList[0], "int", $aFileList[0])[0] _GUICtrlListView_SetBkColor($hLV, $iLVBgColor) ConsoleWrite("Added " & $aFileList[0] & " items to the list" & @CRLF) For $i = 1 To $aFileList[0] $hIcon = _WinAPI_ShellExtractAssociatedIcon($aFileList[$i], True) If $hIcon Then $aFileIcons[$i] = $hIcon $hHBITMAP = _WinAPI_Create32BitHBITMAP($hIcon) _GUIImageList_Add($hImageList, $hHBITMAP) _WinAPI_DeleteObject($hHBITMAP) Else _GUIImageList_Add($hImageList, _GUICtrlListView_CreateSolidBitMap($hLV, 0xFFFFFF, $fIconSize, $fIconSize)) EndIf Next _GUICtrlListView_SetImageList($hLV, $hImageList, 1) Global $aIconAssignment[UBound($aFileList) - 1][3] For $i = 1 To $aFileList[0] If StringInStr(FileGetAttrib($aFileList[$i]), "D") Then If StringRegExp($aFileList[$i], ".+\.\{(.*)\}") Then _GUICtrlListView_AddItem($hLV, StringRegExpReplace($aFileList[$i], ".*\\(.*)\..+", "$1"), $i - 1, $i - 1) Else _GUICtrlListView_AddItem($hLV, StringRegExpReplace($aFileList[$i], ".+\\(.+)", "$1"), $i - 1, $i - 1) EndIf Else _GUICtrlListView_AddItem($hLV, StringRegExpReplace($aFileList[$i], ".*\\(.*)\..+", "$1"), $i - 1, $i - 1) EndIf $aIconAssignment[$i - 1][0] = $i - 1 $aIconAssignment[$i - 1][1] = $aFileList[$i] $aIconAssignment[$i - 1][2] = $aFileIcons[$i] Next Global $aPos = WinGetPos($hGUI), $aWinPos Global $aParts[1] = [1], $hStatusBar $hStatusBar = _GUICtrlStatusBar_Create($hGUI, $aParts) Global Const $iStatusBar = _WinAPI_GetDlgCtrlID($hStatusBar), $iH_SB = _GUICtrlStatusBar_GetHeight($hStatusBar) GUIRegisterMsg($WM_SIZE, "WM_SIZE") If $iW < @DesktopWidth / 2 And BitAND(_WinAPI_GetWindowLong($hLV, $GWL_STYLE), $WS_HSCROLL) = $WS_HSCROLL Then While BitAND(_WinAPI_GetWindowLong($hLV, $GWL_STYLE), $WS_HSCROLL) $iW += 2 $iH += 1 WinMove($hGUI, "", $aPos[0], $aPos[1], $iW * $g_iDPI_ratio1, ($iH + $iH_SB) * $g_iDPI_ratio1) If $iW > @DesktopWidth / 2 Then ExitLoop WEnd EndIf If $iW = 0 Or $iH = 0 Then $iW = 200 $iH = $iW * 8 / 16 WinMove($hGUI, "", $aPos[0], $aPos[1], $iW * $g_iDPI_ratio1, ($iH + $iH_SB + 1) * $g_iDPI_ratio1) _GUICtrlListView_SetColumnWidth($hLV, 0, $iW) EndIf Global $fAdjust = $g_iDPI_ratio1 > 1 ? 1 + $g_iDPI_ratio1 / 10 : 1 $iW_def = $iW * $fAdjust $iH_def = ($iH * $fAdjust + $iH_SB) ConsoleWrite("GUI size: " & ($iW) & " x " & ($iH) & @CRLF) Global $iLV_cw = _GUICtrlListView_GetColumnWidth($hLV, 0) _GUICtrlStatusBar_SetText($hStatusBar, $aFileList[0] & " icons added to the list") Global Const $hMenu_Tray = TrayItemGetHandle(0) Global Const $iTrayRestart = TrayCreateItem("Restart") Global Const $iTrayAutostart = TrayCreateItem("Autostart") Global Const $iTrayAbout = TrayCreateItem("About") TrayCreateItem("") Global Const $iTrayExit = TrayCreateItem("Exit") If RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Run", "Toolbar Desktop") = '"' & @ScriptDir & '\Toolbar Desktop.exe"' Then TrayItemSetState($iTrayAutostart, $TRAY_CHECKED) Global Const $hBMP_Restart = _GDIPlus_BitmapCreateFromMemory(_Restart_Pic(), True) Global Const $hBMP_About = _GDIPlus_BitmapCreateFromMemory(_About_Pic(), True) Global Const $hBMP_Exit = _GDIPlus_BitmapCreateFromMemory(_Exit_Pic(), True) Global Const $hBMP_Check = _GDIPlus_BitmapCreateFromMemory(_Check_Pic(), True) Global Const $hBMP_Rect = _GDIPlus_BitmapCreateFromMemory(_Rect_Pic(), True) _GUICtrlMenu_SetItemBitmaps($hMenu_Tray, 0, $hBMP_Restart, $hBMP_Restart) _GUICtrlMenu_SetItemBitmaps($hMenu_Tray, 1, $hBMP_Check, $hBMP_Rect) _GUICtrlMenu_SetItemBitmaps($hMenu_Tray, 2, $hBMP_About, $hBMP_About) _GUICtrlMenu_SetItemBitmaps($hMenu_Tray, 4, $hBMP_Exit, $hBMP_Exit) Global $sRunAsAdmin Global Enum $idRunAsAdmin = 2000, $idAbout, $idSort, $idOpenFL Global Const $hQMenu_LV = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_InsertMenuItem($hQMenu_LV, 0, "Run app as Administrator", $idRunAsAdmin) _GUICtrlMenu_InsertMenuItem($hQMenu_LV, 1, "") _GUICtrlMenu_InsertMenuItem($hQMenu_LV, 2, "Sort List", $idSort) _GUICtrlMenu_InsertMenuItem($hQMenu_LV, 3, "") _GUICtrlMenu_InsertMenuItem($hQMenu_LV, 4, "Open File Location", $idOpenFL) _GUICtrlMenu_SetMenu($hGUI, $hQMenu_LV) Global $hBMP_Shield = _GUICtrlMenu_CreateBitmap(@SystemDir & "\imageres.dll", 73) _GUICtrlMenu_SetItemBmp($hQMenu_LV, 0, $hBMP_Shield) Global $hTmp = _GDIPlus_BitmapCreateFromMemory(_Sort()) Global Const $hBMP_Sort = _GDIPlus_Convert2HBitmap($hTmp, $COLOR_MENU) _GDIPlus_BitmapDispose($hTmp) _GUICtrlMenu_SetItemBmp($hQMenu_LV, 2, $hBMP_Sort) $hTmp = _GDIPlus_BitmapCreateFromMemory(_OpenFolder()) Global Const $hBMP_OpenFolder = _GDIPlus_Convert2HBitmap($hTmp, $COLOR_MENU) _GDIPlus_BitmapDispose($hTmp) _GUICtrlMenu_SetItemBmp($hQMenu_LV, 4, $hBMP_OpenFolder) Global Const $hMenu_Sys = _GUICtrlMenu_GetSystemMenu($hGUI) _GUICtrlMenu_AppendMenu($hMenu_Sys, $MF_SEPARATOR, 0, 0) _GUICtrlMenu_AppendMenu($hMenu_Sys, $MF_STRING, $idAbout, "About") _GUICtrlMenu_SetItemBmp($hMenu_Sys, 8, $hBMP_About) _WinAPI_DwmSetWindowAttribute($hGUI, $DWMWA_TRANSITIONS_FORCEDISABLED, True) ;disable window animation GUISetState(@SW_SHOWMINIMIZED, $hGUI) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_EXITSIZEMOVE") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") GUIRegisterMsg($WM_SYSCOMMAND, "WM_SYSCOMMAND") If @OSBuild > 9599 Then GUIRegisterMsg($WM_DPICHANGED, "WM_DPICHANGED") ;requires Win 8.1+ / Server 2012 R2+ Global $bCheck, $px, $py, $tx, $hTaskbar, $iMonitorX, $iMonitorY, $iMonitorW, $iMonitorH, $iTbW, $iTbH, $bManualResized = False Global Const $iWinTitleSize = _WinAPI_GetSystemMetrics($SM_CYSIZE), $iDummy_About = GUICtrlCreateDummy(), $iDummy_Error = GUICtrlCreateDummy() Global Const $iListViewCallback = DllCallbackRegister("LVKeyCallback", "long", "int;wparam;lparam"), _ $hHook_Key = _WinAPI_SetWindowsHookEx($WH_KEYBOARD_LL, DllCallbackGetPtr($iListViewCallback), _WinAPI_GetModuleHandle(0)) Global $oMyError = ObjEvent("AutoIt.Error", "ErrFunc") Global $iFPS = 0, $iShowFPS = 0, $bExit = False, $oShell = ObjCreate("WScript.Shell") Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE _Exit() Case $iDummy_About About() Case $iDummy_Error MsgBox(BitOR($MB_TOPMOST, $MB_ICONWARNING), "Warning", "No desktop icons were added to the list!" & @CRLF & "Add at least one icon to the desktop which can be shell executed!", 15, $hGUI) EndSwitch Switch TrayGetMsg() Case $iTrayRestart _ScriptRestart() ;restart script to re-read desktop icons Case $iTrayAutostart $bCheck = BitAND($TRAY_CHECKED, TrayItemGetState($iTrayAutostart)) If $bCheck Then TrayItemSetState($iTrayAutostart, $TRAY_UNCHECKED) AutoStartReg(False) Else TrayItemSetState($iTrayAutostart, $TRAY_CHECKED) AutoStartReg(True) EndIf Case $iTrayAbout About() Case $iTrayExit _Exit() EndSwitch Until False Func PosGUI() ;~ $aWinPos = _WinAPI_FindMyIconPosInTaskbar("Toolbar Desktop.exe - a simple toolbar menu app for Windows 11 to access desktop icons faster") $aWinPos = _WinAPI_FindMyIconPosInTaskbar("Toolbar Desktop.exe") Local $tmpW = $iW_def, $tmpH = $iH_def If $bManualResized Then Local $aWin = WinGetPos($hGUI) $iW_def = $aWin[2] * $g_iDPI_ratio2 $iH_def = $aWin[3] * $g_iDPI_ratio2 EndIf If @error Or Not UBound($aWinPos) Then ConsoleWrite("Error getting icon pos in taskbar - " & @error & @CRLF) $px = MouseGetPos(0) - $iW_def * $g_iDPI_ratio1 / 2 $py = MouseGetPos(1) - $iH_def * $g_iDPI_ratio1 / 2 $px = $px < $iMonitorX ? $iMonitorX : $px $px = $px + $iW_def * $g_iDPI_ratio1 > $iMonitorX + $iMonitorW ? $iMonitorX + $iMonitorW - $iW_def * $g_iDPI_ratio1 : $px $py = $py < $iMonitorY ? $iMonitorY : $py $py = $py + $iH_def * $g_iDPI_ratio1 > $iMonitorY + $iMonitorH ? $iMonitorX + $iMonitorH - $iH_def * $g_iDPI_ratio1 : $py WinMove($hGUI, "", $px, $py, $iW_def * $g_iDPI_ratio1, $iH_def * $g_iDPI_ratio1) Else If $aWinPos[0] >= $iMonitorX + $iMonitorW And $aWinPos[1] < $iMonitorY + $iMonitorH Then ;Taskbar on the right side ConsoleWrite("Taskbar right" & @CRLF) $px = $aWinPos[0] - $iW_def * $g_iDPI_ratio1 - 1 $py = $aWinPos[1] + $aWinPos[3] - $iH_def * $g_iDPI_ratio1 / 2 $py = $py < $iMonitorY ? $iMonitorY : $py $py = $py + $iH_def * $g_iDPI_ratio1 > $iMonitorY + $iMonitorH ? $py + $iH_def * $g_iDPI_ratio1 - ($py + $iH_def * $g_iDPI_ratio1 - $iMonitorY + $iMonitorH) : $py ElseIf $aWinPos[0] < $iMonitorX And $aWinPos[1] < $iMonitorY + $iMonitorH Then ;Taskbar on the left side ConsoleWrite("Taskbar left" & @CRLF) $px = $aWinPos[0] + $aWinPos[2] + 1 $py = $aWinPos[1] + $aWinPos[3] - $iH_def * $g_iDPI_ratio1 / 2 $py = $py < $iMonitorY ? $iMonitorY : $py $py = $py + $iH_def * $g_iDPI_ratio1 > $iMonitorY + $iMonitorH ? $py + $iH_def * $g_iDPI_ratio1 - ($py + $iH_def * $g_iDPI_ratio1 - $iMonitorY + $iMonitorH) : $py ElseIf $aWinPos[1] < $iMonitorY And $aWinPos[0] > $iMonitorX Then ;Taskbar at top ConsoleWrite("Taskbar top" & @CRLF) $px = $aWinPos[0] - ($iW_def * $g_iDPI_ratio1 - $aWinPos[2]) / 2 $px = $px < $iMonitorX ? $iMonitorX : $px $tx = $iMonitorX + $iMonitorW - $px - $iW_def * $g_iDPI_ratio1 $py = $aWinPos[1] + $aWinPos[3] + 1 Else ;Taskbar at bottom ConsoleWrite("Taskbar bottom" & @CRLF) $px = $aWinPos[0] - ($iW_def * $g_iDPI_ratio1 - $aWinPos[2]) / 2 $px = $px < $iMonitorX ? $iMonitorX : $px $tx = $iMonitorX + $iMonitorW - $px - $iW_def * $g_iDPI_ratio1 If $tx < 0 Then $px += $tx $py = $aWinPos[1] - $iH_def * $g_iDPI_ratio1 - 1 EndIf WinMove($hGUI, "", $px, $py, $iW_def * $g_iDPI_ratio1, $iH_def * $g_iDPI_ratio1) EndIf If $bManualResized Then $iW_def = $tmpW $iH_def = $tmpH EndIf EndFunc ;==>PosGUI Func AdjustLVIcons() _GUICtrlListView_BeginUpdate($hLV) Local $i If $hLV_Font Then _WinAPI_DeleteObject($hLV_Font) $hLV_Font = _GUICtrlListView_SetItemHeightByFont($hLV, $fIconSize, $fLVFontSize) _GUIImageList_SetIconSize($hImageList, $fIconSize, $fIconSize) If $bSorted Then _ArraySort($aIconAssignment, 0, 0, 0, 0) For $i = 0 To UBound($aIconAssignment) - 1 _GUIImageList_ReplaceIcon($hImageList, -1, $aIconAssignment[$i][2]) Next _GUICtrlListView_SetImageList($hLV, $hImageList, 1) ;~ _GUICtrlListView_SetColumnWidth($hLV, 0, $LVSCW_AUTOSIZE) _GUICtrlListView_SetColumnWidth($hLV, 0, $iW_def * $g_iDPI_ratio1 / 3.5) _GUICtrlListView_EndUpdate($hLV) EndFunc ;==>AdjustLVIcons Func Max($a, $b) Return $a > $b ? $a : $b EndFunc ;==>Max Func Min($a, $b) Return $a < $b ? $a : $b EndFunc ;==>Min Func AutoStartReg($bSet) Switch $bSet Case True If RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Run", "Toolbar Desktop", "REG_SZ", '"' & @ScriptDir & '\Toolbar Desktop.exe"') Then MsgBox($MB_ICONINFORMATION, "Information", "Autostart entry properly set to the registry", 10, $hGUI) Else MsgBox($MB_ICONERROR, "ERROR", "Unable to set autostart entry to the registry!", 30, $hGUI) EndIf Case Else If RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Run", "Toolbar Desktop") Then MsgBox($MB_ICONINFORMATION, "Information", "Autostart entry properly removed from the registry", 10, $hGUI) Else MsgBox($MB_ICONERROR, "ERROR", "Unable to remove autostart entry from the registry!", 30, $hGUI) EndIf EndSwitch EndFunc ;==>AutoStartReg Func About() AutoItSetOption("GUIOnEventMode", 1) If @AutoItX64 = 0 Then _SIDStartup() _SIDOpen($binSID) EndIf $bExit = False TraySetState($TRAY_ICONSTATE_HIDE) GUISetState(@SW_MINIMIZE, $hGUI) GUISetState(@SW_HIDE, $hGUI) GDIPlus_About() If @AutoItX64 = 0 Then _SIDStop() _SIDClose() _SIDShutdown() EndIf TraySetState( $TRAY_ICONSTATE_SHOW) GUISetState(@SW_SHOWMINIMIZED, $hGUI) AutoItSetOption("GUIOnEventMode", 0) EndFunc ;==>About Func GDIPlus_About() Local Const $iW = 800, $iH = Int($iW * 9 / 16), $iWh = $iW / 2, $iHh = $iH / 2 Local Const $_t = 1 / 60 Local Const $hGUI_About = GUICreate($sTitle, $iW, $iH, -1, -1, -1, BitOR($WS_EX_APPWINDOW, $WS_EX_TOOLWINDOW)) GUISetState(@SW_SHOW, $hGUI_About) ;create canvas elements Local Const $hDC = _WinAPI_GetDC($hGUI_About) Local Const $hHBITMAP = _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH) Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBITMAP) Local Const $hCanvas = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) _GDIPlus_GraphicsSetSmoothingMode($hCanvas, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) ;~ _GDIPlus_GraphicsSetTextRenderingHint(_GDIPlus_GraphicsSetTextRenderingHint, $GDIP_TEXTRENDERINGHINTANTIALIASGRIDFIT) Local Const $fTxtHeight = 3.0 * $iH Local $hBrush_Clr = _GDIPlus_BrushCreateSolid(0xF0303030), _ $hBrush_FPS = _GDIPlus_BrushCreateSolid(0xF0808080), _ $hFormat_FPS = _GDIPlus_StringFormatCreate(), _ $hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _ $hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _ $tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 60, 16), _ $hBrush_anim = _GDIPlus_BrushCreateSolid(0xF0C0C0C0), _ $hPen_anim = _GDIPlus_PenCreate(0xF0101010, 1), _ $tRectF_col = _GDIPlus_RectFCreate(0, 0, $iW, $iHh), _ $hBrush_txt = _GDIPlus_LineBrushCreateFromRectWithAngle($tRectF_col, 0xC07D1B7E, 0xCFFCDFFF, 45, True, 1), _ $tRectF_txt = _GDIPlus_RectFCreate(0, 0, $iW, $fTxtHeight), _ $hPen_txt = _GDIPlus_PenCreate(0x80000000, 2), _ $hFormat_txt = _GDIPlus_StringFormatCreate(), _ $hFamily_txt = _GDIPlus_FontFamilyCreate("Impact"), _ $hPath_txt = _GDIPlus_PathCreate(), _ $sTxt = $sTitle & @CRLF & _ $sVer & @CRLF & @CRLF & _ "Coded by" & @CRLF & @CRLF & _ "UEZ" & @CRLF & @CRLF & @CRLF & _ "Thanks to:" & @CRLF & _ "argumentum" & @CRLF & _ "BugFix" & @CRLF & _ "InnI" & @CRLF & _ "junkew" & @CRLF & _ "KaFu" & @CRLF & _ "Kanashius" & @CRLF & _ "Soren" & @CRLF & _ "Mombas" & @CRLF & _ "Yashied" & @CRLF & _ "wakillon" & @CRLF & _ "Ward" & @CRLF & @CRLF & @CRLF & _ "Greetings to all Autoit'ers" & @CRLF & _ "around the world." _GDIPlus_StringFormatSetAlign($hFormat_txt, 1) _GDIPlus_StringFormatSetLineAlign($hFormat_txt, 1) Local $p, $q, $z, $x, $s, $i, $t = 0, $f1, $px, $py $iFPS = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About", $hGUI_About) AdlibRegister("CalcFPS", 1000) $tRectF_txt.y = $iH + $iH / 10 Local $tFFTData = DllStructCreate("float data[1024]"), $pFFTData = DllStructGetPtr($tFFTData), $sum Do DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush_Clr, "float", 0, "float", 0, "float", $iW, "float", $iH) ;erase canvas background DllCall($__g_hGDIPDll, "int", "GdipAddPathString", "handle", $hPath_txt, "wstr", $sTxt, "int", -1, "handle", $hFamily_txt, "int", 0, "float", $iH / 10, "struct*", $tRectF_txt, "handle", $hFormat_txt) ;~ _SIDGetFFTData($tFFTData) ;~ $sum = 0 ;~ For $i = 1 To 64 ;~ $sum += $tFFTData.data(($i)) * $tFFTData.data(($i)) ;~ Next ;~ $sum = 0x30 + Log(Sqrt($sum)) / Log(10) * 10 ;~ _GDIPlus_GraphicsClear($hCanvas, BitOR(0xFF000000, BitShift($sum, -16), BitShift($sum, -8), BitShift($sum, 0))) For $i = 0 To 1919 Step 15 $p = $i * Cos($t / 2) / 40 $q = $i / 628 $f1 = Sin($q) $z = 2.4 + Cos($p) * $f1 $x = Sin($p) * $f1 $s = 49 / $z / $z $f1 = 1 / $z $px = $iWh + $f1 * $x * $iWh $py = $iHh + Cos($q) * $iWh * $f1 DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hCanvas, "handle", $hBrush_anim, "float", $px, "float", $py, "float", $s, "float", $s) ;~ DllCall($__g_hGDIPDll, "int", "GdipDrawEllipse", "handle", $hCanvas, "handle", $hPen_anim, "float", $px, "float", $py, "float", $s, "float", $s) Next DllCall($__g_hGDIPDll, "int", "GdipFillPath", "handle", $hCanvas, "handle", $hBrush_txt, "handle", $hPath_txt) DllCall($__g_hGDIPDll, "int", "GdipDrawPath", "handle", $hCanvas, "handle", $hPen_txt, "handle", $hPath_txt) DllCall($__g_hGDIPDll, "int", "GdipResetPath", "handle", $hPath_txt) $tRectF_txt.y -= 1 $tRectF_txt.y = ($tRectF_txt.y < -$iH / 10 - $fTxtHeight) ? ($iH + $iH / 10) : ($tRectF_txt.y) $t += $_t _GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) $iFPS += 1 If $bExit Then ExitLoop Until Not Sleep(10) AdlibUnRegister("CalcFPS") ;release resources _GDIPlus_PathDispose($hPath_txt) _GDIPlus_PenDispose($hPen_txt) _GDIPlus_PenDispose($hPen_anim) _GDIPlus_FontDispose($hFont_FPS) _GDIPlus_FontFamilyDispose($hFamily_FPS) _GDIPlus_FontFamilyDispose($hFamily_txt) _GDIPlus_StringFormatDispose($hFormat_FPS) _GDIPlus_StringFormatDispose($hFormat_txt) _GDIPlus_BrushDispose($hBrush_anim) _GDIPlus_BrushDispose($hBrush_Clr) _GDIPlus_BrushDispose($hBrush_FPS) _GDIPlus_GraphicsDispose($hCanvas) _WinAPI_SelectObject($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBITMAP) _WinAPI_ReleaseDC($hGUI_About, $hDC) GUIDelete($hGUI_About) EndFunc ;==>GDIPlus_About Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS $iFPS = 0 EndFunc ;==>CalcFPS Func ReadDesktopIcons() Local $aFileList1 = _FileListToArray(@DesktopDir, "*", $FLTA_FILESFOLDERS, True) Local $aFileList2 = _FileListToArray(@DesktopCommonDir, "*", $FLTA_FILESFOLDERS, True) If BitOR(IsArray($aFileList1), IsArray($aFileList2)) = 0 Then Return SetError(1, 0, 0) Local $i, $j, $aFileList[$aFileList1[0] + $aFileList2[0] + 1], $c = 1 For $i = 1 To $aFileList1[0] If StringRight($aFileList1[$i], 4) <> ".ini" Then $aFileList[$c] = $aFileList1[$i] $c += 1 EndIf Next For $j = 1 To $aFileList2[0] If StringRight($aFileList2[$j], 4) <> ".ini" Then $aFileList[$c] = $aFileList2[$j] $c += 1 EndIf Next $aFileList[0] = $c - 1 ReDim $aFileList[$c] Return $aFileList EndFunc ;==>ReadDesktopIcons Func _ScriptRestart($fExit = 1) ;thanks to Yashied Local $pid If Not $__Restart Then If @Compiled Then $pid = Run(@ScriptFullPath & " " & $CmdLineRaw, @ScriptDir, Default, 1) Else $pid = Run(@AutoItExe & ' "' & @ScriptFullPath & '" ' & $CmdLineRaw, @ScriptDir, Default, 1) EndIf If @error Then Return SetError(@error, 0, 0) EndIf StdinWrite($pid, @AutoItPID) EndIf $__Restart = 1 If $fExit Then Sleep(50) Exit EndIf Return 1 EndFunc ;==>_ScriptRestart Func _GUICtrlMenu_CreateBitmap($file, $iIndex = 0, $iX = 16, $iY = 16) ;thanks to Yashied If FileExists($file) Then Local $aRet, $hIcon, $hBitmap Local $hDC, $hBackDC, $hBackSv $aRet = DllCall("shell32", "long", "ExtractAssociatedIcon", "int", 0, "str", $file, "word*", $iIndex) If @error Then Return SetError(@error, @extended, 0) $hIcon = $aRet[0] $hDC = _WinAPI_GetDC(0) ;thanks to Yashied $hBackDC = _WinAPI_CreateCompatibleDC($hDC) $hBitmap = _WinAPI_CreateSolidBitmap(0, _WinAPI_GetSysColor($COLOR_MENU), $iX, $iY) $hBackSv = _WinAPI_SelectObject($hBackDC, $hBitmap) _WinAPI_DrawIconEx($hBackDC, 0, 0, $hIcon, $iX, $iY, 0, 0, 3) _WinAPI_DestroyIcon($hIcon) _WinAPI_SelectObject($hBackDC, $hBackSv) _WinAPI_ReleaseDC(0, $hDC) _WinAPI_DeleteDC($hBackDC) Return $hBitmap Else Return SetError(1, 0, 0) EndIf EndFunc ;==>_GUICtrlMenu_CreateBitmap Func _GDIPlus_Convert2HBitmap($hBitmap, $iColor) ; removes alpha backround using system color and converts to gdi bitmap Local $iBgColor = _WinAPI_GetSysColor($iColor) $iBgColor = 0x10000 * BitAND($iBgColor, 0xFF) + BitAND($iBgColor, 0x00FF00) + BitShift($iBgColor, 16) Local $iWidth = _GDIPlus_ImageGetWidth($hBitmap), $iHeight = _GDIPlus_ImageGetHeight($hBitmap) Local $hBitmap_new = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight) ;$aResult[6] Local $hCtx_new = _GDIPlus_ImageGetGraphicsContext($hBitmap_new) _GDIPlus_GraphicsSetPixelOffsetMode($hCtx_new, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Local $hBrush = _GDIPlus_BrushCreateSolid(0xFF000000 + $iBgColor) _GDIPlus_GraphicsFillRect($hCtx_new, 0, 0, $iWidth, $iHeight, $hBrush) _GDIPlus_GraphicsDrawImageRect($hCtx_new, $hBitmap, 0, 0, $iWidth, $iHeight) Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_new) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BitmapDispose($hBitmap_new) _GDIPlus_GraphicsDispose($hCtx_new) Return $hHBITMAP EndFunc ;==>_GDIPlus_Convert2HBitmap Func _Exit() $binSID = 0 For $i = 1 To $aFileList[0] _WinAPI_DestroyIcon($aFileIcons[$i]) Next _WinAPI_UnhookWindowsHookEx($hHook_Key) DllCallbackFree($iListViewCallback) GUIRegisterMsg($WM_SIZE, "") GUIRegisterMsg($WM_EXITSIZEMOVE, "") GUIRegisterMsg($WM_NOTIFY, "") GUIRegisterMsg($WM_COMMAND, "") GUIRegisterMsg($WM_SYSCOMMAND, "") GUIRegisterMsg($WM_DPICHANGED, "") _WinAPI_DeleteObject($hLV_Font) _WinAPI_DeleteObject($hBMP_Shield) _WinAPI_DeleteObject($hBMP_Sort) _WinAPI_DeleteObject($hBMP_OpenFolder) _WinAPI_DeleteObject($hBMP_Restart) _WinAPI_DeleteObject($hBMP_Rect) _WinAPI_DeleteObject($hBMP_Check) _WinAPI_DeleteObject($hBMP_About) _WinAPI_DeleteObject($hBMP_Exit) _GUIImageList_Destroy($hImageList) GUIDelete($hGUI) _GDIPlus_Shutdown() DllClose($_KERNEL32DLL) Exit EndFunc ;==>_Exit Func _GUICtrlListView_SetItemHeightByFont(ByRef $hListView, $iHeight, $fFontSize) ; Get font of ListView control ; Copied from _GUICtrlGetFont example by KaFu ; See https://www.autoitscript.com/forum/index.php?showtopic=124526 Local $hDC = _WinAPI_GetDC($hListView), $hFont = _SendMessage($hListView, $WM_GETFONT) Local $tagLOGFONT2 = "long lfHeight;long lfWidth;long lfEscapement;long lfOrientation;long lfWeight;byte lfItalic;byte lfUnderline;byte lfStrikeOut;byte lfCharSet;byte lfOutPrecision;byte lfClipPrecision;byte lfQuality;byte lfPitchAndFamily;wchar lfFaceName[32]" Local $hObject = _WinAPI_SelectObject($hDC, $hFont), $lvLOGFONT = DllStructCreate($tagLOGFONT2) _WinAPI_GetObject($hFont, DllStructGetSize($lvLOGFONT), DllStructGetPtr($lvLOGFONT)) $lvLOGFONT.lfQuality = $CLEARTYPE_QUALITY $lvLOGFONT.lfOutPrecision = $OUT_DEFAULT_PRECIS $lvLOGFONT.lfWeight = $FW_MEDIUM $lvLOGFONT.lfHeight = $fFontSize Local $hLVfont = _WinAPI_CreateFontIndirect($lvLOGFONT) ; Original ListView font _WinAPI_SelectObject($hDC, $hObject) _WinAPI_ReleaseDC($hListView, $hDC) _WinAPI_DeleteObject($hFont) ; Set height of ListView items by applying text font with suitable height $hFont = _WinAPI_CreateFont($iHeight, 0, 0, 0, $FW_MEDIUM, False, False, False, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $CLEARTYPE_QUALITY, 0, "Segoe UI") _WinAPI_SetFont($hListView, $hFont) _WinAPI_DeleteObject($hFont) ; Restore font of Header control Local $hHeader = _GUICtrlListView_GetHeader($hListView) If $hHeader Then _WinAPI_SetFont($hHeader, $hLVfont) ; Return original ListView font Return $hLVfont EndFunc ;==>_GUICtrlListView_SetItemHeightByFont Func WM_DPICHANGED($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $lParam Local $iDPI = _WinAPI_LoWord($wParam) ConsoleWrite("DPI change triggered! DPI: " & $iDPI & @CRLF) $g_iDPI_ratio1 = $iDPI / $iDPI_def $g_iDPI_ratio2 = $g_iDPI_ratio1 ^ - 1 $fIconSize = 16 * $g_iDPI_ratio1 $fLVFontSize = 15.5 * $g_iDPI_ratio1 AdjustLVIcons() PosGUI() Return 1 EndFunc ;==>WM_DPICHANGED Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam), $tInfo Local Static $iHot = -1, $iHotPrev = -1 Switch HWnd($tNMHDR.hWndFrom) Case $hLV Switch $tNMHDR.Code Case $NM_CLICK ToolTip("") $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) If $tInfo.Index > -1 And $tInfo.Index < UBound($aIconAssignment) Then ConsoleWrite("Shell executing " & $aIconAssignment[$tInfo.Index][1] & @CRLF) _GUICtrlListView_SetItemSelected($hLV, $tInfo.Index, False, False) ;_GUICtrlListView_SetItemFocused($hLV, $tInfo.Index, False) GUISetState(@SW_MINIMIZE, $hGUI) ConsoleWrite("PID: " & ShellExecute(@WindowsDir & "\Explorer.exe", $aIconAssignment[$tInfo.Index][1]) & @CRLF) ;~ ConsoleWrite("PID: " & ShellExecute($aIconAssignment[$tInfo.Index][1]) & @CRLF) EndIf Case $NM_RCLICK ToolTip("") $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) If $tInfo.Index > -1 And $tInfo.Index < UBound($aIconAssignment) Then _GUICtrlListView_SetItemSelected($hLV, $tInfo.Index, False, False) $sRunAsAdmin = $aIconAssignment[$tInfo.Index][1] EndIf _GUICtrlMenu_TrackPopupMenu($hQMenu_LV, $hGUI) Case $NM_KILLFOCUS ToolTip("") GUISetState(@SW_MINIMIZE, $hGUI) Case $NM_CUSTOMDRAW Local $tNMLVCUSTOMDRAW = DllStructCreate($tagNMLVCUSTOMDRAW, $lParam) Local $dwDrawStage = $tNMLVCUSTOMDRAW.dwDrawStage Local $dwItemSpec = $tNMLVCUSTOMDRAW.dwItemSpec Switch $dwDrawStage Case $CDDS_PREPAINT Return $CDRF_NOTIFYITEMDRAW Case $CDDS_ITEMPREPAINT If $dwItemSpec = $iHot Then $tNMLVCUSTOMDRAW.ClrText = 0x000000 $tNMLVCUSTOMDRAW.ClrTextBk = 0x98FF98 Else ; Other rows $tNMLVCUSTOMDRAW.ClrText = 0x000000 $tNMLVCUSTOMDRAW.ClrTextBk = $iLVBgColor EndIf _WinAPI_SelectObject($tNMLVCUSTOMDRAW.hdc, $hLV_Font) Return $CDRF_NEWFONT EndSwitch Case $LVN_HOTTRACK If WinActive($hGUI) Then $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam) $iHot = $tInfo.Item If $iHot <> $iHotPrev Then If $iHot <> -1 Then _GUICtrlListView_RedrawItems($hLV, $iHot, $iHot) If $iHotPrev <> -1 Then _GUICtrlListView_RedrawItems($hLV, $iHotPrev, $iHotPrev) If $iHot <> $iHotPrev And $iHot <> -1 Then $iHotPrev = $iHot EndIf ;check if listview text is shortened with "..." and display listview text in tooltip Local $sTxt = _GUICtrlListView_GetItemTextString($hLV, _GUICtrlListView_GetHotItem($hLV)) Local $hDC = _WinAPI_GetDC($hLV) Local $hFont = _SendMessage($hLV, $WM_GETFONT, 0, 0) Local $hFont_old = _WinAPI_SelectObject($hDC, $hFont) Local $tSize = _WinAPI_GetTextExtentPoint32($hDC, $sTxt) If Not @error Then Local $iTextWidth = $tSize.x * $g_iDPI_ratio1 Local $iColumnWidth = _GUICtrlListView_GetColumnWidth($hLV, $iHot) If $iTextWidth > $iColumnWidth Then $iColumnWidth -= 3 * _WinAPI_GetTextExtentPoint32($hDC, ".") If $iTextWidth >= $iColumnWidth Then ToolTip($sTxt, MouseGetPos(0) + 10, MouseGetPos(1) - 20, "", 0, 6) Else ToolTip("") EndIf Else ToolTip("") EndIf EndIf _WinAPI_SelectObject($hDC, $hFont_old) _WinAPI_ReleaseDC($hLV, $hDC) Return 0 EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $iW = _WinAPI_LoWord($lParam), $iH = _WinAPI_HiWord($lParam), $iH_SB = _GUICtrlStatusBar_GetHeight($hStatusBar) ControlMove($hGUI, "", $iStatusBar, 0, $iH - $iH_SB, $iW, $iH_SB) ControlMove($hGUI, "", $iLV, 0, 0, $iW, $iH - $iH_SB - 1) Return $GUI_RUNDEFMSG EndFunc ;==>WM_SIZE Func WM_EXITSIZEMOVE($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam $bManualResized = True Return $GUI_RUNDEFMSG EndFunc ;==>WM_EXITSIZEMOVE Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $lParam Switch $wParam Case $idRunAsAdmin ConsoleWrite("Shell executing as Administrator" & $sRunAsAdmin & @CRLF) ConsoleWrite("PID: " & ShellExecute($sRunAsAdmin, "", @DesktopDir, "runas") & @CRLF) Case $idSort Static $a[1] = [0], $iDir = 1 $a[0] = ($iDir = 1 ? 0 : 1) _ArraySort($aIconAssignment, $a[0], 0, 0, 1) Local $i _GUICtrlListView_BeginUpdate($hLV) For $i = 0 To UBound($aIconAssignment) - 1 _GUICtrlListView_SetItemImage($hLV, $i, $aIconAssignment[$i][0]) _GUICtrlListView_SetItemText($hLV, $i, StringRegExpReplace($aIconAssignment[$i][1], ".+\\(.+)\..+", "$1")) Next _GUICtrlListView_EndUpdate($hLV) $iDir *= -1 $bSorted = 1 Case $idOpenFL Local $sFullPath = $oShell.CreateShortcut($sRunAsAdmin).TargetPath If $sFullPath = "" Then Return 0 Local $sFolder = StringRegExpReplace($sFullPath, "(.+\\).*", "$1") If $sFolder Then ShellExecute("Explorer.exe", "/e, /n, " & $sFolder, $sFolder) Return 1 EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Func WM_SYSCOMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $lParam Switch BitAND($wParam, 0x0000FFFF) Case $idAbout GUICtrlSendToDummy($iDummy_About) Return 0 Case $SC_RESTORE If @OSBuild > 9599 Then Local $tPos = _WinAPI_GetMousePos() Local $hMontitor = _WinAPI_MonitorFromPoint($tPos) Local $iDPI = _WinAPI_GetDpiForPrimaryMonitor($hMontitor) $g_iDPI_ratio1 = $iDPI / $iDPI_def $g_iDPI_ratio2 = $g_iDPI_ratio1 ^ - 1 $fIconSize = 16 * $g_iDPI_ratio1 $fLVFontSize = 15.5 * $g_iDPI_ratio1 EndIf WinSetTrans($hGUI, "", 0) GUISetState(@SW_RESTORE, $hGUI) If $aFileList[0] Then AdjustLVIcons() PosGUI() WinSetTrans($hGUI, "", 255) Else GUICtrlSendToDummy($iDummy_Error) EndIf Return 0 Case $SC_MINIMIZE ToolTip("") EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_SYSCOMMAND Func LVKeyCallback($nCode, $wParam, $lParam) If $nCode < 0 Then Return _WinAPI_CallNextHookEx($hHook_Key, $nCode, $wParam, $lParam) Switch $wParam Case $WM_KEYDOWN, $WM_SYSKEYDOWN ;prevent keyboard access in listview Local $tKEYHOOKS = DllStructCreate($tagKBDLLHOOKSTRUCT, $lParam) Switch $tKEYHOOKS.vkCode Case $VK_LEFT, $VK_Right, $VK_UP, $VK_DOWN If WinActive($hGUI) Then Return 1 EndSwitch EndSwitch Return _WinAPI_CallNextHookEx($hHook_Key, $nCode, $wParam, $lParam) EndFunc ;==>LVKeyCallback Func ErrFunc() Local Static $iEventError = 0 $iEventError += 1 ; Use to check when a COM Error occurs Local Const $sText_Error = _ (@ScriptName & " : ==> COM Error intercepted !" & @CRLF & _ "Error count is: " & @TAB & $iEventError & @CRLF & _ "Number is: " & @TAB & @TAB & "0x" & Hex($oMyError.number) & @CRLF & _ "WinDescription:" & @TAB & @TAB & $oMyError.windescription & _ "Description is: " & @TAB & $oMyError.description & @CRLF & _ "Source is: " & @TAB & @TAB & $oMyError.source & @CRLF & _ "ScriptLine is: " & @TAB & @TAB & $oMyError.scriptline & @CRLF & _ "RetCode is: " & @TAB & @TAB & "0x" & Hex($oMyError.retcode) & @CRLF & @CRLF) ConsoleWrite($sText_Error) EndFunc ;==>ErrFunc Func _GDIPlus_MeasureString($sString, $sFont = "Arial", $fSize = 12, $iStyle = 0, $bRound = True) Local $aSize[2] Local Const $hFamily = _GDIPlus_FontFamilyCreate($sFont) If Not $hFamily Then Return SetError(1, 0, $aSize) Local Const $hFormat = _GDIPlus_StringFormatCreate() Local Const $hFont = _GDIPlus_FontCreate($hFamily, $fSize, $iStyle) Local Const $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0) Local Const $hGraphic = _GDIPlus_GraphicsCreateFromHWND(0) Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sString, $hFont, $tLayout, $hFormat) $aSize[0] = $bRound ? Round($aInfo[0].Width, 0) : $aInfo[0].Width $aSize[1] = $bRound ? Round($aInfo[0].Height, 0) : $aInfo[0].Height _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_GraphicsDispose($hGraphic) Return $aSize EndFunc ;==>_GDIPlus_MeasureString ;by InnI - https://www.autoitscript.com/forum/topic/200541-solved-taskbar-icons-coordinates/?do=findComment&comment=1521328 Func _WinAPI_FindMyIconPosInTaskbar($sFileDescription) ; Search taskbars Local $ahWnd = WinList("[REGEXPCLASS:Shell_(Secondary)?TrayWnd]") ; Search controls Local $ahCtrl[$ahWnd[0][0]][2] For $i = 1 To $ahWnd[0][0] $ahCtrl[$i - 1][0] = ControlGetHandle($ahWnd[$i][1], "", "MSTaskListWClass1") $ahCtrl[$i - 1][1] = WinGetPos($ahWnd[$i][1]) Next ; Get UIAutomation object Local $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation), $oElement, $oCondition, $oElementArray, $oButton If Not IsObj($oUIAutomation) Then Return SetError(1, 0, 0) ;Exit ConsoleWrite("Error create UIA object" & @CRLF) ; Create 2D array of buttons [name,left,top,right,bottom] Local $aBtnInfo[4], $pElement, $pCondition, $pElementArray, $iButtons, $vValue, $tPos, $hMOnitor, $aMonitorPos $tPos = _WinAPI_GetMousePos() $hMOnitor = _WinAPI_MonitorFromPoint($tPos) If @error Or Not $hMOnitor Then Return SetError(2, 0, 0) $aMonitorPos = _WinAPI_GetMonitorInfo($hMOnitor) If @error Or Not $hMOnitor Then Return SetError(3, 0, 0) $iMonitorX = $aMonitorPos[1].left $iMonitorY = $aMonitorPos[1].top $iMonitorW = Abs($aMonitorPos[1].right - $aMonitorPos[1].left) $iMonitorH = Abs($aMonitorPos[1].bottom - $aMonitorPos[1].top) Local $tRECT = DllStructCreate("long Left;long Top;long Right;long Bottom"), $tPOINT = DllStructCreate($tagPOINT) For $n = 0 To UBound($ahCtrl) - 1 ; Get taskbar element $oUIAutomation.ElementFromHandle($ahCtrl[$n][0], $pElement) $oElement = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) ; Get condition (ControlType = Button) $oUIAutomation.CreatePropertyCondition($UIA_ControlTypePropertyId, $UIA_ButtonControlTypeId, $pCondition) $oCondition = ObjCreateInterface($pCondition, $sIID_IUIAutomationPropertyCondition, $dtagIUIAutomationPropertyCondition) ; Find all buttons $oElement.FindAll($TreeScope_Children, $oCondition, $pElementArray) $oElementArray = ObjCreateInterface($pElementArray, $sIID_IUIAutomationElementArray, $dtagIUIAutomationElementArray) $oElementArray.Length($iButtons) ; Get name and position for each button For $i = 0 To $iButtons - 1 $oElementArray.GetElement($i, $pElement) $oButton = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) $oButton.GetCurrentPropertyValue($UIA_NamePropertyId, $vValue) $oButton.CurrentBoundingRectangle($tRECT) If StringInStr($vValue, $sFileDescription) Then $aBtnInfo[0] = $tRECT.Left $aBtnInfo[1] = $tRECT.Top $aBtnInfo[2] = Abs($tRECT.Right - $tRECT.Left) $aBtnInfo[3] = Abs($tRECT.Bottom - $tRECT.Top) $tPOINT.x = $tRECT.Left $tPOINT.y = $tRECT.Top If _WinAPI_PtInRect($aMonitorPos[0], $tPOINT) Then Return $aBtnInfo EndIf Next Next Return SetError(4, 0, 0) EndFunc ;==>_WinAPI_FindMyIconPosInTaskbar Func _WinAPI_Base64Decode($sB64String) Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "") Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]") $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0) If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "") Return DllStructGetData($bBuffer, 1) EndFunc ;==>_WinAPI_Base64Decode Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize) $tOutput = DllStructCreate("byte[" & $iBufferSize & "]") If @error Then Return SetError(1, 0, 0) Local $aRet = DllCall("ntdll.dll", "uint", "RtlDecompressBuffer", "ushort", 0x0002, "struct*", $tOutput, "ulong", $iBufferSize, "struct*", $tInput, "ulong", DllStructGetSize($tInput), "ulong*", 0) If @error Then Return SetError(2, 0, 0) If $aRet[0] Then Return SetError(3, $aRet[0], 0) Return $aRet[6] EndFunc ;==>_WinAPI_LZNTDecompress Func _WinAPI_GetDPI($hWnd = 0) $hWnd = Not $hWnd ? _WinAPI_GetDesktopWindow() : $hWnd Local Const $hDC = _WinAPI_GetDC($hWnd) If @error Then Return SetError(1, 0, 0) Local Const $iDPI = _WinAPI_GetDeviceCaps($hDC, 88) If @error Or Not $iDPI Then _WinAPI_ReleaseDC($hWnd, $hDC) Return SetError(2, 0, 0) EndIf _WinAPI_ReleaseDC($hWnd, $hDC) Return $iDPI EndFunc ;==>_WinAPI_GetDPI ;https://learn.microsoft.com/en-us/windows/win32/api/shellscalingapi/nf-shellscalingapi-getdpiformonitor Func _WinAPI_GetDpiForPrimaryMonitor($hMOnitor = 0, $dpiType = $MDT_DEFAULT) If $hMOnitor = 0 Then Local $aMonitors = _WinAPI_EnumDisplayMonitors() If @error Or Not IsArray($aMonitors) Then Return SetError(1, 0, 0) Local $i For $i = 1 To $aMonitors[0][0] If _WinAPI_GetMonitorInfo($aMonitors[$i][0])[2] = 1 Then $hMOnitor = $aMonitors[$i][0] ExitLoop EndIf Next EndIf Local $tx = DllStructCreate("int dpiX"), $tY = DllStructCreate("int dpiY") Local $aResult = DllCall("Shcore.dll", "long", "GetDpiForMonitor", "handle", $hMOnitor, "long", $dpiType, "struct*", $tx, "struct*", $tY) If @error Or Not IsArray($aResult) Then Return SetError(2, 0, 0) Return $tx.dpiX EndFunc ;==>_WinAPI_GetDpiForPrimaryMonitor Func _WinAPI_SetProcessDpiAwarenessContext($DPI_AWARENESS_CONTEXT_value) Local $aResult = DllCall("user32.dll", "bool", "SetProcessDpiAwarenessContext", @AutoItX64 ? "int64" : "int", $DPI_AWARENESS_CONTEXT_value) If Not IsArray($aResult) Or @error Then Return SetError(1, @extended, 0) If Not $aResult[0] Then Return SetError(2, @extended, 0) Return $aResult[0] EndFunc ;==>_WinAPI_SetProcessDpiAwarenessContext Func _WinAPI_SetThreadDpiAwarenessContext($DPI_AWARENESS_CONTEXT_value) Local $aResult = DllCall("user32.dll", "uint", "SetThreadDpiAwarenessContext", @AutoItX64 ? "int64" : "int", $DPI_AWARENESS_CONTEXT_value) If Not IsArray($aResult) Or @error Then Return SetError(1, @extended, 0) If Not $aResult[0] Then Return SetError(2, @extended, 0) Return $aResult[0] EndFunc ;==>_WinAPI_SetThreadDpiAwarenessContext Func _WinAPI_SetProcessDpiAwareness($PROCESS_DPI_AWARENESS = $DPI_AWARENESS_PER_MONITOR_AWARE) Local $aResult = DllCall("Shcore.dll", "long", "SetProcessDpiAwareness", "int", $PROCESS_DPI_AWARENESS) If Not IsArray($aResult) Or @error Then Return SetError(1, @extended, 0) If $aResult[0] Then Return SetError(2, $aResult[0], 0) Return $aResult[0] EndFunc ;==>_WinAPI_SetProcessDpiAwareness Func _WinAPI_SetDPIAwareness($DPIAwareContext = $DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE, $iMode = 1) Switch @OSBuild Case 6000 To 9199 Local $aResult = DllCall("user32.dll", "bool", "SetProcessDPIAware") If Not $aResult[0] Then Return SetError(1, 0, 0) Case 9200 To 13999 $DPIAwareContext = ($DPIAwareContext < 0) ? 0 : ($DPIAwareContext > 2) ? 2 : $DPIAwareContext _WinAPI_SetProcessDpiAwareness($DPIAwareContext) If @error Then Return SetError(2, @error, 0) Case @OSBuild > 13999 $DPIAwareContext = ($DPIAwareContext < -5) ? -5 : ($DPIAwareContext > -1) ? -1 : $DPIAwareContext $iMode = ($iMode < 1) ? 1 : ($iMode > 2) ? 2 : $iMode Local $iResult Switch $iMode Case 1 $iResult = _WinAPI_SetProcessDpiAwarenessContext($DPIAwareContext) If Not $iResult Or @error Then Return SetError(3, 0, 0) Case 2 $iResult = _WinAPI_SetThreadDpiAwarenessContext($DPIAwareContext) If Not $iResult Or @error Then Return SetError(4, 0, 0) EndSwitch EndSwitch Local $iDPI If @OSBuild < 9200 Then $iDPI = _WinAPI_GetDPI() If @error Or Not $iDPI Then Return SetError(5, 0, 0) Else $iDPI = _WinAPI_GetDpiForPrimaryMonitor() If @error Or Not $iDPI Then Return SetError(6, 0, 0) EndIf Return $iDPI EndFunc ;==>_WinAPI_SetDPIAwareness #Region Embedded Gfx Func _Info_Pic($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Info_Pic $Info_Pic &= 'iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5OyAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goVCzU6of+cFgAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAQNElEQVR42t1cWZBc1Xn+/nNu3+7pZTZJow000khCywwyoxUtCGEgQgGMMYJsTlKkkspLXvKSl7zkIQ+pJAUpx5VyxS6MF2HALALHNjgCjC0kpNE28mgZ7UgWSAaNZulR9+17zv/n4S7TMxrNyJpuIXKqekbdd3TuOd/5l+9fbhPCceTIcTQ25rDtvb34sz9+GCKid3cczOVy6T/57LPeuUqr1Y7SayyzAEREABEAEMoH0fD31R0S/JSyTwSQ+AMBEcF1EwDwoes6Lw/kB59fu3rZZQB4e9sH2PjAWrz045/jj57chHg3Bw4cwl13tWL//i7V3t7GJ0+fab5woecfBgaubBKWOYJo8xCtFSlSIKLgM6JwFgJkJDw3CRIqQ4UFAkAgYMuwLGDme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/KUBjz68P2Y3Xw7lFIwxuDCxU+x/8Ah7PxwH5gZuWw2TtTcjCESSIdYA8/z4HkF+H4JkyfVf5fWrt+UYObXtXYeTiZrkEyl4CaSUNFDiBOgaYoIxlrkB69Aq+D0Pc+HiCCVSqKmJhlKi9w0MIbCBQPjl+AViyiVir7nebxx4/p1BAArV9//sFJ6ayLhOslkDdxkCo6TgFI6fJh54iWI8g1XqvZzw7yDLYzxUSp5KHlFGRzMF1pm3zbw8kvfn6YAYPfOd37K1v7IL5XgeUUueQX4pRKs9WGtjZncjXYdCMuY76v9iuwFWwtjDPxSCSXPQ8krwvM8Sjjaf2jjfX8XJ+RWrn5A7965zS6/+75dWjkrXTdpE66rE9qFdhworcOMlap0Fq+60hD9DOM1ywxrDIwpoVQqie97ZI35Vceud+8NpScoIRvj87q1G2mwWPgD0fKmCK+31hrjGMdxHCjlxIVr0M3+jpAbVw0Knx8M6lAWli2s8eEb31jfd6w1+9jyJgB4YcsWIiKh5avuw55d72Hpinuxr+N9LF2+vg5E/6uUWqGUNlprRykHWhFAekT7E93S8hEV2aNEUEjCrLVGM/MRMbhr//73S8tX3AfXcbFj59tw9ux6L97a0uXrsW/Pr/o2bNj4SF++8Kds+d+tNSAqgZRG9P0pXySlKW87DUqiokXkh3X1qb/s6/Oc6GB37Hx79CNevfZ++vRSnzpxdI9dsXLNKmb8GwtNFmARkT5BQOEm60zwxR/APAAegHPXdSIihOD7LFpEJKOCEu07KVdt27Hj1//ypWUbdOfeX9r25feCCNjX8T4A4P8AfQxoGhUQAVAAAAAASUVORK5CYII=' Local $bString = Binary(_WinAPI_Base64Decode($Info_Pic)) If $bSaveBinary Then Local $hFile = FileOpen($sSavePath & "\Info_68x68.png", 18) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Info_Pic Func _Error_Pic($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Error_Pic $Error_Pic &= 'iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5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KOHXqVAMYYb4FnScJ2t6k24tR4sVWHoZds6vPUn2C0KBrsR+S4/WTtiDG+l0HSagYZkNY1SED0lJCv0vSdOxkL1UEHPQFJz03el60RPh54pFFd1Ev+3Ei6D5q9VqO8xRmF6LmGhWmiEGc8FOHZlaboEQNayxbASHMaLIAsBLDPg+ag+g3EJuhDgOFXmHCVqJLITFR9oEu0g0Dwy8p7SshxHJHGVEaCNZ2hAEQleBtVuXCCKXD/ygpYr899gDhOM6md+mC1IPlPgGCgEmn+8kvu63BGugwtQrSfXpsdg8pTKX8at6pCgLbM6rxePxnVVV5EkfQhf9hnfpxif1Gn/1sna3ZCOJe1PvsGGFz8lOxxc/eSUDJx+Pxnz1AMpnMD7Isg+d5ZDIZKIrSoI/NJlpYYoKsvN97UStV2BhLSQQ5jgNFUZDJZMDzPMnY/eCpTE9PzzeO47wsy3JXuVzme3t7MT8/j1qtFlhsx9qKqOR00KclQSrjp2LNGldarfyeqaqKdDqNcrkMTdMcQRCy11133TcAwI2MjGBubk4pFotPXbhwYT8Ap1qt8oQDpMRqKQ7TUp+36oss9TnP83V70KqqOhzH8StXrnw+k8kcLJVKOgcAX331FTc/P5+YnJzccv78+dcLhcJVhmGgWq06dB3WcrxKMudWndSlEh90SJIEVVV5RVGQTCane3p6dvf19f371ltvLa5fv94VAeDixYvuCy+8UHz33XcP9vX1HZ2YmNg0Nzf3D57nb5YkSVgGAJGENSscy5UeSkpsURR/TqVSP1xzzTXfJBKJyUQiYRw/fvw/HezYsaMu6XI5Dtd1ucUTLZ6c67qXZUuQrq/dsWMH/h9l1MgBujE/MAAAAABJRU5ErkJggg==' Local $bString = Binary(_WinAPI_Base64Decode($Error_Pic)) If $bSaveBinary Then Local $hFile = FileOpen($sSavePath & "\Status-dialog-error-icon_68x68.png", 18) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Error_Pic Func _OK_Pic($bSaveBinary = False, $sSavePath = @ScriptDir) Local $OK_Pic $OK_Pic &= 'iV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X5nwalrNKj7pZzzEeYR/sQSH/cW/wV+wRAph4vY0tqKsb75WZacUhQ8sTZE7+wwyjovskjbGnqDH9LEMOaVIRqpk9Tbp7CLf4us/qqggbcPMQxM8/Pij7dY4dsAjHt80NoSxWcj9qJnrwbiZLD2M0EY4QAwV6zNebG4jTnZqNtpD9WJABTxxAiLXuHALRIWucrXeT//xJAX2Sg1ztCahqnfWbE4ohFmhHUuDDHKAg3+AShHavgQUlUiDRDKRCCzORLbZSFCwX0c4SabNGlEm8Iarab9zoqGmwJaRk0swEKQgtKk6fQh43GhkWZYrFttbQqEfb6YHkjf/Zu4M9S70siGY1TQbNRSe01k+FC6BkGo3vJ2sGKSpNF+Rp1OxvlQt/ejvsTbLXC1mpp1H2PHIGJqWktWF4KdX+qe9KHfW37HzooaqXXO7vSBCFXjW7YFEENeNKTim1+71Ydw9tJngz8jJ1UrakJSDtaHeOhTs4mrsU1MSXgNvY6JZK1Yy527RLnXEtQvbsWi3oaLf9zEKEvp6YPm7GI6FglNdcQfCK59gP7ntJYR1XGDtyDhUdNO6ZKbdJxWZCs5tq8Xd1H9Bm2/SnGVVcw6C51bTTvhMG/QQCR5O/+PStVS79e+SHJNeZNJNpKOcL3T5EnWE97OH2Od1f6orvKNzjg30P8Ct9xvUPNcU8UAAAAASUVORK5CYII=' Local $bString = Binary(_WinAPI_Base64Decode($OK_Pic)) If $bSaveBinary Then Local $hFile = FileOpen($sSavePath & "\OK-button-icon_68x68.png", 18) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_OK_Pic Func _Sort($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Sort $Sort &= 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAADAFBMVEVHcEwAAQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgQAAQIAAAAERo4AAAAAAAAERo4AAAAAAQMAAAAABg0AAAABBQkAAAAAAAAAAAAUV6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HWunDLlM0jAQNcYaIiR8ZmLx46d+cLAoGuQF+Rzw8cnSNvg/n2QFt1op7AUS8uUMKfoV8/BAskQQ52Tkl+9AgsAbQ0LDQ0D2vv4MVjAQNtYz8JCzxhuBszQe2cuX753Hmjtvmj/0JSUUH/Pz1OmHEBxaefvrRCXgp3qFJ2W5gL2i7autrEJEBgDGQxYAADHkkynWLow7gAAAABJRU5ErkJggg==' Local $bString = _WinAPI_Base64Decode($Sort) If @error Then Return SetError(1, 0, 0) $bString = Binary($bString) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\Sort_16x16.png", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Sort ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2020-06-05 Func _OpenFolder($bSaveBinary = False, $sSavePath = @ScriptDir) Local $OpenFolder $OpenFolder &= 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAB0VBMVEV4xhJ9zAZ/1gCA1gCK1wCM2gCNylqUz1yW2jea3TOn4lSw5G+854O+y9vFz9zJz8DOzsXR2eTR2uTTz8XUqIXUxZjUz8bU0MfU8LPVmmDW0cjXxZPX0snY3N/Y7MjZ1MvZ8b3akz/asova1c3b8r7dngDdoAbdpADdpAbd2dLd9MLepAbepQze2tLe9MTfpQ/fzaDg4uPh4+Th8dri7fjjkiLj9czkuHTk06jk5Obk9s/nqADn99TorxbotDbprxTprxbprxzpsBzpsB7psSPpsiXpsy3pszLp9d7qsR7qsy3qy47q38/q7PrrsBjrtC3rtC/rukbry43stzns18Ts6+rttS3ttzntuT7t27nt7Onutzbuu0Xuu0buvEjux2ju5N7wu0Hwu0XwxmXxuzfxvDrxvUrxvlHxy3vx++Xy8/PzvDbzvTrzyXLz59Dz6Nzz8/P0wk70x1/0yGT01JP1yGb2z3L20H325tf29/X347v35ND39/f43cD47eP5+fn68en6+vj6/Pf78uD7/vf88t388t/8/Pz8/vr98+H9+vj9/vv+9+z++fD+/Pr+/fr+/fv+/vz+/v3+/v7+//7+/////Pj//v3//v7///7///8fdIuRAAAACXBIWXMAABcSAAAXEgFnn9JSAAAA6UlEQVQYV2OYBQSTQITWrJkgigGIZ87qttIz48qcNQUiMGWWDScTMysLd8fkmRCBFhUFCR4ORgaPGRNnAAWmzwCpnMXOZjwVZkZ9QWVjk9ysaW2drT2zGPpq87OijGQNffPKikuLytsYqk1DTIT4BHkFktPS05NyexkqFBP4RQ0spOMTY2PiwkpmMdRJ+hRmp6bkRAeHh0f4Vc1kaBDxtnd383IL8Pf3D/BsnsXQpWTn5OoCBq62gf1Aa82tHR0gwNk6Y9YEhslBqvra6iCgoaMW2T6BoT1U' $OpenFolder &= 'V1lGXFhYWExKXtOyBuxSFAAAdgZiD4/tcMUAAAAASUVORK5CYII=' Local $bString = _WinAPI_Base64Decode($OpenFolder) If @error Then Return SetError(1, 0, 0) $bString = Binary($bString) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\Open-file_16x16.png", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_OpenFolder Func _Restart_Pic($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Restart_Pic $Restart_Pic &= 'k7kAiVBORw0KGgoAAAAADUlIRFIlAHAUARgIBgAojYkAHQ0AAALzelQAWHRSYXcgcHIAb2ZpbGUgdHkAcGUgZXhpZgAAAHja7ZdNkuQAKAyF95xijmAA/SFxHAwmom8AMMefB3Z6qrIAshc5s+qIhDAAYJAfQh+QVekA+PvXSH8hUYkAnNQ8csl5Q9IAooUrGrGdqa4AkjZd5fmi1xgAfe9P9wCjS1AAy/ka+bJ/9NMALXBWFS37IhQA7RrYvw+UawIAjiehayKZHjEAGv0SKpeQ8DkA8PCwnsvacgkA/7qE/Tjr6/sAMwx40izEl/YALfL8ro7odUMApzAfQrKhFOEA0wGZjySpaDgASoIRHIZBFRMARanyWCoC8io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ygAYxBzuooGD4AAvoI13WMexPgAwjw1Mo16w1wDDth4f7YnnWADUPxZjT9dgEwBOj4k0aD1J8wAXXnfZdB4D4QCT4zuu4jK2OwAX0EocBnAzngDh4B7hYayHMQBUCNzCYBUHuwCaGIZwCx8wGwBcDVWsL4V/HgB0FferkMZmYgDYx0WsdEl/CwAvsZzxm7jXCACdtTPjDTwO3QCV8BFPMq6NegCViLaDkTjoIwDs9bjdbVzLuADDRp/SeI+//QA4Vmhm3DdcyQC4Hexm3Bg+ZwBcs8LvQol9wgCdHj9yGz8KJQDZhoWozRTn8AAWU4Vg41gryABmBgu1EParRABzadCnuI4v+ACDUXzFM/zM/AA38KDzMndCUwAYjfLqhqUo3wAzaQ6TeHFW7QBrqVewNP3WCQANdibO7L80awCnHAHNZAS8KQCNgH8IK0cZ5giggq3A' $Restart_Pic &= 'ZwBJRU4ARK5CYII=' $Restart_Pic = _WinAPI_Base64Decode($Restart_Pic) If @error Then Return SetError(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($Restart_Pic) & ']') DllStructSetData($tSource, 1, $Restart_Pic) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 5125) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\Restart_20x20.png", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Restart_Pic Func _Rect_Pic($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Rect_Pic $Rect_Pic &= 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSItDnYQcchQXbQgKuIorVgEC6Wt0KqDyaVf0KQhSXFxFFwLDn4sVh1cnHV1cBUEwQ8QVxcnRRcp8X9JoUWMB8f9eHfvcfcOEJpVppo9k4CqWUY6ERNz+VUx8IoAQghiHD6JmXoys5iF5/i6h4+vd1Ge5X3uzxFSCiYDfCLxPNMNi3iDeHbT0jnvE4dZWVKIz4knDLog8SPXZZffOJccFnhm2Mim48RhYrHUxXIXs7KhEs8QRxRVo3wh57LCeYuzWq2z9j35C4MFbSXDdZojSGAJSaQgQkYdFVRhIUqrRoqJNO3HPPzDjj9FLplcFTByLKAGFZLjB/+D392axekpNykYA3pfbPtjFAjsAq2GbX8f23brBPA/A1dax19rAnOfpDc6WuQIGNgGLq47mrwHXO4AQ0+6ZEiO5KcpFIvA+xl9Ux4YvAX619ze2vs4fQCy1NXyDXBwCIyVKHvd49193b39e6bd3w9P7XKZpWdougAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+cHDQ0AILRpNswAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAfElEQVQ4y+3UMQoCQQyF4U+ZO9iKeBIbD6WV19iTeBWLcdu9xGqTBVELnZlyHoRAAj8hIY/GWkXe4IJ9IeeOE6alMOBRGQOkAO4iHzH+Od0W14WR3pojbjU7XLc+Sgd2YAf+ovTl0RWYwwcw4xCuUar8CjxjrjDYHIz2egIcTx4/Oi5K+wAAAABJRU5ErkJggg==' Local $bString = _WinAPI_Base64Decode($Rect_Pic) If @error Then Return SetError(1, 0, 0) $bString = Binary($bString) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\Rect_20x20.png", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Rect_Pic Func _Check_Pic($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Check_Pic $Check_Pic &= 'lbkAiVBORw0KGgoAAAAADUlIRFIlAHAUARgIBgAojYkAHQ0AAALyelQAWHRSYXcgcHIAb2ZpbGUgdHkAcGUgZXhpZgAAAHja7ZdBkuQAKAxF95xijmAASQiJ42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dAK3JCjwAP3hwYWNrZXQAIGVuZD0idyIAPz4l53wHAAAAAAZiS0dEAP8hQQCgvaeTQAQJcIBIWXMAAAsTwQAgAQCanBgABQd0AElNRQfnBw0NAAA12bTSJwAAAAERSURBVDjLALXUvUrDUBQAAODPmqV2cRDcAESk1MHBRxBcAHwDcVYRurnbAMlJVHyBgiKuAPoADn0AH8BFAKEWN59A/GtdAG4g1tSkST0QAC7cJF/OPffkADLhmArjPA5RAC/oPOEAL/FEABuDklcbogAuAIVxA70xs1vEAG1sREM3e3goAFPDSsH3qlieABQ4g3PcYa0sAFjFBbZQw0JeAHAupb41XGITAB/Yx9WoL3fCANY3sIpnnGE6ALHM6/DMG5qJAB5uhPnOKLCJAC/0cYpZ3CSwAO2hZDLBCo4CANjHYwLbS1ldACYY9+dxAAd4AMfuiHLlAoX6AJ3gFTt/7HxuADDOdCWjlX6AAFl9+In7cRo1AEr50RU4HH6BAF2sh1OjaHSTAGAr7Gi9BNbyAB/xDZYOU00wCIg/xMBLAElFTgBErkJggg==' $Check_Pic = _WinAPI_Base64Decode($Check_Pic) If @error Then Return SetError(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($Check_Pic) & ']') DllStructSetData($tSource, 1, $Check_Pic) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 5012) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\RectCheck_20x20.png", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Check_Pic Func _About_Pic($bSaveBinary = False, $sSavePath = @ScriptDir) Local $About $About &= 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAYAAACEYr13AAAACXBIWXMAAAsSAAALEgHS3X78AAADgklEQVQ4jYWS3UssZRzHv888zzwzOy+7O7O66q4WTQnKZoGg3ih4PLYdKAyKIiE4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FJOCJEJITSOYxpFkRqG4Z1kMnmPc657nvdzs9n8Ughx+heduWqeDdOyegAAAABJRU5ErkJggg==' Local $bString = Binary(_WinAPI_Base64Decode($About)) If $bSaveBinary Then Local $hFile = FileOpen($sSavePath & "\About1_16x20.png", 18) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_About_Pic Func _Exit_Pic($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Exit $Exit &= 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsSAAALEgHS3X78AAABdElEQVQ4ja2UO0vDUBiGn/ecnLbaWmgtRbxPLi6Cm4MuOghO4uDgILg7CG4Orm7+Av+Lo5sI7oqTiChRkdqa4+Clsa3RBF/4IJzke/LmuwTiklkEmkCULfQY0CmZMCjXDzA2BIT3gBfeC+/xn9fxeyDfbExHjaf1Ttgi6Ao01PWiX6UVUGjSJybrG1DGtuQKIVIUP84OzPWfuMrwsqy7jZ3OAKtAd72zSUvAPbAPlBKeWwGFAXCQDPSTQBnYA6aBHeAqMSNFRMApMEdXbd8dpgV+xjVoE2Q7gZnGRjYo5urj4wpyPfNTuTOF4oWrTayZfLGj6x9NcdXR3SQ30cvz1Ovj7RYIW6oe24HKdvPm8ty3mr63fWMTA9kljH1wtbFDWxqsop/mvN2UuArACPBVbAX5WVeb2DB9ZZf0Jb2BMgugM1C9DcwZ2eAP69ce7LgcUCG2kr71EpFC//636bXweWAeuEvJmgH0HShFMqYPOMpgTqDGG6xug+Rulk+sAAAAAElFTkSuQmCC' Local $bString = Binary(_WinAPI_Base64Decode($Exit)) If $bSaveBinary Then Local $hFile = FileOpen($sSavePath & "\Exit3_20x20.png", 18) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Exit_Pic Func _Shell32_39ico($bSaveBinary = False, $sSavePath = @ScriptDir) Local $Shell32_39ico $Shell32_39ico &= 'iLRIAAABABBAQAFwIAAAKEIAABYAAMwAK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gHP/jnhuAhRr/BOKbgQEZ/+KaGBD/+/Pjhn/9+fBw/+GaI/9//z/KJO8Ay4D/56ci/+cMpiHAQsAApCD/5QCjH//loh7/7wDFc//++vH//AHAQe7Ccf/uy4oP/z8/AP8/zCXy1JD/AOuzNP/prSb/BOmsxACrJf/oqQAk/+ioI//orOAw/+7KgPo+/z8fAP8fAPMffwB/AH8A/x8fAB8A//8f/x9/AH8A/x8fAB8AHwAB/R/Ly8v/xMTE/38AfwBuAGEL/x8fAB8AHwD//x9/AH8A/x8/FA8ADwAPAP8PAA8A/w8/AD8APwA/AD8A/z8A/w8PAA8ADwAPAA8ADwD//w8/AD8APwA/AD8APwD/D38PAA8ADwAPAA8ADwAJALLAsrLf8fHx/wk/AH8/AD8APwA/ADIAMQfwD+9/HwkPAA8ADwAPAA8ADwAA4AC0tLRfcQixGD8Avz8APwA/AD8APwBwB9+xB/8fCQ8ADwAPAA8ADwAPAA8A/w8ADwAPAA8ADwAPAA8ADwD/DwAPAA8ADwAPAA8ADwAPAP8PAA8ADwAPAA8ADwAPAA8A/w8ADwAPAA8ADwAPAA8ADwD/DwAPAA8ADwAPAA8ADwAPAP8PAA8ADwAPAA8ADwAPAA8AAQ8AF7CqADoA/xwA8ANMD0UOHw9hBYX/B9MDGwA=' $Shell32_39ico = _WinAPI_Base64Decode($Shell32_39ico) If @error Then Return SetError(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($Shell32_39ico) & ']') DllStructSetData($tSource, 1, $Shell32_39ico) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 16958) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\Shell32_39.ico", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_Shell32_39ico #EndRegion Embedded Gfx #Region Embedded Binary Data #Region TichySID Func _SIDClose() Local $aRet = MemoryDllCall($hTitchysidDll, 'int', 'SIDClose') If @error Then Return SetError(@error, 0, 0) Return $aRet[0] EndFunc ;==>_SIDClose Func _SIDOpen($Sid, $iSubsong = 1) Local $bSid If Not IsBinary($Sid) Then If Not FileExists($Sid) Then Return SetError(2, 0, 0) Local $hFileOpen = FileOpen($Sid, 0) If $hFileOpen = -1 Then Return SetError(-1, 0, 0) $bSid = FileRead($hFileOpen) FileClose($hFileOpen) Else $bSid = $Sid EndIf Local $tSid = DllStructCreate('byte[' & BinaryLen($bSid) & ']') DllStructSetData($tSid, 1, $bSid) Local $sType = BinaryToString(BinaryMid($bSid, 1, 4), 1) ConsoleWrite('-->-- Sid File Type : ' & $sType & @CRLF) Local $iVersion = Execute(BinaryMid($bSid, 5, 2)) ConsoleWrite('-->-- Sid File Version : ' & $iVersion & @CRLF) $iSubsongCount = Int(StringTrimLeft(BinaryMid($bSid, 15, 2), 2)) ConsoleWrite('-->-- SubsongCount : ' & $iSubsongCount & @CRLF) $iSubsong = $iSubsong - 1 If $iSubsong < 0 Then $iSubsong = 0 If $iSubsong > $iSubsongCount Then $iSubsong = 0 ConsoleWrite('-->-- Subsong : ' & $iSubsong & @CRLF) Local $aRet = MemoryDllCall($hTitchysidDll, 'int', 'SIDOpen', 'ptr', DllStructGetPtr($tSid), 'int', DllStructGetSize($tSid), 'int', $SID_MEMORY, 'int', $SID_NON_DEFAULT, 'int', $iSubsong) If @error Then Return SetError(@error, 0, 0) $tSid = 0 $bSid = 0 Return $aRet[0] EndFunc ;==>_SIDOpen Func _SIDShutdown() MemoryDllClose($hTitchysidDll) $hTitchysidDll = 0 EndFunc ;==>_SIDShutdown Func _SIDStartup() $hTitchysidDll = MemoryDllOpen(TitchySIDdll()) If $hTitchysidDll = -1 Then Return SetError(1, 0, 0) Return SetError(0, 0, $hTitchysidDll) EndFunc ;==>_SIDStartup Func _SIDStop() Local $aRet = MemoryDllCall($hTitchysidDll, 'int', 'SIDStop') If @error Then Return SetError(@error, 0, 0) Return $aRet[0] EndFunc ;==>_SIDStop Func _SIDGetFFTData($tFFTData) Local $aRet = MemoryDllCall ( $hTitchysidDll, 'int', 'SIDGetFFTData', "struct*", $tFFTData) If @error Then Return SetError ( @error, 0, 0 ) Return $aRet[0] EndFunc ;==> _SIDGetFFTData() Func TitchySIDdll($bSaveBinary = False, $sSavePath = @ScriptDir) Local $TitchySIDdll $TitchySIDdll &= 'UbwATVqQAAMAAACCBAAw//8AALgAOB0BAEAEOBkAAawOH7oADgC0Cc0huAEATM0hVGhpcyAAcHJvZ3JhbSAAY2Fubm90IGIAZSBydW4gaW4AIERPUyBtb2RAZS4NDQokBIYDgFUFlEc0a8cJA4JEAAPJK3jHVgAHMFJpY2gBEw17UEUAAABMAQQAoAEExF8FE+AADiELIAEFDAAWAAyqBrUDFBAEAzAEDQELAgPv4wEABQcAAAcGBgAPAxoHgRWGAwMDoDEAAPMLgY+AJzwZjvAGAEgXoKEOAIArNBgPLnRl5Hh0gANaFARIgXUHYgECACAAAGAucmTAYXRhAACTAWaBfU2BERqLE4DxQC6DCQBceKLASwF9wQsezgnAAC5yZWxvYwAAvDgBwzbCCQAazAlCsTw/PwA/AD8APwA/AC8AVYsE7LhBOl3CDABWCFfo6kABi/6Bx0JIQEuNTgi4QTz3ACED+DPA/wGDADkQdQKJAYlGAECDfjwAdUZmAGoAZv92mOjoAA4AADPJD7cFAHdOBRBmuSBOAPfhM9JmuQBMAPfxZoP4AHQGAIB+nAB1BbgggE4AAGa5RKzBAwC5QEIPAPfxiSBGPLgACEAOTkAAi9HR4gPWg8IASANOPDvIdhUxQAIrwVCiAyAOK8EAKUY86wyLRjwAUAFGQGoAj0ZQPFLolgCXuQEEOQBOQA+FZ////wAPv0ZIZokHZgCJRwKDxgKDxwAE4u1fXsP/dgAE6FYTAADDaiAgjUYMUMAB/1QAJBDCBAC+XEFYABDDQCAgH/DABzMAwIlGCFBQUGgBQFkQav+NRgRQJOgLAAfHRsAhAgBAg04g/42GQSO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AAMA0R5EgJoQsQIBMB8QAOmkYS6PABefD/YJvwaPAAW+BMkDhQHCAAB5AGEAIAATAAAMAKSmbTyxAB5bFPoMygg+AAcuBu8E+wH9AACeAH8AKgAZAfADBCBUMA2ABOCQAyJUM3EA8AB1AAI7cQAAIkQzDcjIRAARcwCpAXEAcAEBdQAmMYeaDgkEAAEMCgcIBQIDAA0GCxQTBAgWABcFCRgSBgwZACIHDTgfACQtACEBDjIgAgoxABwDCzgqFRURAC0yMSMaHR4bADg3OC4zLzQQACwoKSclJjUP+CswNj8PDwAPAA8ADwD/DwAPAA8ADwAPAA8ADwAPAAcPAA8ADQBOsAAAEAAAKAAAAABMMP4wFjE/MQBUMdYxmzICMwBZMzE0UTSZNEAcOmk6cT8AgCABAggAGjQgNCY0ACw0MjQ4ND40AEQ0SjRQNFY0AwAwtAE=' $TitchySIDdll = _WinAPI_Base64Decode($TitchySIDdll) If @error Then Return SetError(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($TitchySIDdll) & ']') DllStructSetData($tSource, 1, $TitchySIDdll) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 8704) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\TitchySID.dll", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_TitchySIDdll Func API_FreeLibrary($Module) Local $Ret = DllCall($_KERNEL32DLL, 'bool', 'FreeLibrary', 'handle', $Module) If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ;==>API_FreeLibrary Func API_GetProcAddress($Module, $Procname) If IsNumber($Procname) Then Local $Ret = DllCall($_KERNEL32DLL, 'ptr', 'GetProcAddress', 'handle', $Module, 'int', $Procname) Else Local $Ret = DllCall($_KERNEL32DLL, 'ptr', 'GetProcAddress', 'handle', $Module, 'str', $Procname) EndIf If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ;==>API_GetProcAddress Func API_IsBadReadPtr($Ptr, $Len) Local $Ret = DllCall($_KERNEL32DLL, 'int', 'IsBadReadPtr', 'ptr', $Ptr, 'UINT_PTR', $Len) If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ;==>API_IsBadReadPtr Func API_LoadLibrary($Filename) Local $Ret = DllCall($_KERNEL32DLL, 'handle', 'LoadLibraryW', 'wstr', $Filename) If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ;==>API_LoadLibrary Func API_lstrlenA($Address) Local $Ret = DllCall($_KERNEL32DLL, 'int', 'lstrlenA', 'ptr', $Address) If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ;==>API_lstrlenA Func API_lstrlenW($Address) Local $Ret = DllCall($_KERNEL32DLL, 'int', 'lstrlenW', 'ptr', $Address) If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ;==>API_lstrlenW Func API_VirtualProtect($Address, $Size, $Protection) Local $Ret = DllCall($_KERNEL32DLL, 'bool', 'VirtualProtect', 'ptr', $Address, 'dword_ptr', $Size, 'dword', $Protection, 'dword*', 0) If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ;==>API_VirtualProtect Func API_ZeroMemory($Address, $Size) Local $Ret = DllCall($_KERNEL32DLL, 'none', 'RtlZeroMemory', 'ptr', $Address, 'dword_ptr', $Size) If @error Then Return SetError(@error, @extended, 0) Return $Ret[0] EndFunc ;==>API_ZeroMemory Func MemLib_BuildImportTable($CodeBase, $PEHeader) Local Const $IMAGE_DIRECTORY_ENTRY_IMPORT = 1 Local Const $SizeOfPtr = DllStructGetSize(DllStructCreate('ptr', 1)) Local $IMAGE_NT_HEADER = DllStructCreate($tagIMAGE_NT_HEADER, $PEHeader) Local $SizeOfDataDirectory = DllStructGetSize(DllStructCreate($tagIMAGE_DATA_DIRECTORY)) Local $ImportDirectoryPtr = $PEHeader + DllStructGetSize($IMAGE_NT_HEADER) + $IMAGE_DIRECTORY_ENTRY_IMPORT * $SizeOfDataDirectory Local $ImportDirectory = DllStructCreate($tagIMAGE_DATA_DIRECTORY, $ImportDirectoryPtr) Local $ImportSize = DllStructGetData($ImportDirectory, 'Size') Local $ImportVirtualAddress = DllStructGetData($ImportDirectory, 'VirtualAddress') Local $SizeOfImportDir = DllStructGetSize(DllStructCreate($tagIMAGE_IMPORT_DESCRIPTOR)) Local $ImportList = '' If $ImportSize > 0 Then Local $ImportDescPtr = $CodeBase + $ImportVirtualAddress While 1 If API_IsBadReadPtr($ImportDescPtr, $SizeOfImportDir) Then ExitLoop Local $ImportDesc = DllStructCreate($tagIMAGE_IMPORT_DESCRIPTOR, $ImportDescPtr) Local $NameOffset = DllStructGetData($ImportDesc, 'Name') If $NameOffset = 0 Then ExitLoop Local $Name = Peek('str', $CodeBase + $NameOffset) Local $OriginalFirstThunk = DllStructGetData($ImportDesc, 'OriginalFirstThunk') Local $FirstThunk = DllStructGetData($ImportDesc, 'FirstThunk') Local $Handle = API_LoadLibrary($Name) If $Handle Then $ImportList &= $Handle & ',' Local $FuncRef = $CodeBase + $FirstThunk Local $ThunkRef = $CodeBase + $OriginalFirstThunk If $OriginalFirstThunk = 0 Then $ThunkRef = $FuncRef While 1 Local $Ref = Peek('ptr', $ThunkRef) If $Ref = 0 Then ExitLoop If BitAND(Peek('byte', $ThunkRef + $SizeOfPtr - 1), 0x80) Then Local $Ptr = API_GetProcAddress($Handle, BitAND($Ref, 0xffff)) Else Local $IMAGE_IMPORT_BY_NAME = DllStructCreate($tagIMAGE_IMPORT_BY_NAME, $CodeBase + $Ref) Local $NamePtr = DllStructGetPtr($IMAGE_IMPORT_BY_NAME, 2) Local $FuncName = Peek('str', $NamePtr) Local $Ptr = API_GetProcAddress($Handle, $FuncName) EndIf If $Ptr = 0 Then Return SetError(1, 0, False) Poke('ptr', $FuncRef, $Ptr) $ThunkRef += $SizeOfPtr $FuncRef += $SizeOfPtr WEnd Else Return SetError(1, 0, False) EndIf $ImportDescPtr += $SizeOfImportDir WEnd EndIf Return $ImportList EndFunc ;==>MemLib_BuildImportTable Func MemLib_CopySections($CodeBase, $PEHeader, $DllDataPtr) Local $IMAGE_NT_HEADER = DllStructCreate($tagIMAGE_NT_HEADER, $PEHeader) Local $SizeOfFileHeader = DllStructGetPtr($IMAGE_NT_HEADER, 'Magic') - $PEHeader Local $SizeOfOptionalHeader = DllStructGetData($IMAGE_NT_HEADER, 'SizeOfOptionalHeader') Local $NumberOfSections = DllStructGetData($IMAGE_NT_HEADER, 'NumberOfSections') Local $SectionAlignment = DllStructGetData($IMAGE_NT_HEADER, 'SectionAlignment') Local $SectionPtr = $PEHeader + $SizeOfFileHeader + $SizeOfOptionalHeader For $i = 1 To $NumberOfSections Local $Section = DllStructCreate($tagIMAGE_SECTION_HEADER, $SectionPtr) Local $VirtualAddress = DllStructGetData($Section, 'VirtualAddress') Local $SizeOfRawData = DllStructGetData($Section, 'SizeOfRawData') Local $PointerToRawData = DllStructGetData($Section, 'PointerToRawData') If $SizeOfRawData = 0 Then Local $Dest = _MemVirtualAlloc($CodeBase + $VirtualAddress, $SectionAlignment, $MEM_COMMIT, $PAGE_READWRITE) API_ZeroMemory($Dest, $SectionAlignment) Else Local $Dest = _MemVirtualAlloc($CodeBase + $VirtualAddress, $SizeOfRawData, $MEM_COMMIT, $PAGE_READWRITE) _MemMoveMemory($DllDataPtr + $PointerToRawData, $Dest, $SizeOfRawData) EndIf DllStructSetData($Section, 'VirtualSize', $Dest - $CodeBase) $SectionPtr += DllStructGetSize($Section) Next EndFunc ;==>MemLib_CopySections Func MemLib_FinalizeSections($CodeBase, $PEHeader) Local Const $IMAGE_SCN_MEM_EXECUTE = 0x20000000 Local Const $IMAGE_SCN_MEM_READ = 0x40000000 Local Const $IMAGE_SCN_MEM_WRITE = 0x80000000 Local Const $IMAGE_SCN_MEM_NOT_CACHED = 0x4000000 Local Const $IMAGE_SCN_CNT_INITIALIZED_DATA = 64 Local Const $IMAGE_SCN_CNT_UNINITIALIZED_DATA = 128 Local Const $PAGE_WRITECOPY = 0x0008 Local Const $PAGE_EXECUTE_WRITECOPY = 0x0080 Local $IMAGE_NT_HEADER = DllStructCreate($tagIMAGE_NT_HEADER, $PEHeader) Local $SizeOfFileHeader = DllStructGetPtr($IMAGE_NT_HEADER, 'Magic') - $PEHeader Local $SizeOfOptionalHeader = DllStructGetData($IMAGE_NT_HEADER, 'SizeOfOptionalHeader') Local $NumberOfSections = DllStructGetData($IMAGE_NT_HEADER, 'NumberOfSections') Local $SectionAlignment = DllStructGetData($IMAGE_NT_HEADER, 'SectionAlignment') Local $SectionPtr = $PEHeader + $SizeOfFileHeader + $SizeOfOptionalHeader For $i = 1 To $NumberOfSections Local $Section = DllStructCreate($tagIMAGE_SECTION_HEADER, $SectionPtr) Local $Characteristics = DllStructGetData($Section, 'Characteristics') Local $SizeOfRawData = DllStructGetData($Section, 'SizeOfRawData') Local $Executable = (BitAND($Characteristics, $IMAGE_SCN_MEM_EXECUTE) <> 0) Local $Readable = (BitAND($Characteristics, $IMAGE_SCN_MEM_READ) <> 0) Local $Writeable = (BitAND($Characteristics, $IMAGE_SCN_MEM_WRITE) <> 0) Local $ProtectList[8] = [$PAGE_NOACCESS, $PAGE_EXECUTE, $PAGE_READONLY, $PAGE_EXECUTE_READ, $PAGE_WRITECOPY, $PAGE_EXECUTE_WRITECOPY, $PAGE_READWRITE, $PAGE_EXECUTE_READWRITE] Local $Protect = $ProtectList[$Executable + $Readable * 2 + $Writeable * 4] If BitAND($Characteristics, $IMAGE_SCN_MEM_NOT_CACHED) Then $Protect = BitOR($Protect, $PAGE_NOCACHE) Local $Size = $SizeOfRawData If $Size = 0 Then If BitAND($Characteristics, $IMAGE_SCN_CNT_INITIALIZED_DATA) Then $Size = DllStructGetData($IMAGE_NT_HEADER, 'SizeOfInitializedData') ElseIf BitAND($Characteristics, $IMAGE_SCN_CNT_UNINITIALIZED_DATA) Then $Size = DllStructGetData($IMAGE_NT_HEADER, 'SizeOfUninitializedData') EndIf EndIf If $Size > 0 Then Local $PhysicalAddress = $CodeBase + DllStructGetData($Section, 'VirtualSize') API_VirtualProtect($PhysicalAddress, $Size, $Protect) EndIf $SectionPtr += DllStructGetSize($Section) Next EndFunc ;==>MemLib_FinalizeSections Func MemLib_FreeLibrary($ModulePtr) If Not MemLib_Vaild($ModulePtr) Then Return 0 Local $Module = DllStructCreate($tagModule, $ModulePtr) Local $CodeBase = DllStructGetData($Module, 'CodeBase') Local $DllEntry = DllStructGetData($Module, 'DllEntry') Local $Initialized = DllStructGetData($Module, 'Initialized') Local $ImportListPtr = DllStructGetData($Module, 'ImportList') Local $ExportListPtr = DllStructGetData($Module, 'ExportList') If $Initialized And $DllEntry Then Local $Success = MemoryFuncCall('bool', $DllEntry, 'ptr', $CodeBase, 'dword', 0, 'ptr', 0) DllStructSetData($Module, 'Initialized', 0) EndIf If $ExportListPtr Then _MemGlobalFree($ExportListPtr) If $ImportListPtr Then Local $ImportList = StringSplit(Peek('str', $ImportListPtr), ',') For $i = 1 To $ImportList[0] If $ImportList[$i] Then API_FreeLibrary($ImportList[$i]) Next _MemGlobalFree($ImportListPtr) EndIf If $CodeBase Then _MemVirtualFree($CodeBase, 0, $MEM_RELEASE) DllStructSetData($Module, 'CodeBase', 0) DllStructSetData($Module, 'ExportList', 0) _MemGlobalFree($ModulePtr) Return 1 EndFunc ;==>MemLib_FreeLibrary Func MemLib_GetExportList($CodeBase, $PEHeader) Local Const $IMAGE_DIRECTORY_ENTRY_EXPORT = 0 Local $IMAGE_NT_HEADER = DllStructCreate($tagIMAGE_NT_HEADER, $PEHeader) Local $SizeOfDataDirectory = DllStructGetSize(DllStructCreate($tagIMAGE_DATA_DIRECTORY)) Local $ExportDirectoryPtr = $PEHeader + DllStructGetSize($IMAGE_NT_HEADER) + $IMAGE_DIRECTORY_ENTRY_EXPORT * $SizeOfDataDirectory Local $ExportDirectory = DllStructCreate($tagIMAGE_DATA_DIRECTORY, $ExportDirectoryPtr) Local $ExportSize = DllStructGetData($ExportDirectory, 'Size') Local $ExportVirtualAddress = DllStructGetData($ExportDirectory, 'VirtualAddress') Local $ExportList = '' If $ExportSize > 0 Then Local $IMAGE_EXPORT_DIRECTORY = DllStructCreate($tagIMAGE_EXPORT_DIRECTORY, $CodeBase + $ExportVirtualAddress) Local $NumberOfNames = DllStructGetData($IMAGE_EXPORT_DIRECTORY, 'NumberOfNames') Local $NumberOfFunctions = DllStructGetData($IMAGE_EXPORT_DIRECTORY, 'NumberOfFunctions') Local $AddressOfFunctions = DllStructGetData($IMAGE_EXPORT_DIRECTORY, 'AddressOfFunctions') If $NumberOfNames = 0 Or $NumberOfFunctions = 0 Then Return '' Local $NameRef = $CodeBase + DllStructGetData($IMAGE_EXPORT_DIRECTORY, 'AddressOfNames') Local $Ordinal = $CodeBase + DllStructGetData($IMAGE_EXPORT_DIRECTORY, 'AddressOfNameOrdinals') For $i = 1 To $NumberOfNames Local $Ref = Peek('dword', $NameRef) Local $Idx = Peek('word', $Ordinal) Local $FuncName = Peek('str', $CodeBase + $Ref) If $Idx <= $NumberOfFunctions Then Local $Addr = $CodeBase + Peek('dword', $CodeBase + $AddressOfFunctions + $Idx * 4) $ExportList &= $FuncName & Chr(1) & $Addr & Chr(1) EndIf $NameRef += 4 $Ordinal += 2 Next EndIf Return $ExportList EndFunc ;==>MemLib_GetExportList Func MemLib_GetProcAddress($ModulePtr, $FuncName) Local $ExportPtr = Peek('ptr', $ModulePtr) If Not $ExportPtr Then Return 0 Local $ExportList = Peek('str', $ExportPtr) Local $Match = StringRegExp($ExportList, '(?i)' & $FuncName & '\001([^\001]*)\001', 3) If Not @error Then Return Ptr($Match[0]) Return 0 EndFunc ;==>MemLib_GetProcAddress Func MemLib_LoadLibrary($DllBinary) $DllBinary = Binary($DllBinary) Local $DllData = DllStructCreate('byte[' & BinaryLen($DllBinary) & ']') Local $DllDataPtr = DllStructGetPtr($DllData) DllStructSetData($DllData, 1, $DllBinary) Local $IMAGE_DOS_HEADER = DllStructCreate($tagIMAGE_DOS_HEADER, $DllDataPtr) If DllStructGetData($IMAGE_DOS_HEADER, 'e_magic') <> 0x5A4D Then Return SetError(1, 0, 0) EndIf Local $PEHeader = $DllDataPtr + DllStructGetData($IMAGE_DOS_HEADER, 'e_lfanew') Local $IMAGE_NT_HEADER = DllStructCreate($tagIMAGE_NT_HEADER, $PEHeader) If DllStructGetData($IMAGE_NT_HEADER, 'Signature') <> 0x4550 Then Return SetError(1, 0, 0) EndIf Switch DllStructGetData($IMAGE_NT_HEADER, 'Magic') Case 0x10B If @AutoItX64 Then Return SetError(2, 0, 0) Case 0x20B If Not @AutoItX64 Then Return SetError(2, 0, 0) EndSwitch Local $ImageBase = DllStructGetData($IMAGE_NT_HEADER, 'ImageBase') Local $SizeOfImage = DllStructGetData($IMAGE_NT_HEADER, 'SizeOfImage') Local $SizeOfHeaders = DllStructGetData($IMAGE_NT_HEADER, 'SizeOfHeaders') Local $AddressOfEntryPoint = DllStructGetData($IMAGE_NT_HEADER, 'AddressOfEntryPoint') Local $ModulePtr = _MemGlobalAlloc(DllStructGetSize(DllStructCreate($tagModule)), $GPTR) If $ModulePtr = 0 Then Return SetError(3, 0, 0) Local $Module = DllStructCreate($tagModule, $ModulePtr) Local $CodeBase = _MemVirtualAlloc($ImageBase, $SizeOfImage, $MEM_RESERVE, $PAGE_READWRITE) If $CodeBase = 0 Then $CodeBase = _MemVirtualAlloc(0, $SizeOfImage, $MEM_RESERVE, $PAGE_READWRITE) If $CodeBase = 0 Then Return SetError(3, 0, 0) DllStructSetData($Module, 'CodeBase', $CodeBase) _MemVirtualAlloc($CodeBase, $SizeOfImage, $MEM_COMMIT, $PAGE_READWRITE) Local $Base = _MemVirtualAlloc($CodeBase, $SizeOfHeaders, $MEM_COMMIT, $PAGE_READWRITE) _MemMoveMemory($DllDataPtr, $Base, $SizeOfHeaders) MemLib_CopySections($CodeBase, $PEHeader, $DllDataPtr) Local $LocationDelta = $CodeBase - $ImageBase If $LocationDelta <> 0 Then MemLib_PerformBaseRelocation($CodeBase, $PEHeader, $LocationDelta) Local $ImportList = MemLib_BuildImportTable($CodeBase, $PEHeader) If @error Then MemLib_FreeLibrary($ModulePtr) Return SetError(2, 0, 0) EndIf Local $ExportList = MemLib_GetExportList($CodeBase, $PEHeader) Local $ImportListPtr = _MemGlobalAlloc(StringLen($ImportList) + 2, $GPTR) Local $ExportListPtr = _MemGlobalAlloc(StringLen($ExportList) + 2, $GPTR) DllStructSetData($Module, 'ImportList', $ImportListPtr) DllStructSetData($Module, 'ExportList', $ExportListPtr) If $ImportListPtr = 0 Or $ExportListPtr = 0 Then MemLib_FreeLibrary($ModulePtr) Return SetError(3, 0, 0) EndIf Poke('str', $ImportListPtr, $ImportList) Poke('str', $ExportListPtr, $ExportList) MemLib_FinalizeSections($CodeBase, $PEHeader) Local $DllEntry = $CodeBase + $AddressOfEntryPoint DllStructSetData($Module, 'DllEntry', $DllEntry) DllStructSetData($Module, 'Initialized', 0) If $AddressOfEntryPoint Then Local $Success = MemoryFuncCall('bool', $DllEntry, 'ptr', $CodeBase, 'dword', 1, 'ptr', 0) If Not $Success[0] Then MemLib_FreeLibrary($ModulePtr) Return SetError(4, 0, 0) EndIf DllStructSetData($Module, 'Initialized', 1) EndIf Return $ModulePtr EndFunc ;==>MemLib_LoadLibrary Func MemLib_PerformBaseRelocation($CodeBase, $PEHeader, $LocationDelta) Local Const $IMAGE_DIRECTORY_ENTRY_BASERELOC = 5 Local Const $IMAGE_REL_BASED_HIGHLOW = 3 Local Const $IMAGE_REL_BASED_DIR64 = 10 Local $IMAGE_NT_HEADER = DllStructCreate($tagIMAGE_NT_HEADER, $PEHeader) Local $SizeOfDataDirectory = DllStructGetSize(DllStructCreate($tagIMAGE_DATA_DIRECTORY)) Local $RelocDirectoryPtr = $PEHeader + DllStructGetSize($IMAGE_NT_HEADER) + $IMAGE_DIRECTORY_ENTRY_BASERELOC * $SizeOfDataDirectory Local $RelocDirectory = DllStructCreate($tagIMAGE_DATA_DIRECTORY, $RelocDirectoryPtr) Local $RelocSize = DllStructGetData($RelocDirectory, 'Size') Local $RelocVirtualAddress = DllStructGetData($RelocDirectory, 'VirtualAddress') If $RelocSize > 0 Then Local $Relocation = $CodeBase + $RelocVirtualAddress While 1 Local $IMAGE_BASE_RELOCATION = DllStructCreate($tagIMAGE_BASE_RELOCATION, $Relocation) Local $VirtualAddress = DllStructGetData($IMAGE_BASE_RELOCATION, 'VirtualAddress') Local $SizeOfBlock = DllStructGetData($IMAGE_BASE_RELOCATION, 'SizeOfBlock') If $VirtualAddress = 0 Then ExitLoop Local $Dest = $CodeBase + $VirtualAddress Local $Entries = ($SizeOfBlock - 8) / 2 Local $RelInfo = DllStructCreate('word[' & $Entries & ']', $Relocation + 8) For $i = 1 To $Entries Local $Info = DllStructGetData($RelInfo, 1, $i) Local $Type = BitShift($Info, 12) If $Type = $IMAGE_REL_BASED_HIGHLOW Or $Type = $IMAGE_REL_BASED_DIR64 Then Local $Addr = DllStructCreate('ptr', $Dest + BitAND($Info, 0xFFF)) DllStructSetData($Addr, 1, DllStructGetData($Addr, 1) + $LocationDelta) EndIf Next $Relocation += $SizeOfBlock WEnd EndIf EndFunc ;==>MemLib_PerformBaseRelocation Func MemLib_Vaild($ModulePtr) Local $ModuleSize = DllStructGetSize(DllStructCreate($tagModule)) If API_IsBadReadPtr($ModulePtr, $ModuleSize) Then Return False Local $Module = DllStructCreate($tagModule, $ModulePtr) Local $CodeBase = DllStructGetData($Module, 'CodeBase') If Not $CodeBase Then Return False Return True EndFunc ;==>MemLib_Vaild Func MemoryDllCall($Module, $RetType, $FuncName, $Type1 = '', $Param1 = 0, $Type2 = '', $Param2 = 0, $Type3 = '', $Param3 = 0, $Type4 = '', $Param4 = 0, $Type5 = '', $Param5 = 0, $Type6 = '', $Param6 = 0, $Type7 = '', $Param7 = 0, $Type8 = '', $Param8 = 0, $Type9 = '', $Param9 = 0, $Type10 = '', $Param10 = 0, $Type11 = '', $Param11 = 0, $Type12 = '', $Param12 = 0, $Type13 = '', $Param13 = 0, $Type14 = '', $Param14 = 0, $Type15 = '', $Param15 = 0, $Type16 = '', $Param16 = 0, $Type17 = '', $Param17 = 0, $Type18 = '', $Param18 = 0, $Type19 = '', $Param19 = 0, $Type20 = '', $Param20 = 0) Local $Ret, $OpenFlag = False Local Const $MaxParams = 20 If (@NumParams < 3) Or (@NumParams > $MaxParams * 2 + 3) Or (Mod(@NumParams, 2) = 0) Then Return SetError(4, 0, 0) If Not IsPtr($Module) Then $OpenFlag = True $Module = MemoryDllOpen($Module) If @error Then Return SetError(1, 0, 0) EndIf Local $Addr = MemLib_GetProcAddress($Module, $FuncName) If Not $Addr Then Return SetError(3, 0, 0) Poke('ptr', $_MFHookPtr + 1 + @AutoItX64, $Addr) Switch @NumParams Case 3 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi) Case 5 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1) Case 7 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2) Case 9 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3) Case 11 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4) Case 13 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4, $Type5, $Param5) Case Else Local $DllCallStr = 'DllCall ( $_KERNEL32DLL, $RetType, $_MFHookApi', $n = 1 For $i = 5 To @NumParams Step 2 $DllCallStr &= ', $Type' & $n & ', $Param' & $n $n += 1 Next $DllCallStr &= ' )' $Ret = Execute($DllCallStr) EndSwitch Local $Err = @error If $OpenFlag Then MemoryDllClose($Module) Return SetError($Err, 0, $Ret) EndFunc ;==>MemoryDllCall Func MemoryDllClose($Module) MemLib_FreeLibrary($Module) EndFunc ;==>MemoryDllClose Func MemoryDllOpen($DllBinary) If Not IsDllStruct($_MFHookBak) Then MemoryFuncInit() Local $Module = MemLib_LoadLibrary($DllBinary) If @error Then Return SetError(@error, 0, -1) Return $Module EndFunc ;==>MemoryDllOpen Func MemoryFuncCall($RetType, $Address, $Type1 = '', $Param1 = 0, $Type2 = '', $Param2 = 0, $Type3 = '', $Param3 = 0, $Type4 = '', $Param4 = 0, $Type5 = '', $Param5 = 0, $Type6 = '', $Param6 = 0, $Type7 = '', $Param7 = 0, $Type8 = '', $Param8 = 0, $Type9 = '', $Param9 = 0, $Type10 = '', $Param10 = 0, $Type11 = '', $Param11 = 0, $Type12 = '', $Param12 = 0, $Type13 = '', $Param13 = 0, $Type14 = '', $Param14 = 0, $Type15 = '', $Param15 = 0, $Type16 = '', $Param16 = 0, $Type17 = '', $Param17 = 0, $Type18 = '', $Param18 = 0, $Type19 = '', $Param19 = 0, $Type20 = '', $Param20 = 0) If Not IsDllStruct($_MFHookBak) Then MemoryFuncInit() Poke('ptr', $_MFHookPtr + 1 + @AutoItX64, $Address) Local $Ret Switch @NumParams Case 2 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi) Case 4 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1) Case 6 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2) Case 8 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3) Case 10 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4) Case 12 $Ret = DllCall($_KERNEL32DLL, $RetType, $_MFHookApi, $Type1, $Param1, $Type2, $Param2, $Type3, $Param3, $Type4, $Param4, $Type5, $Param5) Case Else Local $DllCallStr = 'DllCall($_KERNEL32DLL, $RetType, $_MFHookApi', $n = 1 For $i = 4 To @NumParams Step 2 $DllCallStr &= ', $Type' & $n & ', $Param' & $n $n += 1 Next $DllCallStr &= ')' $Ret = Execute($DllCallStr) EndSwitch Return SetError(@error, 0, $Ret) EndFunc ;==>MemoryFuncCall Func MemoryFuncInit() Local $KernelHandle = API_LoadLibrary('kernel32.dll') API_FreeLibrary($KernelHandle) Local $HookPtr = API_GetProcAddress($KernelHandle, $_MFHookApi) Local $HookSize = 7 + @AutoItX64 * 5 $_MFHookPtr = $HookPtr $_MFHookBak = DllStructCreate('byte[' & $HookSize & ']') If Not API_VirtualProtect($_MFHookPtr, $HookSize, $PAGE_EXECUTE_READWRITE) Then Return False DllStructSetData($_MFHookBak, 1, Peek('byte[' & $HookSize & ']', $_MFHookPtr)) If @AutoItX64 Then Poke('word', $_MFHookPtr, 0xB848) Poke('word', $_MFHookPtr + 10, 0xE0FF) Else Poke('byte', $_MFHookPtr, 0xB8) Poke('word', $_MFHookPtr + 5, 0xE0FF) EndIf Return True EndFunc ;==>MemoryFuncInit Func Peek($Type, $Ptr) If $Type = 'str' Then $Type = 'char[' & API_lstrlenA($Ptr) & ']' ElseIf $Type = 'wstr' Then $Type = 'wchar[' & API_lstrlenW($Ptr) & ']' EndIf Return DllStructGetData(DllStructCreate($Type, $Ptr), 1) EndFunc ;==>Peek Func Poke($Type, $Ptr, $Value) If $Type = 'str' Then $Type = 'char[' & (StringLen($Value) + 1) & ']' ElseIf $Type = 'wstr' Then $Type = 'wchar[' & (StringLen($Value) + 1) & ']' EndIf DllStructSetData(DllStructCreate($Type, $Ptr), 1, $Value) EndFunc ;==>Poke #EndRegion #EndRegion #Region SID Tune ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2020-06-05 Func _SID_Tune($bSaveBinary = False, $sSavePath = @ScriptDir) Local $SID_Tune $SID_Tune &= 'DrkAUFNJRAACAHwAAAAQABADAAEDABAAAFVuaWNvcoBuZmxha2VzAUABDABT+HJlbiBMgHVuZCAoU28AFgIpCz4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XkAAgULwBcjJigAATAIIAhgAAEFBwfhfQQA8SMEAOtnEABAsAFABQGgAAQDoHAoBQEEAgEABgME/wAVCBUWFjkABQYHCMMBdZAKFxcYGDkA8AoCDHF2/wF+g8H/AD17qMbzHElnAJS99yFSiMLsQB1TbomcGAAAGVUBABoCABsBABwBAIYAYSb+/4FiGmAA/mEa/oMt/oGAYBpi/oJhGLIA2WEBg2GEAPwBgeMA0gNCE9ABE/6EK9ABE2fTAbEAYQGEYYQA/AGBVeMAH9EDF9ABF7MFF6+4B2ABswf/AYHjACPRA+oc0AEcswUcuAdgAbMHBf8BgeMAKP7/hWICPdABPv45/mA7ALH7/D37Y/5hADn+NP5rNrBpIPth/mA3QAE5Ygj7sGPAAP+FZy8EsHmAAC3+L/5gADKy+/w0+7BhIPv+MmX+UAr/hSMTBNEEQP470AFgPUpiwASw0ARnNgAE/gBhNP42/j7+PSPABsACMbNhIAIyZwMiBJABsGX+MmH+ji+xBNIGkgD+/4YPCtsPCgUKhg8KCAqGDwoPCp0FCoYPCg8KYg9iMQAKZjKQAwQKsPtRBfEAPYkwBj5iUQo9sPvQAoA5/mM2/GA3QgeyZZADYzuhBYACMoADVDRkYAFlkQhkAQQvWP4xsJAL0A40kAJhwXADNPv8NmaBDkQPIdEHYy+wZ0AKLfsA/C/+ZTRh/jJ3cAWgAwoDZWYSYQo1B2JmNFAL0A6wYHAPEQ82/7EWrwyvDK8MkAOvDK8Mogz+hq8MrwypDAkD' $SID_Tune &= 'rwyvDKMMAIdhKrT+MbT+UC20/jKCADaCADkCtKEBJrT+L7T+DisSAYAApwGGYSr+6jHQIzJQADZQAHEg0EEoL/4rwAAvJQE=' $SID_Tune = _WinAPI_Base64Decode($SID_Tune) If @error Then Return SetError(1, 0, 0) Local $tSource = DllStructCreate('byte[' & BinaryLen($SID_Tune) & ']') DllStructSetData($tSource, 1, $SID_Tune) Local $tDecompress _WinAPI_LZNTDecompress($tSource, $tDecompress, 3373) If @error Then Return SetError(3, 0, 0) $tSource = 0 Local Const $bString = Binary(DllStructGetData($tDecompress, 1)) If $bSaveBinary Then Local Const $hFile = FileOpen($sSavePath & "\Unicornflakes.sid", 18) If @error Then Return SetError(2, 0, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return $bString EndFunc ;==>_SID_Tune #EndRegion The tool should also work for different DPI settings and in multi-monitor environment. Thanks to for testing: argumentum BugFix Kanashius Mombas After starting, the desktop icons are read in and displayed in a list. With the left mouse button you can start the app, with the right mouse button you have additional options, like starting the app with administrative rights. The source code and the compiled exe file are additionally located on my One Drive: Toolbar Desktop Works best when compiled!
  2. I'm trying to run a #.LNK file on my desktop as administrator. This is what I mixed together from several resources: #AutoIt3Wrapper_Version=p #include <GUIConstantsEx.au3> #include <WinAPICom.au3> #include <WinAPIConv.au3> #include <WinAPIShellEx.au3> Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc") Const $CLSCTX_INPROC_SERVER = 1, $STGM_READ = 0, $SLR_NOUPDATE = 8, $SLR_NO_UI = 1, $SLGP_UNCPRIORITY = 2, $MAX_PATH = 260, $SW_SHOWDEFAULT = 10 Const $sCLSID_ShellLink = "{00021401-0000-0000-C000-000000000046}", _ $sCLSID_IID_IShellLinkW = "{000214F9-0000-0000-C000-000000000046}", _ $sCLSID_IID_IPersistFile = "{0000010b-0000-0000-C000-000000000046}" Const $dtagIUnknown = "QueryInterface hresult(ptr;ptr*);AddRef dword();Release dword();", _ $tag_IPersist = "GetClassID hresult(long);", _ $tag_IPersistFile = $tag_IPersist & _ ; Inherits from IPersist "IsDirty hresult();" & _ "Load hresult(wstr;dword);" & _ "Save hresult(wstr;bool);" & _ "SaveCompleted hresult(long);" & _ "GetCurFile hresult(long);" Const $tagIShellLinkW = _ "GetPath hresult(wstr;int;ptr*;dword);" & _ "GetIDList hresult(ptr*);" & _ "SetIDList hresult(ptr);" & _ "GetDescription hresult(wstr;int);" & _ "SetDescription hresult(wstr);" & _ "GetWorkingDirectory hresult(wstr;int);" & _ "SetWorkingDirectory hresult(wstr);" & _ "GetArguments hresult(wstr;int);" & _ "SetArguments hresult(wstr);" & _ "GetHotkey hresult(word*);" & _ "SetHotkey hresult(word);" & _ "GetShowCmd hresult(int*);" & _ "SetShowCmd hresult(int);" & _ "GetIconLocation hresult(wstr;int;ptr*);" & _ "SetIconLocation hresult(wstr;int);" & _ "SetRelativePath hresult(wstr);" & _ "Resolve hresult(hwnd;dword);" & _ "SetPath hresult(wstr);" Func RunAsAdmin($sFilename) Local $sTargetPath = "" If StringRight($sFilename, 4) = ".lnk" Then Local $tCLSID_IID_IPersistFile = _WinAPI_GUIDFromString($sCLSID_IID_IPersistFile) Local $oShellLink = ObjCreateInterface($sCLSID_ShellLink, $sCLSID_IID_IShellLinkW, $tagIShellLinkW) If Not IsObj($oShellLink) Then ConsoleWrite("Error creating ShellLink object" & @CRLF) Return SetError(1, 0, False) EndIf Local $pIPersistFile = 0 $oShellLink.QueryInterface($tCLSID_IID_IPersistFile, $pIPersistFile) If $pIPersistFile = 0 Then ConsoleWrite("Error creating $pIPersistFile pointer" & @CRLF) Return SetError(2, 0, False) EndIf Local $oIPersistFile = ObjCreateInterface($pIPersistFile, $sCLSID_IID_IPersistFile, $tag_IPersistFile) If Not IsObj($oIPersistFile) Then ConsoleWrite("Error creating IPersistFile object" & @CRLF) Return SetError(2, 0, False) EndIf $oIPersistFile.Load($sFilename, $STGM_READ) $oShellLink.Resolve(Null, BitOR($SLR_NO_UI, $SLR_NOUPDATE)) $oShellLink.GetPath($sTargetPath, $MAX_PATH, Null, $SLGP_UNCPRIORITY) ;~ $oIPersistFile.Release() ;~ $oShellLink.Release() If $sTargetPath = "" Then Return SetError(3, 0, False) EndIf Else $sTargetPath = $sFilename EndIf Local $tSHELLEXECUTEINFO = DllStructCreate($tagSHELLEXECUTEINFO), $tFileBuff = DllStructCreate("wchar file[256]"), $tProperty = DllStructCreate("wchar verb[256]") DllStructSetData($tFileBuff, 1, $sTargetPath) DllStructSetData($tProperty, 1, "runas") With $tSHELLEXECUTEINFO ;https://learn.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shellexecuteinfoa .Size = DllStructGetSize($tSHELLEXECUTEINFO) .Mask = BitOR($SEE_MASK_FLAG_DDEWAIT, $SEE_MASK_INVOKEIDLIST, $SEE_MASK_FLAG_LOG_USAGE) .File = $tFileBuff.file .Verb = $tProperty.verb .Show = $SW_SHOWDEFAULT EndWith If _WinAPI_ShellExecuteEx($tSHELLEXECUTEINFO) = 0 Or @error Then Return SetError(4, 0, False) Return True EndFunc Func _ErrFunc() ConsoleWrite("! COM Error ! Number: 0x" & Hex($oError.number, 8) & " ScriptLine: " & $oError.scriptline & " - " & $oError.windescription & @CRLF) EndFunc ;==>_ErrFunc ConsoleWrite(RunAsAdmin(@DesktopDir & "\CMD.lnk") & " / " & @error & @CRLF) Just create a shortcut on your desktop from C:\Windows\System32\cmd.exe and rename it to CMD. My problem is that the script works sometimes and sometime not, getting the em: "C:\...\test18.au3" (63) : ==> Error in expression.: $oShellLink.GetPath($sTargetPath, $MAX_PATH, Null, $SLGP_UNCPRIORITY) ^ ERROR This stuff is new to me and any help is appreciated.
  3. _FileGetShortcutEx This UDF will return shortcut (.LNK) file information for more advanced shortcuts that AutoIt's built-in FileGetShortcut() chokes on. The following types of shortcuts can be retrieved using this function: MSI Advertised Shortcuts URL (website) Shortcuts that are embedded (rather than put in a .URL file) Special GUID Shell Item Shortcuts. This is only one level deep at the moment, so it will only read the base Folder GUID (For example: shortcuts to 'My Computer', 'Recycle Bin' return fine) UNC Shortcuts ("PCNAME"). This is also only one level deep currently, so "PCNAMEFolder" shortcuts will fail (as well as regular shortcuts, of course) Operation is simple: call '_FileGetShortcutEx("filename")' to get an array that is arranged the same as FileGetShortcut(). Included in the ZIP are two examples of shortcuts that AutoIt will fail on, but this function will work on. I don't have any MSI Advertised shortcut examples, but I believe Microsoft Office and ACDSee shortcuts both use these shortcuts types which return wonky results using AutoIt's function. Thanks go out to Prog@ndy for the original '_FileGetShortcutEx' function and MSI shortcut code (which I converted for Unicode). See my original post here for his code. *Shortcut Key retrieval* This was requested on the Help board, and I thought it was a good idea to include it here. If you need to grab a shortcut's associated Shortcut Key, you can use the below code, assuming you already know beforehand that the file is a shortcut file: $sShortcutFile = "C:\MyShortcut.lnk" $nShortcutKey = Number(StringToBinary(StringMid(FileRead($sShortcutFile, 68), 65, 4))) ConsoleWrite("Shortcut key = " & $nShortcutKey & @CRLF) The format of the key is described under IShellLink::GetHotkey, and I've included code that converts most key combos in >this post. *Special note on 'Normal' Internet shortcuts: While this UDF only looks at .LNK shortcuts (what you use FileGetShortcut() with), some confuse .URL Internet shortcuts with these types, so I decided I'd put a solution for those interested on how to get a URL Internet shortcut. It's actually so simple it can be done in one line, so here it is (note the .URL extension): $sURL=IniRead(@UserProfileDir&"\Favorites\Google.URL","InternetShortcut","URL","") Ascend4nt's AutoIT Code License agreement: no license - just be a good person and credit other people for their work, yeh? Download the ZIP from my site
  4. Is this possible with autoit? What I want to do: Create a Desctop windows shortcut to run an executable application created with autoit, which shortcut would have some parameters which will send as a variable to the aplicagion . For example: Create an app : ExampleAppCreatedByAutoit.exe Run this with a shortcut which has: "C:/ExampleAppCreatedByAutoit.exe" -option1 What I want to do is the ExampleAppCreatedByAutoit.exe take the option1 and do something like this: Shellexecute("c:\myfolder\option1.exe") Can I do that? Thanks,
  5. hi guys, how are you ?? fine? good... Here is a little question: is it possible to know whish shortcut has been used to launch my autoit app ? i'm quite sure that there's nothing to do with autoit, but mostly windows ... My context: i have an app accessed from the network by my user. In my app i use FileCreateShortcut to point to \\myfileserver\myapp.exe Soon, in october, they are going to change my fileserver, so my app will be on \myNEWfileserver\myapp.exe So in my code, i just rewrite my shortcut on the desktop's user. Everything works fine. BUT..some users have several shortcut for my app (they just manually create another shortcut which i don't know the name). So maybe they don't use my shortcut but their own ... => i know I could list all file on desktop, and for all the .lnk i check if destination is myapp.exe and modify the path but do you see another way ? thanks have fun !
  6. I am trying to launch the shortcut through autoit, but I am getting below error. [Window Title] C:\Windows\system32\cmd.exe /c start "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\erwin\erwin Mart Server r9.8 (64-bit)\Create MartServer Service.lnk" [Content] Windows cannot find 'C:\Windows\system32\cmd.exe /c start "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\erwin\erwin Mart Server r9.8 (64-bit)\Create MartServer Service.lnk"'. Make sure you typed the name correctly, and then try again. [OK] Launching the target directly is not feasible as it is dynamic. I tried. $r = ShellExecute(@ComSpec & " /c " & "start """& @ProgramsCommonDir & "\erwin\erwin Mart Server r9.8 (64-bit)\Create MartServer Service.lnk""") and also Run and RUnwait
  7. I am trying to launch a shortcut. But I am getting a file not found error. Even I kept a condition to check the file exist and it is there but still I am getting the below error on run command. $release = "r10.0" $bit = "64" $erwinShortcut = @ProgramsCommonDir&"\erwin\erwin Data Modeler "& $release &" ("& $bit &"-bit)\erwin Data Modeler "& $release &" ("& $bit &"-bit).lnk" Run(@ComSpec & " /c """& $erwinShortcut &"""", @TempDir, @SW_HIDE) [Window Title] C:\ProgramData\Microsoft\Windows\Start Menu\Programs\erwin\erwin Data Modeler r10.0 (64-bit)\erwin Data Modeler r10.0 (64-bit).lnk [Content] C:\ProgramData\Microsoft\Windows\Start Menu\Programs\erwin\erwin Data Modeler r10.0 (64-bit)\erwin Data Modeler r10.0 (64-bit).lnk The specified path does not exist. Check the path, and then try again. [OK] Any suggestions? Even I tried surrounding with both double and single quotes for the path of lnk. And even changed the working directory to startmenu folder and also exe folder.
  8. Translated by Google. Sorry for any mistakes. Sorry for creating this post based on other great creations but after 15 days searching for a solution to a problem beast I solved them. Maybe someone new like me can take advantage of this solution for their programs without wasting so much time I want to leave here my thanks to the 2 post that saved my life First the Yashied for the excellent work in the article: And commenting on improvements to the _FileGetShortcutEX function Commented on by Ascend4nt Here is my list linking the 2 articles #Include <GUIConstantsEx.au3> #Include <GUIImageList.au3> #Include <GUITreeView.au3> #Include <TreeViewConstants.au3> #Include <WindowsConstants.au3> #Include <WinAPIEx.au3> #include "_FileGetShortcutEX.au3" Opt('MustDeclareVars', 1) Global $hForm, $hTreeView, $hImageList, $hItem = 0, $hSelect = 0, $hInput, $Input, $Dummy1, $Dummy2 ;novas linhas <<<<< Global $hInput2, $Input2 Global $X, $Y, $sPath, $sRoot = @ProgramsCommonDir; mudado para o projeto @HomeDrive $hForm = GUICreate('MyGUI', 600, 600) $Input = GUICtrlCreateInput('', 20, 20, 560, 19) $hInput = GUICtrlGetHandle(-1) GUICtrlSetState(-1, $GUI_DISABLE) ;novas linhas <<<<< $Input2 = GUICtrlCreateInput('', 20, 40, 560, 19) $hInput2 = GUICtrlGetHandle(-1) ;GUICtrlSetState(-1, $GUI_DISABLE) ;$hTreeView = _GUICtrlTreeView_Create($hForm, 20, 50, 560, 530, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE) ;_GUICtrlTreeView_SetHeight($hTreeView, 18) GUICtrlCreateTreeView(20, 90, 560, 530, -1, $WS_EX_CLIENTEDGE) $hTreeView = GUICtrlGetHandle(-1) $Dummy1 = GUICtrlCreateDummy() $Dummy2 = GUICtrlCreateDummy() If _WinAPI_GetVersion() >= '6.0' Then _WinAPI_SetWindowTheme($hTreeView, 'Explorer') EndIf $hImageList = _GUIImageList_Create(16, 16, 5, 1) _GUIImageList_AddIcon($hImageList, @SystemDir & '\shell32.dll', 3) _GUIImageList_AddIcon($hImageList, @SystemDir & '\shell32.dll', 4) _GUIImageList_AddIcon($hImageList, @SystemDir & '\shell32.dll', 51) _GUICtrlTreeView_SetNormalImageList($hTreeView, $hImageList) $sRoot = StringRegExpReplace(FileGetLongName($sRoot), '\\+\Z', '') $sPath = StringRegExpReplace($sRoot, '^.*\\', '') If StringInStr($sPath, ':') Then $sRoot &= '\' $sPath &= '\' EndIf If _WinAPI_PathIsDirectory($sRoot) Then $hItem = _GUICtrlTreeView_AddChild($hTreeView, 0, $sPath, 0, 0) If FileClose(FileFindFirstFile($sRoot & '\*')) Then _GUICtrlTreeView_AddChild($hTreeView, $hItem, '', 2, 2) EndIf EndIf GUIRegisterMsg($WM_NOTIFY, 'WM_NOTIFY') GUISetState() If $hItem Then _GUICtrlTreeView_Expand($hTreeView, $hItem) EndIf While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Dummy1 ; Update GUISetCursor(1, 1) _TVUpdate($hTreeView, GUICtrlRead($Dummy1)) GUISetCursor(2, 0) Case $Dummy2 ; Menu $hItem = GUICtrlRead($Dummy2) $sPath = _TVGetPath($hTreeView, $hItem, $sRoot) ConsoleWrite('-------------------------------' & @CR) ConsoleWrite('Handle: ' & $hItem & @CR) ConsoleWrite('Path: ' & $sPath & @CR) If _WinAPI_PathIsDirectory($sPath) Then ConsoleWrite('Type: ' & 'Directory' & @CR) Else ConsoleWrite('Type: ' & 'File' & @CR) EndIf ConsoleWrite('X: ' & MouseGetPos(0) & @CR) ConsoleWrite('Y: ' & MouseGetPos(1) & @CR) ConsoleWrite('-------------------------------' & @CR) EndSwitch WEnd Func _TVGetPath($hTV, $hItem, $sRoot) Local $Path = StringRegExpReplace(_GUICtrlTreeView_GetTree($hTV, $hItem), '([|]+)|(\\[|])', '\\') If Not $Path Then Return '' EndIf If Not StringInStr($Path, ':') Then Return StringRegExpReplace($sRoot, '(\\[^\\]*(\\|)+)\Z', '\\') & $Path EndIf Return $Path EndFunc ;==>_TVGetPath Func _TVSetPath($hTV, $hItem, $sRoot) ;16/11/24 incerindo variaveis pra detalhamento Local $Arq = _TVGetPath($hTV, $hItem, $sRoot) Local $sDir_Name = StringRegExpReplace($Arq, "(^.*\\)(.*)", "\1") Local $NomeArq = StringRegExpReplace($Arq, "^.*\\", "") Local $NomeArqPos = StringInStr($NomeArq, ".", 0, -1);localiza o ponto da extenso if $NomeArqPos Then Local $NomeArq2 = StringLeft($NomeArq, $NomeArqPos - 1) Local $ArqTipo = StringTrimLeft($NomeArq, $NomeArqPos ) if $ArqTipo="lnk" Then Local $t=_FileGetShortcutEX($Arq);FileGetShortcut($Arq) if $t[2]<> "" Then $t[0] &= "' '"&$t[2] EndIf GUICtrlSetData($Input2,"'"&$t[0] &"'") EndIf Else Local $NomeArq2=$NomeArq Local $ArqTipo='' EndIf Local $sDOS_Dir = FileGetShortName($sDir_Name, 1) GUICtrlSetData($Input, _WinAPI_PathCompactPath($hInput,$Arq, 554)) $hSelect = $hItem EndFunc ;==>_TVSetPath Func _TVUpdate($hTV, $hItem) Local $hImageList = _SendMessage($hTV, $TVM_GETIMAGELIST) Local $Path = StringRegExpReplace(_TVGetPath($hTV, $hItem, $sRoot), '\\+\Z', '') Local $hIcon, $hSearch, $hSubitem Local $Index, $File _WinAPI_LockWindowUpdate($hTV) _GUICtrlTreeView_Delete($hTV, _GUICtrlTreeView_GetFirstChild($hTV, $hItem)) $hSearch = FileFindFirstFile($Path & '\*') If $hSearch = -1 Then If Not @error Then If FileExists($Path) Then ; If _WinAPI_PathIsDirectory($Path) Then ; ; Access denied ; EndIf Else _GUICtrlTreeView_Delete($hTV, $hItem) _WinAPI_LockWindowUpdate(0) Return 0 EndIf EndIf Else While 1 $File = FileFindNextFile($hSearch) If @error Then ExitLoop EndIf If @extended Then $hSubItem = _GUICtrlTreeView_AddChild($hTV, $hItem, $File, 0, 0) If FileClose(FileFindFirstFile($Path & '\' & $File & '\*')) Then _GUICtrlTreeView_AddChild($hTV, $hSubItem, '', 2, 2) EndIf EndIf WEnd FileClose($hSearch) EndIf $hSearch = FileFindFirstFile($Path & '\*') If $hSearch = -1 Then Else While 1 $File = FileFindNextFile($hSearch) If @error Then ExitLoop EndIf If Not @extended Then $hIcon = _WinAPI_ShellExtractAssociatedIcon($Path & '\' & $File, 1) $Index = _GUIImageList_ReplaceIcon($hImageList, -1, $hIcon) _GUICtrlTreeView_AddChild($hTV, $hItem, $File, $Index, $Index) _WinAPI_DestroyIcon($hIcon) EndIf WEnd FileClose($hSearch) EndIf _GUICtrlTreeView_SetItemParam($hTV, $hItem, 0x7FFFFFFF) _WinAPI_LockWindowUpdate(0) Return 1 EndFunc ;==>_TVUpdate Func _WinAPI_LockWindowUpdate2($hWnd) Local $Ret = DllCall('user32.dll', 'int', 'LockWindowUpdate', 'hwnd', $hWnd) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf Return 1 EndFunc ;==>_WinAPI_LockWindowUpdate ;AutoIt_Debugger_Command:Disable_Debug Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) Local $tNMTREEVIEW = DllStructCreate($tagNMTREEVIEW, $lParam) Local $hItem = DllStructGetData($tNMTREEVIEW, 'NewhItem') Local $iState = DllStructGetData($tNMTREEVIEW, 'NewState') Local $hTV = DllStructGetData($tNMTREEVIEW, 'hWndFrom') Local $ID = DllStructGetData($tNMTREEVIEW, 'Code') Local $tTVHTI, $tPoint Switch $hTV Case $hTreeView Switch $ID ;AutoIt_Debugger_Command:Enable_Debug Case $TVN_ITEMEXPANDEDW If Not FileExists(_TVGetPath($hTV, $hItem, $sRoot)) Then _GUICtrlTreeView_Delete($hTV, $hItem) If BitAND($iState, $TVIS_SELECTED) Then _TVSetPath($hTV, _GUICtrlTreeView_GetSelection($hTV), $sRoot) EndIf Else If Not BitAND($iState, $TVIS_EXPANDED) Then _GUICtrlTreeView_SetSelectedImageIndex($hTV, $hItem, 0) _GUICtrlTreeView_SetImageIndex($hTV, $hItem, 0) Else _GUICtrlTreeView_SetSelectedImageIndex($hTV, $hItem, 1) _GUICtrlTreeView_SetImageIndex($hTV, $hItem, 1) If Not _GUICtrlTreeView_GetItemParam($hTV, $hItem) Then GUICtrlSendToDummy($Dummy1, $hItem) EndIf EndIf EndIf Case $TVN_SELCHANGEDW If BitAND($iState, $TVIS_SELECTED) Then If Not FileExists(_TVGetPath($hTV, $hItem, $sRoot)) Then _GUICtrlTreeView_Delete($hTV, $hItem) $hItem = _GUICtrlTreeView_GetSelection($hTV) EndIf If $hItem <> $hSelect Then _TVSetPath($hTV, $hItem, $sRoot) EndIf EndIf Case $NM_RCLICK $tPoint = _WinAPI_GetMousePos(1, $hTV) $tTVHTI = _GUICtrlTreeView_HitTestEx($hTV, DllStructGetData($tPoint, 1), DllStructGetData($tPoint, 2)) $hItem = DllStructGetData($tTVHTI, 'Item') If BitAND(DllStructGetData($tTVHTI, 'Flags'), $TVHT_ONITEM) Then _GUICtrlTreeView_SelectItem($hTreeView, $hItem) If Not FileExists(_TVGetPath($hTV, $hItem, $sRoot)) Then _GUICtrlTreeView_Delete($hTV, $hItem) $hItem = _GUICtrlTreeView_GetSelection($hTV) Else GUICtrlSendToDummy($Dummy2, $hItem) EndIf If $hItem <> $hSelect Then _TVSetPath($hTV, $hItem, $sRoot) EndIf EndIf ;AutoIt_Debugger_Command:Disable_Debug EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY ;AutoIt_Debugger_Command:Enable_Debug
  9. Hello all! I was in read-only until today, started to use Autoit 3 weeks ago. It can really make things easy, I really love it I have some script now that works and make our job effective, but I have problems with the latest. It works if I open the script's folder and run the exe directly. If I use the shortcut that I created on the desktop, it's not working properly. Activates the window, but not opening/exporting my files, just opens the last msgbox. I use ftp becouse the PC and the destination PC is not on the same network. Here's the script: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\microsoft_excel.ico #AutoIt3Wrapper_Res_Comment=send file over ftp #AutoIt3Wrapper_Res_Description=send file over ftp for process #AutoIt3Wrapper_Res_Language=1038 #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: imitto Script Function: Rename and put playlist file on ftp #ce ---------------------------------------------------------------------------- #RequireAdmin #include <File.au3> #include <FileConstants.au3> #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #include <FTPEx.au3> ; Script Start Global $playlistname=@YEAR&@MON&@MDAY&"-playlist.pll" BlockInput($BI_DISABLE) Opt ("WinTitleMatchMode", 2) WinActivate("MAIN SCHED") WinWaitActive("MAIN SCHED") ;Opt ("WinTitleMatchMode", 1) Send("!fo") WinWaitActive("Open") Send("Z:\playlist\"&$playlistname&"{ENTER}") Sleep(2000) Send("!fe") WinWaitActive("MCon") Send("{ENTER}") WinWaitActive("Save") Send("C:\sendFileForXLS\lista.txt{ENTER}") Sleep(500) Send("!fc") BlockInput($BI_ENABLE) Sleep(50) Opt ("WinTitleMatchMode", 1) Local $hOpen = _FTP_Open('MyFTP Control') $ftp=_FTP_Connect($hOpen, "**********", "******", "******") If @error Then MsgBox($MB_SYSTEMMODAL, '_FTP_Connect', 'ERROR=' & @error) Else _FTP_FilePut($ftp, @ScriptDir&"\lista.txt", "/lista.txt") EndIf Local $iFtpc = _FTP_Close($hOpen) FileDelete(@ScriptDir&"\lista.txt") MsgBox(0, "", "Playlist exported", 2) Exit
  10. Well. I was needing to create a networks shortcut. so I did find anything into the forum. So I write this after reading about Nonfile Object. ;~ Danyfirex 26/07/2015 #include <WinAPIShellEx.au3> Opt("MustDeclareVars", 1) Global Const $SHCONTF_NONFOLDERS = 0x00040 Global Const $SHGDN_NORMAL = 0 Global Const $S_OK = 0 Global Const $sTagSTRRET = "UINT uType;ptr pOleStr;UINT uOffset;CHAR cStr[256]" Global Const $CLSID_ShellLink = "{00021401-0000-0000-C000-000000000046}" Global Const $sIID_IShellLinkW = "{000214F9-0000-0000-C000-000000000046}" Global Const $sTagIShellLink = "getpath hresult(long;long;long;long); " & _ "getidlist hresult(ptr); " & _ "setidlist hresult(ptr); " & _ "getdescription hresult(long;long); " & _ "setdescription hresult(wstr); " & _ "getworkingdirectory hresult(long;long); " & _ "setworkingdirectory hresult(long); " & _ "getarguments hresult(long;long); " & _ "setarguments hresult(ptr); " & _ "gethotkey hresult(long); " & _ "sethotkey hresult(word); " & _ "getshowcmd hresult(long); " & _ "setshowcmd hresult(int); " & _ "geticonlocation hresult(long;long;long); " & _ "seticonlocation hresult(wstr;int); " & _ "setrelativepath hresult(long;long); " & _ "resolve hresult(long;long); " & _ "setpath hresult(wstr)" Global Const $sIID_IPersistFile = "{0000010b-0000-0000-C000-000000000046}" Global Const $sTagIPersistFile = "GetClassID hresult(long); IsDirty hresult(); Load hresult(long;long); Save hresult(wstr;bool); SaveCompleted hresult(long); GetCurFile hresult(long)" Global Const $sIID_IEnumIDList = "{000214F2-0000-0000-C000-000000000046}" Global Const $sTagIEnumIDList = "Next hresult(ulong;ptr*;ulong*);" & _ "Reset hresult();" & _ "Skip hresult(ulong);" & _ "Clone hresult(ptr*);" Global Const $sIID_IShellFolder = "{000214E6-0000-0000-C000-000000000046}" Global Const $sTagIShellFolder = "ParseDisplayName hresult(hwnd;ptr;wstr;ulong*;ptr*;ulong*);" & _ "EnumObjects hresult(hwnd;dword;ptr*);" & _ "BindToObject hresult(ptr;ptr;clsid;ptr*);" & _ "BindToStorage hresult(ptr*;ptr;clsid;ptr*);" & _ "CompareIDs hresult(lparam;ptr*;ptr*);" & _ "CreateViewObject hresult(hwnd;clsid;ptr*);" & _ "GetAttributesOf hresult(uint:ptr*;ulong*);" & _ "GetUIObjectOf hresult(hwnd;uint;ptr*;clsid;uint*;ptr*);" & _ "GetDisplayNameOf hresult(ptr;dword;ptr);" & _ "SetNameOf hresult(hwnd;ptr*;wstr;dword;ptr*);" Local $MyNetWorkConnectionName="Conexión de red inalámbrica" CreateNetWorkConnectionShortCut($MyNetWorkConnectionName) ;~ Success: Return True ;~ Failure: Return False ;~ if $lnkPath = "" ShortCut will be Create on Desktop with the name of the Conections($sConnectionName) Func CreateNetWorkConnectionShortCut($sConnectionName, $lnkPath = "") Local $pConecctionsFolder = 0 Local $oConecctionsFolder = 0 Local $pEnumIDList = 0 Local $oEnumIDList = 0 Local $pPIDLItem = 0 Local $celtFetched = 0 Local $pPIDLConectionsFolder = 0 Local $bRet = False Local $tSTRRET = 0 Local $twstring = 0 Local $pShellFolder = SHGetDesktopFolder() Local $oShellFolder = ObjCreateInterface($pShellFolder, $sIID_IShellFolder, $sTagIShellFolder) If @error Then Return $bRet $pPIDLConectionsFolder = _WinAPI_ShellGetSpecialFolderLocation($CSIDL_CONNECTIONS) If SUCCEEDED($oShellFolder.BindToObject($pPIDLConectionsFolder, Null, $sIID_IShellFolder, $pConecctionsFolder)) Then $oConecctionsFolder = ObjCreateInterface($pConecctionsFolder, $sIID_IShellFolder, $sTagIShellFolder) If IsObj($oConecctionsFolder) Then If SUCCEEDED($oConecctionsFolder.EnumObjects(Null, $SHCONTF_NONFOLDERS, $pEnumIDList)) Then $oEnumIDList = ObjCreateInterface($pEnumIDList, $sIID_IEnumIDList, $sTagIEnumIDList) If IsObj($oEnumIDList) Then $tSTRRET = DllStructCreate($sTagSTRRET) While (SUCCEEDED($oEnumIDList.Next(1, $pPIDLItem, $celtFetched)) And $celtFetched > 0) If SUCCEEDED($oConecctionsFolder.GetDisplayNameOf($pPIDLItem, $SHGDN_NORMAL, DllStructGetPtr($tSTRRET))) Then $twstring = DllStructCreate("wchar Name[512]", $tSTRRET.pOleStr) If $twstring.Name = $sConnectionName Then If $lnkPath = "" Then $lnkPath = @DesktopDir & "\" & $twstring.Name & ".lnk" $bRet = CreateLnk($pPIDLConectionsFolder, $pPIDLItem, $lnkPath) ExitLoop EndIf $twstring = 0 EndIf WEnd EndIf EndIf EndIf EndIf If $pPIDLConectionsFolder Then _WinAPI_CoTaskMemFree($pPIDLConectionsFolder) Return $bRet EndFunc ;==>CreateNetWorkShortCut Func CreateLnk($PIDL1, $PIDL2, $lnkPath) Local $oShellLink = 0 Local $oIPersistFile = 0 Local $pIPersistFile = 0 Local $pAppendID = 0 Local $bRet = False $oShellLink = ObjCreateInterface($CLSID_ShellLink, $sIID_IShellLinkW, $sTagIShellLink) If @error Then Return $bRet $pAppendID = ILAppendID($PIDL1, $PIDL2) If IsObj($oShellLink) And $pAppendID Then If SUCCEEDED($oShellLink.SetIDList($pAppendID)) Then $oShellLink.QueryInterface($sIID_IPersistFile, $pIPersistFile) $oIPersistFile = ObjCreateInterface($pIPersistFile, $sIID_IPersistFile, $sTagIPersistFile) If IsObj($oIPersistFile) Then $bRet = SUCCEEDED($oIPersistFile.Save($lnkPath, True)) EndIf EndIf EndIf Return $bRet EndFunc ;==>CreateLnk Func ILAppendID($PIDLIST_RELATIVE, $LPSHITEMID, $fAppend = True) Local $aRet = DllCall("Shell32.dll", "ptr", "ILAppendID", "ptr", $PIDLIST_RELATIVE, "ptr", $LPSHITEMID, "bool", $fAppend) If @error Then Return SetError(@error, @extended, 0) If $aRet[0] = 0 Then Return SetError(10, $aRet[0], 0) Return $aRet[0] EndFunc ;==>ILAppendID Func SHGetDesktopFolder() Local $aRet = DllCall("Shell32.dll", "long", "SHGetDesktopFolder", "ptr*", Null) If @error Then Return SetError(@error, @extended, 0) If $aRet[0] Then Return SetError(10, $aRet[0], 0) Return $aRet[1] EndFunc ;==>SHGetDesktopFolder Func SUCCEEDED($hr) Return ($hr >= 0) EndFunc ;==>SUCCEEDED Saludos
  11. I wrote below code to delete a file. But when I am trying to delete a shortcut, it it deleting target file instead of shortcut when I created a context menu entry for this executable. The executable is working fine if we use it normally instead of context menu.But with COntext menu it is taking the target instead of shortcut. By using the below registries. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\Delete Permanently\command] @="\"C:\\Program Files\\Permanent Delete\\Delete Permanently.exe\" \"%1\""And compiled the below code to executable. DeleteFile($CmdLine[$i]) ; Adding the path through CMD line argument. Func DeleteFile($sFilePath) Local $iDelete = FileDelete($sFilePath) ; Display a message of whether the file was deleted. If $iDelete Then MsgBox($MB_ICONINFORMATION, "Deleting ...", "The file was successfuly deleted: " & $sFilePath,10) Else MsgBox($MB_ICONERROR, "Deleting ...", "An error occurred while deleting the file: " & $sFilePath & @CRLF & "Please check whether it is in use by any process",10) EndIf EndFunc
  12. 236 This works perfect for desktop shortcuts $ink = "\cleaner.lnk" $cmd = "C:\AutoIt3\Code\00_Trials\Installer\Cleaner.exe" $icon = "C:\32.ico" ; & "\au3", FileCreateShortcut($cmd , @DesktopDir & $ink , @ScriptDir, "", "Tooltip description of the shortcut.", $icon, @SW_MINIMIZE) This works perfect for the Program Files Menu #include <FileConstants.au3> #include <MsgBoxConstants.au3> $cmd = "C:\AutoIt3\Code\00_Trials\Installer\Cleaner.exe" $icon = "C:\32.ico" $ink = "\cleaner.lnk" FileCreateShortcut($cmd , @ProgramsDir & $ink , @ScriptDir, "", "Tooltip description of the shortcut.", $icon, @SW_MINIMIZE) However this has me so confused and dazed I had to change DishNet to Sirius 60's/70's Motown to chill. My problem is I have confirmed variables for each section of the script but it does not put the variable in the correct place or it ignores it altogether, #include <FileConstants.au3> #include <MsgBoxConstants.au3> Global $ifullpath Global $iicoFile Global $iSoftTitle Global $iincFile Global $incthing ;------------------$cmd = "C:\00test_Installer\00bons1.exe" $cmd = $ifullpath ;------------------$icon = "C:\32.ico" $icon = $iicoFile ;----------------------------$ink = "\file.ini" $ink = $incthing ;------------------------- $iSoftTitle = \SoftTitle.ini $Tooltip = $iSoftTitle IniRead(@ScriptDir & "\SoftTitle.ini", "General", ".", $iSoftTitle) Local $iSoftTitle = IniRead(@ScriptDir & "\SoftTitle.ini", "General", ".", "") MsgBox(4096,"$iSoftTitle", $iSoftTitle) ; Retrieve the system environment variable called %PATH%. Local $sEnvVar = EnvGet("PATH") ; Assign the system environment variable called %PATH% with its current value as well as the script directory. ; When you assign an environment variable you do so minus the percentage signs (%). EnvSet("PATH", $sEnvVar & ";" & @ScriptDir) ; Refresh the OS environment for changes to take affect. EnvUpdate() IniRead(@ScriptDir & "\fullpath.ini", "General", ".", $ifullpath) Local $ifullpath = IniRead(@ScriptDir & "\fullpath.ini", "General", ".", "") MsgBox(4096,"$ifullpath", $ifullpath) Local $sEnvVar = EnvGet("PATH") ; Assign the system environment variable called %PATH% with its current value as well as the script directory. ; When you assign an environment variable you do so minus the percentage signs (%). EnvSet("PATH", $sEnvVar & ";" & @ScriptDir) ; Refresh the OS environment for changes to take affect. EnvUpdate() IniRead(@ScriptDir & "\icoFile.ini", "General", ".", $iicoFile) Local $iicoFile = IniRead(@ScriptDir & "\icoFile.ini", "General", ".", "") MsgBox(4096,"$iicoFile", $iicoFile) Local $sEnvVar = EnvGet("PATH") ; Assign the system environment variable called %PATH% with its current value as well as the script directory. ; When you assign an environment variable you do so minus the percentage signs (%). EnvSet("PATH", $sEnvVar & ";" & @ScriptDir) ; Refresh the OS environment for changes to take affect. EnvUpdate() IniRead(@ScriptDir & "\File.ini", "General", ".", $iincFile) Local $iincFile = IniRead(@ScriptDir & "\File.ini", "General", ".", "") MsgBox(4096,"$iincFile", $iincFile) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"\" & $iincFile &".ink" = $incthing $incthing=("\" & $iincFile &".ink") MsgBox(4096,"$incthing", $incthing) FileCreateShortcut($cmd , @ProgramsDir & $ink , @ScriptDir, "", $Tooltip, $icon, @SW_MINIMIZE) This does make a programfiles menu item The target is Computer and not the var $Cmd The start in is the correct directory It added a shortcut key! that I did not add It ignored the comment altogether and that is empty and the wrong icon. Are there different rules if you use a variable instead of a text string? Thanks for looking. Oh yes I almost forgot, I use this fancy piece of code I found in the forums one day that really saved me. I could not get things straight bouncing between things and put this in and all of a sudden the path I wanted was there, I do apologize as I do not remember who posted it Local $sEnvVar = EnvGet("PATH") ; Assign the system environment variable called %PATH% with its current value as well as the script directory. ; When you assign an environment variable you do so minus the percentage signs (%). EnvSet("PATH", $sEnvVar & ";" & @ScriptDir) ; Refresh the OS environment for changes to take affect. EnvUpdate()
  13. Internet Shortcut Sanitizer With the newest Firefox and IE browsers, there's a bit of an issue with Internet Shortcuts created, which have been traditionally saved in a .URL file on Windows (an INI-structured file). Firefox now adds Icon information to the file which points it at a location within %localappdata%MozillaProfiles. This to me is annoying and unnecessary. While it may reflect the favicon of a website, its got a few problems: When the cache is cleared or the bookmark is moved to another computer or put on a fresh install, that icon isn't there anymore. These shortcuts contain your logon name (part of %localappdata%), so be aware of this if you are going to share them! (or just use a generic logon) Here's the content of a typical Firefox .URL file (<LogonName> is your Windows logon): [InternetShortcut] URL=http://www.google.com/ IDList= HotKey=0 IconFile=C:\Users\<LogonName>\AppData\Local\Mozilla\Firefox\Profiles\a3n21a.default\shortcutCache\md34sdyu7s_g==.ico IconIndex=0 _ Update: if you have Firefox 21, you can follow and edit Firefox's about:config settings to fix the way URL shortcuts are created. Internet Explorer (IE 9+) now has its own new shortcut extension (.website), which seems to only work with the IE browser. These files are basically 'enhanced' internet shortcuts. The extra information included is cryptic, and appears to be of no use outside of IE. However, the INI-format is the same, and the [internetShortcut] section is the same, so it can simply be renamed to have a .URL extension. Here's the content of a typical Internet Explorer 9+ .website file: [{000214A0-0000-0000-C000-000000000046}] Prop4=31,Google Prop3=19,2 [{A7AF692E-098D-4C08-A225-D433CA835ED0}] Prop5=3,0 Prop9=19,0 [InternetShortcut] URL=http://www.google.com/ IDList= IconFile=http://www.google.com/favicon.ico IconIndex=1 [{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}] Prop12=19,2 Prop5=8,Microsoft.Website.9CB8E698.8730F9E8 _ (Note the embedded [internetShortcut] section) Sanitize your shortcuts! The fix for these problems? A little Internet Shortcut Sanitizer program. If you're like me and just want Internet Shortcuts to be just that - a simple file with a URL in it, then this program will give you what you need. It strips everything out but the 2 lines necessary to work as a .URL file: [InternetShortcut] URL=http://www.website.com _ The script will also create .URL's from .website files and remove all the IE related stuff. Currently it either takes 1 parameter or allows you to select 1 file to change. However, it can be adapted to work on multiple files with a little extra effort. However, I'd recommend something like grepWin to clear out folders (see 3rd post), and maybe a batch file renamer to deal with .website -> .URL conversion. Below is the script. Changelog: 2013-05-17: - Packaged the main functionality of the script into the embedded UDF: _InternetShortcutSanitize() ; ================================================================================================================== ; <InternetShortcutSanitizer.au3> ; ; 'Sanitizes' Internet shortcuts, both of the traditional Windows .URL format and of the newer IE .website format ; In the case of the latter, it will delete the .website variant and create a URL version ; ; Author: Ascend4nt ; ================================================================================================================== Local $sFile If $CmdLine[0] < 1 Then $sFile=FileOpenDialog("Select Internet Shortcut to Sanitize","","Internet Shortcut Files (*.URL;*.website)|All Files (*.*)",3) If @error Or $sFile="" Then Exit Else $sFile = $CmdLine[1] EndIf $sFile = StringStripWS($sFile,3) If Not FileExists($sFile) Then Exit ;~ ConsoleWrite("Internet Shortcut file to sanitize = "&$sFile&@CRLF) _InternetShortcutSanitize($sFile) ; =================================================================================================== ; Func _InternetShortcutSanitize($sFile) ; ; 'Sanitizes' the Internet shortcut file passed. This keeps URL files to a 2-line file of this format: ; [InternetShortcut] ; URL=http://www.website.com ; ; In the case the input file is an Internet Explorer .website shortcut (in IE 9+), it will ; create a .URL file of the same name, and upon successful write, it will delete the .website file. ; ; $sFile = Full path to file to sanitize ; ; Return: ; Success: True ; Failure: False with @error set ; ; Author: Ascend4nt ; =================================================================================================== Func _InternetShortcutSanitize($sFile) If $sFile = "" Then Return SetError(1,@error,False) ; Get rid of whitespace at beginning & end $sFile = StringStripWS($sFile,3) Local $sFileOut, $nRet Local $sURL = "", $sFileContent = "" $sURL = IniRead($sFile, "InternetShortcut", "URL", "") If @error Or $sURL = "" Then Return SetError(-1,@error,False) ;~ ConsoleWrite("URL = "&$sURL&@CRLF) ; Standard URL format $sFileContent = "[InternetShortcut]"&@CRLF&"URL="&$sURL&@CRLF ; $sFileOut: If not .website, we keep it the same. ; Otherwise, we transfer it to a .URL file If StringRight($sFile, 8) = ".website" Then $sFileOut = StringReplace($sFile, ".website", ".URL", -1) Else $sFileOut = $sFile EndIf ; Create/Overwrite the URL file $hFile = FileOpen($sFileOut, 2) If $hFile = -1 Then Return SetError(3, 0, False) $nRet = FileWrite($hFile, $sFileContent) FileClose($hFile) ; FileWrite error? If Not $nRet Then ;~ ConsoleWrite("File Write error"&@CRLF) Return SetError(4,0,False) EndIf ; .website -> .URL 'translation' performed? Delete .website file If $sFile <> $sFileOut Then ; Make sure we actually created the .URL file before delete: If FileExists($sFileOut) Then FileDelete($sFile) EndIf Return True EndFunc
  14. Hello guys I would like to be able to change songs on spotify using shourtcuts on my keyboard due to the fact i don't own a keyboard with extra keys providing this feature. Therefor I've made a script binding my keys to make this possible, but i have a few issues and I think there is a easier or better way of creating this script. I hope someone can have a look and tell me what i could improve. Some of the issues are: I have to wait a little time before i will be able to change song right after i just changed. (I can't spam ALT + Right) Doesn't work when im inside a game. This is actually a big issue for me. My current code which works: HotKeySet("!{left}", "Previous") HotKeySet("!{right}","naeste") HotKeySet("!{down}","current") HotKeySet("{DEL}","quit") While 1 Sleep(100) WEnd Func naeste() Sleep(400) ControlSend("Spotify", "", "", "^{right}") EndFunc Func Previous() Sleep(400) ControlSend("Spotify", "", "", "^{left}") EndFunc Func Current() Local $song = WinGetTitle("Spotify", "") TrayTip("", $song, 1) EndFunc Func quit() Exit 0 EndFunc - AliOzturk
  15. Mak Context Entry Creator v1.2 Mak Context Entry Creator ver 1.2 Change Log: Added My Computer, Recycle Bin, XBMC and Skype. Fixed Some bugs. Now delete registry key directly from MCEC. New Style. ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ »MCEC v1.1 Link >here. MCEC new key remove option allow you to directly delete the un-necessary link. To delete click on the link say, "MCEC". Click on MCEC and then click "delete" button. Please Note: Do not delete "Display" and "Personalize" and "any other default key". If you like this application please comment and share with your friend. And if you like to help me yo're welcome. Windows XP users, Please let me know the registry key for Desktop Background so that it can support Windows XP and Windows Vista. Supports Windows 7, Checked on Win 7 HB and Ultimate. »» Download MCEC »» mcec.zip ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
  16. Mak Context Entry Creator +|=========================================|+ Mak Context Entry Creator is a small autoit compiled tool which allow user to create a executable shortcut at their desktop right click. The main purpose of this software is to make desktop clean and minimal. Majority of user link their useful shortcuts to their desktop and also at their taskbar. Desktop shortcut looks somewhat dirty so i created an app which let you to be minimal but also without compromising the favorite or useful shortcut. Mak Context Entry creator adds your favorite or useful software to your right click by creating a registry key. You can add as many shortcut you want but it takes some CPU memory too. So by using this software your desktop remain minimal, hide your desktop shortcut or remove them. Open your shortcut using right click. How to Use? The application itself open with administrator privilege. Click on Select Path button and choose your executable path. The first text field display the executable name as it is, so in same cases you have to edit the name. The second text-field display the executable path(don't edit it). After then click Create Context Menu. You can also use auto-built features, these are Add Registry, Add CP. Also included the Services.msc. The only drawback of this application is that you can not delete the registry value using this application, but you can use the registry editing tutorial given in the read me file. Also a backup file is also given. If you like this application please comment and share with your friend. And if you like to help me yo're welcome. This is my first application here and first GUI application i created. Mak Context Entry Creator v1.1.7z
  17. InternetShortcutCreator v1.0.1.5 On your desktop, your Internet Shortcuts have all the same default icon ? it's a pity ! With InternetShortcutCreator you can Create an Internet Shortcut with the website's favicon ! (if there is one and if it can be found and downloaded) Now when your browser is in fullscreen, no need to resize it for be able to drag the favicon (who is at left of the url bar) for create a shortcut on your desktop. So, how it works : When Mouse is over Url Bar, Cursor becomes a blue hand. At this moment Click Middle mouse button (or F10 for touchpad user) for start. While script is working to create shortcut, Cursor become a red hand ( when it's red, you need to wait for create an other shortcut) Cursor is reset to default when Mouse is not over Url Bar. Attention : control or text can only be found for IE or Chromium familly (Chromium, Chrome, SrWare Iron, Comodo Dragon, Yandex.Browser, Baidu Spark Browser). So for other browsers you need to copy the url. No externals files needed, they are already in script. >WinAPIEx.au3 and >WinHTTP.au3 needed. Source : InternetShortcutCreator v1.0.1.5.au3 Executable : InternetShortcutCreator.exe.html (Once this html file downloaded, double click on it for start the download) See Tray Menu for access Settings. A little tool who can help you and permit your desktop to be more nice!
  18. I'm trying to add a user shortcut key to display the calltip for the word I'm on, but nothing works. Here's what I did: I added these lines: # User defined key commands user.shortcuts=\ Alt+F1|IDM_SHOWCALLTIP\ Ctrl+Shift+V|IDM_PASTEANDDOWN|\ Ctrl+PageUp|IDM_PREVFILE|\ Ctrl+PageDown|IDM_NEXTFILE|\ KeypadPlus|IDM_EXPAND|\ KeypadMinus|IDM_BLOCK_COMMENT|\ Ctrl+F1|IDM_HELP_SCITE| to these files: C:\Users\<username>\SciTEUser.properties C:\Users\<username>\SciTEGlobal.properties C:\Program Files\AutoIt3\SciTE\SciTEUser.properties C:\Program Files\AutoIt3\SciTE\SciTEGlobal.properties When I restart the editor and try again, the Alt+F1 doesn't do anything. I've tried other shortcut key combinations (Ctrl+B, etc.), but none of them worked. I've searched this forum, and I Googled it, but none of the suggestions worked. Is there something else I need to change?
×
×
  • Create New...