Jump to content

littleboy62

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

littleboy62's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi. 😃 I would like to reopen the subject. First of all, I didn't succeed with controldisable.... So I asked myself: and if I did an action on a button ? It could be good for me... No need for "controldisable" if it works. But... Even with the correct coordinates (x,y of au3info), "controlclick" does not work. But, with mouseclick, it works, if window doesn't move. ControlClick seems to me more "clean", snif...... Here's my code, what do you think? ShellExecute("desk.cpl") Local $HWND = WinWait("Paramètres", "") WinActivate($HWND) Sleep(2000) ;~ ControlClick($hWnd, "", "","left",1,380,420) MouseClick("left",870, 600,3) I have the impression that there is a restriction on the window, because on a window of another program, everything works. Thank you for helping me. Sincerely, Thomas.
  2. Thank you for your answers. I had a hard time finding all CLASSNN of window. I found four, only one of which was functional. Here is the code: ShellExecute("desk.cpl") $hWnd = WinWait("Paramètres") ControlDisable($hWnd, "", "ApplicationFrameTitleBarWindow1") ;~ ControlDisable($hWnd, "", "Windows.UI.Core.CoreWindow1") ;~ ControlDisable($hWnd, "", "ApplicationFrameTitleBarWindow2") ;~ ControlDisable($hWnd, "", "ApplicationFrameInputSinkWindow1") ;~ Windows.UI.Core.CoreWindow1 ;~ ApplicationFrameTitleBarWindow1 ;~ ApplicationFrameTitleBarWindow2 ;~ ApplicationFrameInputSinkWindow1 In short, it disables the menu bar (reduce, exit, etc.). But I haven't found anything for the drop-down menu yet. I'm continuing my research. If you have any ideas, I'll take them. Yours sincerely.
  3. Hello. For a project of a tool, I have to launch a program. This one: Display Properties control (run desk.cpl) I have to resize it, so we can see what's necessary. I'm getting there. The problem is that there is a drop-down menu: so I want to disable it. How to do this? I already did a test with the notepad. By deactivating the "close" button. Here is the code: Run("Notepad.exe") WinWait("[CLASS:Notepad]") $Hwnd = WinGetHandle("[CLASS:Notepad]") $menu = DllCall("user32.dll","hwnd","GetSystemMenu","hwnd", $Hwnd, "int",0) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", 0xF060, "int", 0x0);SC_CLOSE MsgBox(0,'',1) $menu = DllCall("user32.dll","hwnd","GetSystemMenu","hwnd", $Hwnd, "int",1) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", 0xF060, "int", 0x0);SC_CLOSE I would like to do the same, but with the drop-down menu (with DllCall). Is it possible to disable / block (or other) the drop-down menu of a program? Thank you for your answers. Sincerely, Thomas.
  4. Hello everyone. First, sorry for mistakes, I'm french. ^^ ===== I've tried (and I try always) to pin a shortcut (lnk) to startmenu (on Windows 10). Look this subject (in forum FR autoit) : http://www.autoitscript.fr/forum/viewtopic.php?f=21&t=12031 The script I wrote, doesn't work, despithe the display of "Épingler à l'écran de démarrage" by a consolewrite. This is the script : #RequireAdmin $path = @DesktopDir & "\vlc.lnk" PinToTaskBand($path) Func PinToTaskBand($path) $objShell = ObjCreate("shell.application") $objFSO = ObjCreate("Scripting.FileSystemObject") $strFolder = $objFSO.GetParentFolderName($path) $strFile = $objFSO.GetFileName($path) $objFolder = $objShell.Namespace($strFolder) $objFolderItem = $objFolder.ParseName($strFile) $colVerbs = $objFolderItem.Verbs For $itemVerb In $objFolderItem.Verbs ;~ MsgBox(0,"", $itemVerb.name) $var = StringReplace($itemVerb.name, "&", "") ConsoleWrite($var & " | ") If $var = "Pin to startmenu" Or $var="Épingler à l’écran de démarrage" Then MsgBox(0, "", 1) $itemVerb.DoIt EndIf Next EndFunc ;==>PinToTaskBand Func UnpinToTaskBand($path) $objShell = ObjCreate("shell.application") $objFSO = ObjCreate("Scripting.FileSystemObject") $strFolder = $objFSO.GetParentFolderName($path) $strFile = $objFSO.GetFileName($path) $objFolder = $objShell.Namespace($strFolder) $objFolderItem = $objFolder.ParseName($strFile) $colVerbs = $objFolderItem.Verbs For $itemVerb In $objFolderItem.Verbs ConsoleWrite($itemVerb.name & " | ") If StringReplace($itemVerb.name, "&", "") == "Unpin from Taskbar" Or StringReplace($itemVerb.name, "&", "") == "Détacher de la barre des tâches" Then $itemVerb.DoIt Next EndFunc ;==>UnpinToTaskBand If StringInStr($var, "Pin to startmenu") Or StringInStr($var, "Épingler à l’écran de démarrage") Then MsgBox(0, "", 1) $itemVerb.DoIt EndIf It shows 1 (msgbox) correctly. But $itemVerb.DoIt doesn't work. Someone would he know how to do ? If i do mistakes, where are it ? Please. Else, is there another way to pin a shortcut to startmenu (on windows 10)? Thanks by advance. Cheers. Good day guys:D
  5. Hi everyone. Transparency ? I write a script who move and resize GUI, with transparency. Look. #include <File.au3> #include <GDIPlus.au3> #include <GIFAnimation.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <SendMessage.au3> #include <Misc.au3> Global $DisplayImage, $pos, $Larg, $Haut Const $SC_DRAGMOVE1 = 0xF012 #Region ### START Koda GUI section ### Form= Global $ViewPic = GUICreate("Form1", 50, 50, 192, 124, $WS_POPUP, $WS_EX_ACCEPTFILES) GUICtrlCreateGraphic(0, 0, 50, 50) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUICtrlSetBkColor(-1, 0x0A000) GUICtrlSetColor(-1, 0) $pos = WinGetPos($ViewPic) $Larg = $pos[2] $Haut = $pos[3] ;~ $posY = $pos[1] ;~ MsgBox(0,"",$pos) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_PRIMARYDOWN _SendMessage($ViewPic, $WM_SYSCOMMAND, $SC_DRAGMOVE1, 0) Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_DROPPED $FichierImage = @GUI_DragFile _GDIPlus_Startup() $tImg = _GDIPlus_ImageLoadFromFile($FichierImage) $Hauteur = _GDIPlus_ImageGetHeight($tImg) $Largeur = _GDIPlus_ImageGetWidth($tImg) _GDIPlus_ImageDispose($tImg) _GDIPlus_Shutdown() If $Largeur > $Hauteur And $Largeur > 640 Then $Largeur = 640 $Hauteur = 480 ElseIf $Largeur < $Hauteur And $Hauteur > 640 Then $Largeur = 480 $Hauteur = 640 EndIf _PicGui($FichierImage, $Hauteur, $Largeur) EndSwitch WEnd Func _PicGui($FichierImage, $Hauteur, $Largeur) Const $SC_DRAGMOVE2 = 0xF012 Local $sDrive, $sDir, $sFileName, $sExtension _PathSplit(@ScriptFullPath, $sDrive, $sDir, $sFileName, $sExtension) Global $PicGui = GUICreate($sFileName & $sExtension, $Largeur, $Hauteur, 010, 50, BitOR($WS_POPUPWINDOW, $WS_THICKFRAME), $WS_EX_LAYERED) Global $DisplayImage = _GUICtrlCreateGIF($FichierImage, "", 0, 0, $Largeur, $Hauteur) GUICtrlSetResizing($DisplayImage, $GUI_DOCKBORDERS) GUISetBkColor(0xABCDEF, $PicGui) _WinAPI_SetLayeredWindowAttributes($PicGui, 0xABCDEF, 250) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_PRIMARYDOWN _SendMessage($PicGui, $WM_SYSCOMMAND, $SC_DRAGMOVE2, 0) Case $GUI_EVENT_CLOSE GUIDelete($PicGui) ExitLoop Case $GUI_EVENT_RESIZED $newpos = WinGetPos($PicGui) $NewLargeur = $newpos[2] $NewHauteur = $newpos[3] If $Larg <> $NewLargeur Or $Haut <> $NewHauteur Then _GIF_DeleteGIF($DisplayImage) $DisplayImage = _GUICtrlCreateGIF($FichierImage, "", 0, 0, $NewLargeur, $NewHauteur) EndIf EndSwitch WEnd EndFunc ;==>_PicGui If this code can help, i'll be happy. Cheers.
×
×
  • Create New...