Danyfirex

Add Program to TarkBar and StartMenu

4 posts in this topic

HI. I was needing to add a program to Tarkbar(an easy way without using objectcreateinterface :wub:)   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

 

Saludos

1 person likes this

Share this post


Link to post
Share on other sites



You can use ShellExecute for avoid to use WinAPIShellEx.au3 as done here.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

You can use ShellExecute for avoid to use WinAPIShellEx.au3 as done here.

I know. But if you pass a file path to ShellExecute instead of a .lnk will show an MessageBox.

 

Saludos

Share this post


Link to post
Share on other sites

I know. But if you pass a file path to ShellExecute instead of a .lnk will show an MessageBox.

 

Saludos

In that case why do you specify : "$sFileLnk parameter must be Link(.lnk) to our program.;)

1 person likes this

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
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

  • Similar Content

    • FrancescoDiMuro
      By FrancescoDiMuro
      Good morning
      I'm working on a little project, and I was wondering if there's a way ( sure there is ) to insert data to a ComboBox control everytime the user insert some text in the ComboBox which is not in the ComboBox data. I'll try to explain with an example:
      - Form with some data ( ComboBox is empty );
      - User prompt something in the ComboBox: if what the user prompts is not in the ComboBox values ( at the moment empty ), then insert the value in the ComboBox values, in order to have, next time the user prompts the form, the value that he entered.
      More pratical example:
      - First call of the form, ComboBox empty;
      - I prompt "A" in the ComboBox;
      - Second call, in the ComboBox I should see "A";
      - I prompt "B" in the ComboBox;
      - Third call, I should see "A"
                                                 "B";
      - And so on...
      Everytime the form is called, I re-create it, so I think I can't use _GUICtrlComboBox_AddStrings().
      I tried with
      Global $strCboStrings = "" ; When the user prompt the form, the code below is executed. ; I.E. : User prompt "A", after the if I should have "A"; ; In the second call, If I write "B", I should see "A" ; "B"; ; If I write "A" again, in the combobox values should not be any changes. If Not StringInStr($strCboStrings, GUICtrlRead($cboVoiceCategory)) <> 0 Then $strCboStrings &= $strCboStrings & "|" & GUICtrlRead($cboVoiceCategory) EndIf Any suggestion?
      Thanks
    • nacerbaaziz
      By nacerbaaziz
      Hi guys
      I have an inquiry please
      I want an example of how to add an icon file to the compiled autoit file and how to use it in GUICtrlCreateIcon
      Preferably in a separate list within the resourceFor example myIcons
      I hope my request is clear and I hope you will help me solve this problem
      Because I found an example in the help files but I did not understand the method well
    • tommytx
      By tommytx
      I have been experiment for months trying to find a way to be able to like script the find button to find some text and click on that text or something nearby.
      Is this possible?  When the search hilites the text of course this is not where the cursor is so you cannot command a click at that point.   I can get the coordinates of any point and go there and click... but I cannot find the coordinates of a piece of text i have searched up and click that..
      Thanks
       
    • david1337
      By david1337
      Hey guys
      I need help to get further with this script
       
      Test.txt contains lines like this:
      _______________
      Line1
      Line2
      Line3
      _______________
      I have managed to view the content of a txt file in the left side of a GUI like this:
      #Include <File.au3> #include <GUIConstants.au3> Global $file = FileRead("Test.txt") GUICreate("", 800, 800, 192, 124) $control = GUICtrlCreateEdit($file, 0, 0, 400, 800, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_READONLY) GUICtrlSetFont(-1, 14, 400, 0, "@Arial Unicode MS") GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetState($control, $GUI_FOCUS) ;Makes sure that text is not highlighted by default GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd  
      Okay so is it possible to make each line become a clickable item?
      Say I want to delete Line2, then I highlight it and click a "remove" button.
      Also an "add" button would be needed to add new lines
      On Case $GUI_EVENT_CLOSE the changes should be saved to Test.txt (Or with a save button)
       
      Is this possible?
      I hope you can help me :-)

       
    • Satoh
      By Satoh
      Hi.
      I am writing a program that I want to use it to earn some money, so I have an idea that insert the license checking into it. But I haven't had a code yet.
      This is my idea:
      -Put my licenses onto my host with their limit days.
      -Every day the customers run the program with the license and the program will show costumers how many days left...
      Can you give me an example for that program? Thanks a lot if you can help me!