Jump to content
Sign in to follow this  
lilandywandy

question from a nub >.<

Recommended Posts

lilandywandy

HotKeySet("{PAUSE}", "mExit")

****************

WEnd

Func mExit()

Exit

EndFunc

what should i put in the **** area so that program simulates the F1 button being holded down until i press pause?

Share this post


Link to post
Share on other sites
CyberSlug

Well, according to the remarks section in the Send docs you use the down option:

HotKeySet("{PAUSE}", "Quit")

Send("{F1 down}")

While 1
    sleep(10)
WEnd

Func Quit()
    Send("{F1 up}");probably a good idea to release key!
    Exit
EndFunc

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites
Blue_Drache

HotKeySet("{PAUSE}", "mExit")

****************

WEnd

Func mExit()

Exit

EndFunc

what should i put in the **** area so that program simulates the F1 button being holded down until i press pause?

<{POST_SNAPBACK}>

Ok,

$paused = 1
HotKeySet("{PAUSE}", "mPause")
HotKeySet("{ESC}", "MyExit")

While 1 
   Sleep(10)
   If $paused = 0 then
      Send("{F1 down}")
      While $paused = 0 
         Sleep(10)
      WEnd
      Send("{F1 up}")
   EndIf
WEnd

Func mPause(ByRef $paused)
   If $paused = 1 then $paused = 0
   If $paused = 0 then $paused = 1
EndFunc

Func MyExit()
   Exit
EndFunc

Try that.

Bleah, CS beat me. :) Oh well. Mine's a toggle function....I find those more useful.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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.