dimastky Posted May 16, 2019 Share Posted May 16, 2019 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". 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 More sharing options...
Inpho Posted May 16, 2019 Share Posted May 16, 2019 %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar Link to comment Share on other sites More sharing options...
dimastky Posted May 16, 2019 Author Share Posted May 16, 2019 Thanks, but i already have the path. I just want the command for click on "Unpin to the taskbar" Link to comment Share on other sites More sharing options...
Inpho Posted May 16, 2019 Share Posted May 16, 2019 (edited) 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. Edited May 16, 2019 by Inpho Link to comment Share on other sites More sharing options...
dimastky Posted May 16, 2019 Author Share Posted May 16, 2019 (edited) Really thank, it works Edited May 16, 2019 by dimastky Link to comment Share on other sites More sharing options...
dimastky Posted May 16, 2019 Author Share Posted May 16, 2019 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 Link to comment Share on other sites More sharing options...
Inpho Posted May 16, 2019 Share Posted May 16, 2019 Easier way #include <WinAPIShellEx.au3> _WinAPI_ShellOpenFolderAndSelectItems("C:\Users\" & @UserName & "\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Internet Explorer.lnk") Sleep(250) Send("{APPSKEY}") Sleep(50) Send("k") Send("{F5}") Link to comment Share on other sites More sharing options...
dimastky Posted May 16, 2019 Author Share Posted May 16, 2019 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 ? ^^ Link to comment Share on other sites More sharing options...
Inpho Posted May 16, 2019 Share Posted May 16, 2019 I've yet to be blessed with the learning of Win10. Found this: dimastky 1 Link to comment Share on other sites More sharing options...
Exit Posted May 16, 2019 Share Posted May 16, 2019 #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 More sharing options...
BrewManNH Posted May 16, 2019 Share Posted May 16, 2019 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? FrancescoDiMuro 1 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 GudeHow 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 More sharing options...
Exit Posted May 16, 2019 Share Posted May 16, 2019 6 hours ago, dimastky said: It is not possible to access to unpin (top-left corner) with keyboard ? @BrewManNH This was the original poster's question and I answered it. I would solve this task with UIA. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
BrewManNH Posted May 16, 2019 Share Posted May 16, 2019 @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 GudeHow 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 More sharing options...
dimastky Posted May 17, 2019 Author Share Posted May 17, 2019 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 More sharing options...
dimastky Posted May 17, 2019 Author Share Posted May 17, 2019 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 More sharing options...
FrancescoDiMuro Posted May 17, 2019 Share Posted May 17, 2019 5 minutes ago, dimastky said: Because Microsoft's shortcuts are differents to unpin to the other. It would be always a thousand times better to use @BrewManNH solution. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now