Jump to content

Sendkeydelay


Recommended Posts

i need my script to send e.g the button 3 at the start of my script and every 432 seconds(432000) while the rest of my script is running

ive seen in the help files Opt("Sendkeydelay" .....

what do i need to put for it to work?

Thanks In Advance

Link to comment
Share on other sites

so would AdlibEnable ( "Send("3")" , 4320000)

send the button 3 every 432 seconds?

No not in that form, if all you are trying to to is send 3 then wait 432 seconds and send 3 again you could do a simple:

Send("{3}")
Sleep(432000)

Are you placing it in another script? How are you going to use it? This above script is very simple and could be done a much better way if you were implementing it into another script.

Edit: Yeah, apparently I missed half of what you said in your OP.

Edited by schilbiz
Link to comment
Share on other sites

No not in that form, if all you are trying to to is send 3 then wait 432 seconds and send 3 again you could do a simple:

Send("{3}")
Sleep(432000)

Are you placing it in another script? How are you going to use it? This above script is very simple and could be done a much better way if you were implementing it into another script.

Edit: Yeah, apparently I missed half of what you said in your OP.

i tried doing that it didnt work

i need my script to press certian keystrokes and repeat after x seconds

and the may have to be pressed halfway through the main part of my script

i know it is do-able i just dont know how :)

Link to comment
Share on other sites

i tried doing that it didnt work

i need my script to press certian keystrokes and repeat after x seconds

and the may have to be pressed halfway through the main part of my script

i know it is do-able i just dont know how :)

Yea if it is a part of a larger script you won't want to use what I showed you. I would post your script and mention what you want to happen exactly. What you are asking is doable, its just hard to know what the best way to do it would be without have some code to work with.

You would have to have a While statement in there to keep it looping, I assumed you knew/had one implemented since you have some other code you are working with.

Edited by schilbiz
Link to comment
Share on other sites

This is more of what you are looking for, and along the lines of what danwilli originally suggested.

AdlibEnable( "runevery432secs", 7.2 * 60 * 1000 ) ; 7.2 x 60(1min) x 1000(1sec) = 432 seconds 

While 1 ; this will continuously loop While 1 is 1, which will never end if you do not set a variable
    Sleep(100)
    ; what you want to loop, -- rest of code here
WEnd

Func runevery432secs()
    send(3) ; Put  whatever it is you want to run every 432 seconds here
    MsgBox(0, "Trigger", "It has been 432 seconds" )
EndFunc
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...