Jump to content

Question concerning SendKeyDownDelay


Mike  :)
 Share

Recommended Posts

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: )

Link to comment
Share on other sites

  • Developers

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

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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?

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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!

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