Windows 8 and 8.1 Forums


AHK Script to Click a Run As Admin program in Taskbar

  1. #1


    Posts : 2,130
    Windows 8.0 x64

    AHK Script to Click a Run As Admin program in Taskbar


    I have UAC set to not notify me on my W8 system. If I have a shortcut with Compatibility set to Run As Administrator and put it in the StartUp Folder, it will not be run. I really don't like to use Task Scheduler for anything. Since I do use AHK and it is a macro programming language I thought, Duh! Why not just make a program to click the Taskbar Icon of the shortcut?

    Actually if you have 3 or 4 programs you want to run in the System Tray and they need to be Run As Administrator you could add them. For it to work you need to use the WinSpy that comes with AHK to get the x y coords of the Taskbar Icon you want to click. Also you need to make sure its position will not change. You can adjust the Sleep delay inside the program so that all icons have finished loading to avoid the position shifting. Also you need to make sure your system comes up without any windows open that may block the mouse clicks.

    In this program I use a Message Box with a 10 second delay to give the option not to click the Taskbar Icon. Edit this program to your needs and put a shortcut to it in the StartUp Folder to click start your programs. You will need to install the AutoHotkey suite to compile it to exe.

    In the code below I use it to click the Taskbar icon for ReRun.exe. Change the MsgBox text to suit your needs. Also it helps if you always run with the same screen resolution.

    Code:
    SendMode Input
    CoordMode,Mouse,Screen
    Sleep 30000  ; 30 second delay to let icons load
    MsgBox, 4388, ClickReRun, Click on ReRun in Taskbar to run it?, 10
    IfMsgBox No
        Exit
    Click,356,751
    Exit
    Last edited by MilesAhead; 27 Feb 2015 at 17:31.

      My System SpecsSystem Spec

AHK Script to Click a Run As Admin program in Taskbar
Related Threads
Hey guys. just finished formating my computer (using the built in windows 8 feature). once it was up and running i uninstalled all the built in stuff lenovo brings with the computer using revo uninstaller. in the procces i also removed all registry and files those programs left.. but now theres...
Hello, I'm looking for a command prompt script or other file to be able to manually enter a time to run a file. The idea I'm looking for is to execute the script or other file, enter a time into a pop-up prompt (i.e. 9:24) and have the computer execute the file at that time. I'm looking...
http://puu.sh/cMapi/41f3e0deff.png http://puu.sh/cManO/effacca2ff.png I don't know what they are called and the title for the thread was limited so sorry for the broken English but after windows 8 forced the windows 8.1 update, all text in firefox went weirdly small but that isn't as...
How to Enable or Disable Taskbar Last Active Click in Windows 7 and Windows 8 By default, when you click/tap on taskbar button for a program that has multiple tabs (ex: IE) or windows open in Windows 7 and 8, you will see thumbnail previews of them to then be able to select one to make active....
Ok so, today I tried to edit my hosts file but when I tried to save it premission was denied. I had to open notepad as admin and only then was able to save it. Is there a way to not have to do that ? if I don't care much about security ? I have an anti-virus and I'm the only user of my PC, so as...
I have Windows 8.1 and on my desktop are several PNG files and shortcuts. When I double click on any of them the program that opens is Directory Opus (I use this instead of Windows Explorer). I checked the defaults and it is NOT Directory Opus. Can anyone help me or point me in the right...
Hello Is it still possible to use the VB script in Windows 8 that many of us used to pin programs and shortcuts in Windows 7. I just have a couple items I would like to have pinned on users desktop taskbars and the script below worked perfect in Windows 7. I tried it today and nothing gets...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook