Sign in to follow this  
Followers 0
Mike  :)

Question concerning SendKeyDownDelay

6 posts in this topic

Hello!

I was wondering if there's any method to apply Opt('SendKeyDownDelay') to some of sent keys and to some not? Well, of course I could do f.ex.

Opt('SendKeyDownDelay',1)
Send ('2')
Opt('SendKeyDownDelay', 100)
Send('{SPACE}')

But I think it's too noobie method... though I have no ideas :P

Is there anything I can do like

$var = Opt('SendKeyDownDelay',1)
$var2 = Opt('SendKeyDownDelay', 100)
Send('2',$var)
Send('{SPACE}',$var2)

?? ( I know it's a bad code, I was just giving example to make my idea easier to understand :lmao: )

Share this post


Link to post
Share on other sites



SendStr('2',10)
Sendstr('{SPACE}',100)

Func Sendstr($istr,$idelay)
    Opt('SendKeyDownDelay',$idelay)
    Send ($istr)
EndFunc


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thanks a lot JdeB, I'd never write such code, although it's not what I actually meant.

I'm going to run my script on old laptop (Dell, 400MhZ PII) with NO graphics accelerator, with turned on game that requires it, so... I need it to save as much CPU as possible... what you just written is great, but it still does the SendKeyDownDelay option, I don't know if it's the best solution. Well, still I might be wrong, maybe changing options doesn't affect the CPU at all?

Share this post


Link to post
Share on other sites

Changing an Opt() will have minimal CPU stress, and also it's the only way to do what you need.

Share this post


Link to post
Share on other sites

Thanks a lot JdeB, I'd never write such code, although it's not what I actually meant.

I'm going to run my script on old laptop (Dell, 400MhZ PII) with NO graphics accelerator, with turned on game that requires it, so... I need it to save as much CPU as possible... what you just written is great, but it still does the SendKeyDownDelay option, I don't know if it's the best solution. Well, still I might be wrong, maybe changing options doesn't affect the CPU at all?

Stop assuming and just try to see if it works for you.. :P


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Changing an Opt() will have minimal CPU stress, and also it's the only way to do what you need.

Well, all I can say is :P

Stop assuming and just try to see if it works for you.. :lmao:

I'll surelly do this, as soon as i finish it :( Thanks for help again!

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  
Followers 0