Jump to content

Recommended Posts

Posted (edited)

Hi everyone !

Well i have start recently to make me own autoit for some tools , i have look around and look example but.... well is little hard for me too understand all , so i'm gonna explain :D

I need script where when im start it i need press some key for Star/ Pause / End so i have try this

HotKeySet("{Home}","start")

Hotkeyset("{END}","stop")

Hotkeyset("{PAUSE}","Pause")

whit no succes :-/ sorry im realy new...

I have try found command for send KEY '' Example ''

Send("{Space}")

Sleep(500)

Dont work....

I'm realy lost so please can someone help me :-/

This is what i need , when i press Home script start '' send command '' TAB and after 1-2 sec send key F1 OR 1 and repeat it to start '' Tab-wait 1-2 sec- send key F1 or 1 '' repeat all '', stop only when i'm press END

So please can someone help me and explains little bit , my english is not verygood and little bit poor but im ready to try hard to understand !

Ty

Edited by Green
Posted

HotKeySet('{HOME}', 'Start')
HotKeySet('{END}', 'Stop')
HotKeySet('{PAUSE}', 'Pause')

Dim $fRun = True

While 1
    Sleep(40)
WEnd


Func Start()
    HotKeySet('{HOME}')
    $fRun = True
    
    While $fRun
        Send('{TAB}')
        Sleep(Random(1, 2, 1)*1000)
        Send('{F1}') ; Or 1
        Sleep(100)
    WEnd
    
    HotKeySet('{HOME}', 'Start')
EndFunc

Func Pause()
    $fRun = False
EndFunc
    
Func Stop()
    Exit
EndFunc

Take a look in the help file if something is not clear.

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
×
×
  • Create New...