Jump to content
Sign in to follow this  
Vegar

emergency button (mouse)

Recommended Posts

Vegar

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

Share this post


Link to post
Share on other sites
TehWhale

#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

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.