Jump to content

Need a simple program


Recommended Posts

Is this the affect your looking for?

_MySend('a', 2000, 0)

Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5)
    $OptSKD = Opt('SendKeyDelay', $iSendDelay)
    Local $iSendTimer = TimerInit()
    While TimerDiff($iSendTimer) <= $iRepeatTime
        Send($sCharacters)
        Sleep(10)
    WEnd
    Opt('SendKeyDelay', $OptSKD)
EndFunc

Exactly!! Now is there a way to make it run everytime i push a certain key? (F1)

Link to comment
Share on other sites

Maybe you can use this:

HotKeySet ("{F1}","_MySend")
While 1
sleep (10)
Wend
;here you can add SmOke_N's code

Or you can use ini file to choose your key. I'm again not understand you....

:D

I can do signature me.

Link to comment
Share on other sites

Maybe you can use this:

HotKeySet ("{F1}","_MySend")
While 1
sleep (10)
Wend
;here you can add SmOke_N's code

Or you can use ini file to choose your key. I'm again not understand you....

:D

I want to run this

_MySend('a', 2000, 0)

Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5)
    $OptSKD = Opt('SendKeyDelay', $iSendDelay)
    Local $iSendTimer = TimerInit()
    While TimerDiff($iSendTimer) <= $iRepeatTime
        Send($sCharacters)
        Sleep(10)
    WEnd
    Opt('SendKeyDelay', $OptSKD)
EndFunc

Every time i push F1

Link to comment
Share on other sites

  • Moderators

I want to run this

_MySend('a', 2000, 0)

Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5)
    $OptSKD = Opt('SendKeyDelay', $iSendDelay)
    Local $iSendTimer = TimerInit()
    While TimerDiff($iSendTimer) <= $iRepeatTime
        Send($sCharacters)
        Sleep(10)
    WEnd
    Opt('SendKeyDelay', $OptSKD)
EndFunc

Every time i push F1

That function has parameters so you can't just use HotKeySet() on it directly
HotKeySet ("{F1}","_HotSend")
While 1
    Sleep(1000)
WEnd

Func _HotSend()
    _MySend('q', 2000, 0)
EndFunc

Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5)
    $OptSKD = Opt('SendKeyDelay', $iSendDelay)
    Local $iSendTimer = TimerInit()
    While TimerDiff($iSendTimer) <= $iRepeatTime
        Send($sCharacters)
        Sleep(10)
    WEnd
    Opt('SendKeyDelay', $OptSKD)
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thank you VERY VERY much, exactly what i was looking for

EDIT - how would i change it to send the numpad enter instead of Q?

I tried {NUMPADENTER} and NUMPADENTER but it says some kind of error

Edited by bobby177
Link to comment
Share on other sites

  • Moderators

Thank you VERY VERY much, exactly what i was looking for

EDIT - how would i change it to send the numpad enter instead of Q?

I tried {NUMPADENTER} and NUMPADENTER but it says some kind of error

Well how would you do it for Send()?

Send('{NUMPADENTER}')
?

So...

HotKeySet ("{F1}","_HotSend")
While 1
    Sleep(1000)
WEnd

Func _HotSend()
    _MySend('{NUMPADENTER}', 2000, 0)
EndFunc

Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5)
    $OptSKD = Opt('SendKeyDelay', $iSendDelay)
    Local $iSendTimer = TimerInit()
    While TimerDiff($iSendTimer) <= $iRepeatTime
        Send($sCharacters)
        Sleep(10)
    WEnd
    Opt('SendKeyDelay', $OptSKD)
EndFunc
Global $StaySearching
Makes sense?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Well how would you do it for Send()?

Send('{NUMPADENTER}')
?

So...

HotKeySet ("{F1}","_HotSend")
While 1
    Sleep(1000)
WEnd

Func _HotSend()
    _MySend('{NUMPADENTER}', 2000, 0)
EndFunc

Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5)
    $OptSKD = Opt('SendKeyDelay', $iSendDelay)
    Local $iSendTimer = TimerInit()
    While TimerDiff($iSendTimer) <= $iRepeatTime
        Send($sCharacters)
        Sleep(10)
    WEnd
    Opt('SendKeyDelay', $OptSKD)
EndFunc
Global $StaySearching
Makes sense?

Oh now I see how to do it, Thanks a bunch

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