Jump to content

Couple relatively simple questions


DWad
 Share

Recommended Posts

Ok so first off, I'm trying to write a loop that will run for x seconds. I have unworking code that repeats the script indefinitely..

Could someone post a sample of how to repeat for x milliseconds? I know that I should use timeInit and timerDiff but I haven't gotten anywhere with them, I guess I just don't understand exactly how they work (yes I read the helpfile :))

Also, I have a GUI with a button to set a hotkey to PgDn.

GUICtrlSetOnEvent($bindTo1Button, "bind1")

and

Func bind1()
        HotKeySet ("{pgDn}", "sendWhat")
EndFunc

This part works fine. However, I have 2 other function set up the same way replacing pgDn with LSHIFT or LCTRL and when I try to use them the same way nothing happens. Any idea here or do I need to supply some more info?

Thanks guys.

Link to comment
Share on other sites

Ah ok, I had an extra variable for the TimeDiff I think, I'll try that out, thanks Danwilli.

As for question 2, the functions themselves are working fine, the only thing I did was change PgDn to LSHIFT or LCTRL to have it set to a different hotkey. I'll post up the code later, probably an id-10-T error in there somewhere.

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...