Jump to content

emergency button (mouse)


Vegar
 Share

Recommended Posts

Hello..

i'v made a "emergency button" script... that works like this: as soon as the teacher walk's in the door i just need to push "f11" to open the school web page, so the teacher dosent get mad for me playing on the internett...

the script looks like this

HotKeySet ("{f11}" , "Fronter")

While 1

Sleep(1)

WEnd

Func Fronter ()

ShellExecute ("https://fronter.com/tromsvgs")

EndFunc

and it works fine, but it is a little slow to have to reech for the f11 button way on the otherside of the keyboard..

so i woundered.. if it was possible if i clickt both of the mouse'buttons at the same time, and the it opens the school webpage automaticly..

thnx for all help :P

Link to comment
Share on other sites

#Include <Misc.au3>
$Dll = DllOpen("User32.dll")

While 1
If _IsPressed(01, $Dll) And _IsPressed(02, $Dll) Then Fronter()
Sleep(20)
WEnd

Func Fronter ()
ShellExecute ("https://fronter.com/tromsvgs")
EndFunc

Not tested, should work.

EDIT: Tested, does work :P

Edited by TehWhale
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...