AutoHotkey Community

It is currently May 27th, 2012, 1:31 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: November 21st, 2009, 2:34 am 
Offline

Joined: July 20th, 2009, 11:27 pm
Posts: 40
this return the ability to hit ctrl+shift+enter and it will run the selected file as an admin (exes only)

works in start menu, explorer and desktop

requirements

Quote:



heres the code

Code:
$^+Enter::
{
   ifwinactive, ahk_class DV2ControlHost
      {
         sleep 400
         Clipboard:=""
         sleep 400
         send {appskey}{down}{down}{down}{enter}
         clipwait
         run "C:\Program Files\hstart\hstart.exe" /runas /shell "%clipboard%" ;runs selected file as admin
         return
      }
   else ifwinactive, ahk_class Progman
      {
         Clipboard:=""
         Send ^c
         ClipWait,1
         Clipboard:=Clipboard
         run "C:\Program Files\hstart\hstart.exe" /runas /shell "%Clipboard%" ;runs the selected file as admin
         return
      }
   else ifwinactive, ahk_class CabinetWClass
      {
         Clipboard:=""
         Send ^c
         ClipWait,1
         Clipboard:=Clipboard
         run "C:\Program Files\hstart\hstart.exe" /runas /shell "%Clipboard%"
         return
      }
   else
      {
         ;msgbox, Not active ;enable this to test
         send ^+{enter}
      }
}
return


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group