Jump to content

wakillon

Active Members
  • Posts

    3,290
  • Joined

  • Last visited

  • Days Won

    23

wakillon last won the day on June 8 2016

wakillon had the most liked content!

5 Followers

About wakillon

  • Birthday 07/29/1968

Profile Information

  • Location
    Mont Saint Michel

Recent Profile Visitors

5,888 profile views

wakillon's Achievements

  1. Drag and drop any Control in place of an other #Region ;************ Includes ************ #include <ButtonConstants.au3> #include <GuiConstantsEx.au3> #include <WinAPIGdi.au3> #EndRegion ;************ Includes ************ Opt('MustDeclareVars', 1) #Region ------ Global Variables ------------------------------ Global $hGui, $iButtonCount = 20, $iButtonSize = 40, $idMovingButton, $iHMargin = 10, $iVMargin = 10, $idMsg, $x, $y Global $aButtonId[$iButtonCount], $aButtonPos[$iButtonCount][2], $aCursorInfo #EndRegion ------ Global Variables ------------------------------ #Region ------ Gui Creation ------------------------------ $hGui = GUICreate('', 110, 510) GUISetFont(9.5, $FW_BOLD, $GUI_FONTNORMAL, 'Consolas') GUISetBkColor(0xA8A8A8) For $i = 0 To UBound($aButtonId) - 1 $aButtonPos[$i][0] = $iVMargin + ($iVMargin + $iButtonSize) * ($i > 9) ; x coord $aButtonPos[$i][1] = $iHMargin + ($iButtonSize + $iVMargin) * $i - 500 * ($i > 9) ; y coord $aButtonId[$i] = GUICtrlCreateRadio($i + 1, _ $aButtonPos[$i][0], _ $aButtonPos[$i][1], _ $iButtonSize, _ $iButtonSize, _ BitOR($BS_ICON, $BS_PUSHLIKE, $BS_FLAT, $BS_CENTER)) GUICtrlSetCursor(-1, 0) Next GUISetState() #EndRegion ------ Gui Creation ------------------------------ #Region ------ Main Loop ------------------------------ While 1 $idMsg = GUIGetMsg() Switch $idMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Sleep(150) Do $aCursorInfo = GUIGetCursorInfo($hGui) If Not @error Then $idMovingButton = $aCursorInfo[4] Until $idMovingButton If $aCursorInfo[2] Then Do $aCursorInfo = GUIGetCursorInfo($hGui) If Not @error Then ControlMove($hGui, _ '', _ $idMovingButton, _ $aCursorInfo[0] - $iButtonSize / 2, _ $aCursorInfo[1] - $iButtonSize / 2) Sleep(10) Until Not $aCursorInfo[2] $x = -1 For $i = 0 To UBound($aButtonPos) - 1 ; check if Moving ctrl is over an other ctrl If $i <> ($idMovingButton - $aButtonId[0]) And _WinAPI_PtInRectEx($aCursorInfo[0], _ $aCursorInfo[1], _ $aButtonPos[$i][0], _ ; x $aButtonPos[$i][1], _ ; y $aButtonPos[$i][0] + $iButtonSize, _ ; w $aButtonPos[$i][1] + $iButtonSize) Then ; h ControlMove($hGui, _ '', _ $aButtonId[$i], _ $aButtonPos[$idMovingButton - $aButtonId[0]][0], _ $aButtonPos[$idMovingButton - $aButtonId[0]][1]) ControlMove($hGui, _ '', _ $idMovingButton, _ $aButtonPos[$i][0], _ $aButtonPos[$i][1]) GUICtrlSetState($aButtonId[$i], $GUI_FOCUS) ; Save new positions $x = $aButtonPos[$idMovingButton - $aButtonId[0]][0] $y = $aButtonPos[$idMovingButton - $aButtonId[0]][1] $aButtonPos[$idMovingButton - $aButtonId[0]][0] = $aButtonPos[$i][0] $aButtonPos[$idMovingButton - $aButtonId[0]][1] = $aButtonPos[$i][1] $aButtonPos[$i][0] = $x $aButtonPos[$i][1] = $y ConsoleWrite('!->-- [' & StringFormat('%03i', @ScriptLineNumber) & '] Button ' & _ $idMovingButton - $aButtonId[0] + 1 & ' was moved in place of Button ' & $i + 1 & @CRLF) ExitLoop EndIf Next If $x = -1 Then ; place moved ctrl to his previous pos ControlMove($hGui, _ '', _ $idMovingButton, _ $aButtonPos[$idMovingButton - $aButtonId[0]][0], _ $aButtonPos[$idMovingButton - $aButtonId[0]][1]) ConsoleWrite('>->-- [' & StringFormat('%03i', @ScriptLineNumber) & '] Button ' & _ $idMovingButton - $aButtonId[0] + 1 & ' was moved but has been moved back to his previous position' & @CRLF) EndIf Else ConsoleWrite('+->-- [' & StringFormat('%03i', @ScriptLineNumber) & '] Button ' & _ $idMovingButton - $aButtonId[0] + 1 & ' was clicked' & @CRLF) EndIf Beep(1200, 50) EndSwitch Sleep(10) WEnd #EndRegion ------ Main Loop ------------------------------
  2. Updated "Display Name" and Icon can now be changed by new context menu This makes it easier to identify the buttons, especially when they are folders that all have the same icon All Changes are saved in SlidingToolBar.ini file located to TempDir & "\SlidingToolBar" directory Added by default some basic special folders in the default creation of the SlidingToolBar.ini file (Rename previous one if you want to try) Ini file example, who can be easily edited Merry Christmas 🫡 SlidingToolbar1.0.0.9.au3
  3. MouseTail revisited A bit of fun doesn't hurt Look at tray menu for config Only tested on Win 11 MouseTail.v1.0.0.3.au3
  4. New Version 2.1.0.4 Display modified Left click on an icon for save it with the size you want, regardless of the mode (Ordinal/Name) used The file path is indicated as ioa747 wished enumicons.au3
  5. Trick for display your favorite directories in FileSaveDialog and FileOpenDialog with Win 11 The favorite directories are set in registry to : HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\Placesbar Example of Placesbar Reg File Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\Placesbar] "Place1"="C:\\" "Place2"="C:\\Program Files (x86)\\AutoIt3\\Include" "Place4"="D:\\" "Place0"=dword:00000011 "Place3"=dword:00000010 11 is "My Computer" and 10 the Desktop #Region ;************ Includes ************ #Include <WinAPITheme.au3> #EndRegion ;************ Includes ************ $hGui = GUICreate('', 500, 500) GUISetState() ; Default display FileSaveDialog('Save file', @WorkingDir, 'Scripts (*.au3)', $FD_PATHMUSTEXIST, '', $hGui) ; ; Display with PlacesBar _WinAPI_SetThemeAppProperties($STAP_ALLOW_NONCLIENT) FileSaveDialog('Save file', @WorkingDir, 'Scripts (*.au3)', $FD_PATHMUSTEXIST, '', $hGui) FileOpenDialog('Select a file', @WorkingDir & '\', 'Images (*.jpg;*.bmp)', $FD_FILEMUSTEXIST, '', $hGui) ; ; Reset default display _WinAPI_SetThemeAppProperties(-1) FileSaveDialog('Save file', @WorkingDir, 'Scripts (*.au3)', $FD_PATHMUSTEXIST, '', $hGui) GUIDelete($hGui) Exit
  6. Last week I came across enumicons.au3 in the folder C:\Program Files (x86)\AutoIt3\Examples\GUI\Advanced and while testing it, I thought that a small update wouldn't hurt enumicons.au3
  7. Previous version was at the top of screen but as i said, it's annoying for navigation SlidingToolbar1.0.0.5.au3
  8. No need to click for see it, just put your mouse on the left side of your screen Why on the left? Because the taskbar is already crowded, on the right side we scroll, and at the top when we use our browser tab by tab, it's not convenient to have a GUI in the way. You can add Shortcut, InternetShortcut, Files, and Folder by drag and drop on any button (special folders not supported) Right click menu on it for delete item See tray menu for options To exit, click on the InfoBar at the bottom of the GUI or by tray menu SlidingToolbar.7z
  9. Your welcome Some includes are not necessary, and I will declare my local variables before a loop
  10. Hi ioa747 I have tried your code with an autoitscript.com xml file sitemap and it works pretty well 😉 https://www.autoitscript.com/site/page-sitemap.xml And we can see some 404 error messages there 😅
  11. Nicely done UEZ But it's false you can add shortcut to the Win11 taskbar You have just to create it this way Once done, right click on it, and pin to the taskbar 🫡 FileCreateShortcut( 'C:\Windows\explorer.exe', @DesktopDir & '\Desktop.lnk', @WindowsDir, @DesktopDir, '', '', '', 0, @SW_SHOWNORMAL)
  12. I use this UEZ function for set $Scaling and fonts are to a readable size #Include <GDIPlus.au3> $SCALING = _GDIPlus_GraphicsGetDPIRatio() Func _GDIPlus_GraphicsGetDPIRatio($iDPIDef = 96) Local $hGfx = _GDIPlus_GraphicsCreateFromHWND(0) If @error Then Return SetError(1, @extended, 0) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetDpiX", "handle", $hGfx, "float*", 0) If @error Then Return SetError(2, @extended, 0) Local $iDPI = $aResult[2] _GDIPlus_GraphicsDispose($hGfx) Local $aResults[2] = [$iDPIDef / $iDPI, $iDPI / $iDPIDef] Return $aResults EndFunc ;==>_GDIPlus_GraphicsGetDPIRatio
  13. There is a display problem
  14. Nice work, Thanks 😉
×
×
  • Create New...