Jump to content
Sign in to follow this  
Calicfer

help with a script please?

Recommended Posts

Calicfer

Hey there,

I'm trying to create a script to help me out a little, also to better help me understand the world of scripting... I'm kinda new.

This is what I've done so far, basically, I'm trying to get a loop within a loop. I thought it was all right, but when I go to open the script, it closes right away, any help would be nice. thank you very much!

AutoItSetOption("SendKeyDelay", "10") 
HotKeySet("{F1}", "Terminate")

HotKeySet("{HOME}", "S")

Func S()
    Dim $tot, $sm
    For $tot = 0 to 40
    Send("{'}Enter desired text here{Enter}", 0)
    Sleep(500)
        For $sm = 0 to 25
        Send("{'}Hello{Enter}", 0)
        Sleep(200)
        Send("{DOWN}{Enter}", 0)
        Sleep(30)
        Send("{Enter}", 0)
        Sleep(30)
        Next
    Send("{'}Enter desired text here{Enter}", 0)
    Sleep(500)
    Send("{'}Enter desired text here{Enter}", 0)
    Sleep(500)
    Send("{'}Enter desired text here{Enter}", 0)
    Sleep(500)
    Next
EndFunc

Func Terminate() 
Exit 0 
EndFunc

thanks again,

Cal

Edited by Calicfer

Share this post


Link to post
Share on other sites
Nahuel

Well.. you are not calling the functions you declared :P

Func.. EndFunc declares a function, it doesn't call it.

Add:

While 1
       Sleep(100)
Wend

after the hotkeysets.

Share this post


Link to post
Share on other sites
Calicfer

Wow, I completely missed that... :P

Thank you so much!

Cal.

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  

×