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.
Good day guys:D
HI. I was needing to add a program to Tarkbar(an easy way without using objectcreateinterface ) so I found this. So then I deduced how to add to the StartMenu while I see the shell32 in hex editor search for taskbarunpin|taskbarpin string. I found another two interesting string (startpin|startunpin) So I try out and they work too but to add to StartMenu.
This is not an official way to do this, however it works.
$sFileLnk parameter must be Link(.lnk) to our program.
;~ Success: True. ;~ Failure: False. Func DeleteFromTaskBar($sFileLnk) Return _WinAPI_ShellExecute($sFileLnk,"","", "taskbarunpin") EndFunc Func AddToTaskBar($sFileLnk) Return _WinAPI_ShellExecute($sFileLnk,"","", "taskbarpin") EndFunc Func AddToStartMenu($sFileLnk) Return _WinAPI_ShellExecute($sFileLnk,"","", "startpin") EndFunc Func DeleteFromStartMenu($sFileLnk) Return _WinAPI_ShellExecute($sFileLnk,"","", "startunpin") EndFunc
I wrote an app a few years ago and have revisited it to improve it, one thing I can't sort it to not show it on the taskbar, but show it in the system tray, the point of the app is to allow users easy access to info that tech support may ask, like username, pc name & IP address.
I've searched the forums but not found a answer, can anyone point me in the right direction.
Thanks in advance#
Hi all, I need to get the list of windows which are resting in taskar. That means, windows which i can toggle through ALT TAB. I use "WinList" function. But it gives me all the windows. Then i tried to filter it like this; Local $lst = WinList() Local $Row = 0 For $i = 1 To $lst If $lst[$i] = "" And Not BitAND(WinGetState($lst[$i]), 1) Then _ArrayDelete($lst,$Row) EndIf $Row +=1 Next _ArrayDisplay($lst) But this code doesn't delete the 2nd column. I have read the help file and saw an example which deletes an entire row from a 2 dimensional array. I have used the same method but please look this image. This is what i have got.
I am trying to find a way to detect if two applications are running (and visible in the GUI). One sits in the system tray (which I've got sorted) but another launches (so is easily visible as a running process) but seems to delay until showing in the GUI but the "WinExists" command seems to pick it up a few seconds before it's actually visible!
The bit of script that detects the system tray app is modified from somewhere on these forums that finds the text labels from all of the tray icons...
Func Get_Systray_IconText($sToolTipTitle) Local $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) Local $iSystray_ButtonNumber For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1 Local $sText = _GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber) If StringInStr($sText, $sToolTipTitle) = 1 Then Return $sText EndIf Next Return SetError(1, 0, "") EndFunc So I was hoping that there was something nearly identical that detects icons in the Taskbar in a near-identical way as ProcessExists and WinExists commands seem to detect it too early and I really need to detect the time that the window is visible to the user which seems to be when it spawns it's taskbar icon.