Jump to content

Right Click - Unpin Taskbar


Recommended Posts

Hello everybody :)

I need some help.

I want to field a script on 200 laptops, and i really need that the script point on "unpin to task bar".

b.png.af6b01adbef33368d58acf9da06eace6.png

The mouse can click only on this function ?

I try an alternative method using 9X "up" on keyboard for reach "unpin to taskbar", but this function is not on the same place on all laptops.

How can i do this ?

Thank for your answers :)

Link to comment
Share on other sites

I notice when using shift-click on a file, I get a keyboard shortcut. Can press K to un-pin on my system; even if I didn't use shift-click to open the menu.

dsa.jpg.fa0103cf624dd3341c18fe27d5059e04.jpg

Edited by Inpho
Link to comment
Share on other sites

It works, thanks. But now i want to simulate a leftclick + MAJ for access to unpin ( screenshot in attachment )

How can i do for not use"Mouseclick" ? I just want to use the Keyboard

 

$sUserName = @UserName

If  FileExists("C:\Users\" & $sUserName & "\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\excel.lnk")Then
   Send("#r")
   sleep(1000)
   Send("%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar")
   Send("{Enter}")
   sleep(2000)
   send("^f")
   sleep(2000)
   send("Excel")
   sleep(1000)
   send("{TAB}")
   sleep(1000)
   send("{TAB}")
   sleep(1000)
   send("{down}")
   sleep(1000)
   ;Here i want to left click and MAJ for acess to 

mou
   ;sleep(1000)
   ;Send("{ENTER}")
   ;sleep(1000)
   WinKill("Excel - Résultats de la recherche dans TaskBar")
EndIf
 

RIGHT CLICK.png

Link to comment
Share on other sites

It doesn't works for my laptops. If i press "d" and "d", it works on my laptop, but on my friend's laptop it doesn't works.

 

It is not possible to access to unpin (top-left corner) with keyboard ? ^^

882400780_RIGHTCLICK.png.940dcfa8c2184006117299c7a3f4d982.png

Link to comment
Share on other sites

#include <WinAPIShellEx.au3>
$rc = _WinAPI_ShellOpenFolderAndSelectItems("C:\Users\" & @UserName & "\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Internet Explorer.lnk")
If @error Then Exit MsgBox(64+262144, Default, "Internet Explorer.lnk not found",0)
MouseMove(-1, -1, 0)  ; move mouse outside of window. Otherwise item under mousecursor will be selected and deleted.

;~ Long sleeps To see what happens

Sleep(1000)
Send("{ALT}")
Sleep(1000)
Send("R")
Sleep(1000)
Send("{ALT}")
Sleep(1000)
Send("{ALT}")
Sleep(1000)
Send("J")
Sleep(1000)
Send("A")
Sleep(1000)
Send("B")
Sleep(1000)
Send("{F5}")

 

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

Why in the world are you trying to do this with Sends and mouse clicks? Why not just find out what shortcuts are in the folder and delete the ones you don't want?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

@Exit My question wasn't aimed at you, sorry if it sounded that way.

I was asking the OP why he would use such an inefficient and error prone way to do something so simple as to boggle the mind why you'd want to do it with the keyboard.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

15 hours ago, BrewManNH said:

Why in the world are you trying to do this with Sends and mouse clicks? Why not just find out what shortcuts are in the folder and delete the ones you don't want?

Hello,

Because Microsoft's shortcuts are differents to unpin to the other. 

And i do unpin Excel, Word, Outlook on approximatly 2500 laptops

 

Link to comment
Share on other sites

15 hours ago, Exit said:
#include <WinAPIShellEx.au3>
$rc = _WinAPI_ShellOpenFolderAndSelectItems("C:\Users\" & @UserName & "\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Internet Explorer.lnk")
If @error Then Exit MsgBox(64+262144, Default, "Internet Explorer.lnk not found",0)
MouseMove(-1, -1, 0)  ; move mouse outside of window. Otherwise item under mousecursor will be selected and deleted.

;~ Long sleeps To see what happens

Sleep(1000)
Send("{ALT}")
Sleep(1000)
Send("R")
Sleep(1000)
Send("{ALT}")
Sleep(1000)
Send("{ALT}")
Sleep(1000)
Send("J")
Sleep(1000)
Send("A")
Sleep(1000)
Send("B")
Sleep(1000)
Send("{F5}")

 

Thanks for the script, it runs :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...