Sign in to follow this  
Followers 0
Shock

[HELP] script.

20 posts in this topic

#1 ·  Posted (edited)

I need some help to write a script: probably i'll receive an answer in quite 2 seconds because it should be easy to compose and i'm only a n00b,..well..I'll describe it.

I need a script which can do the following things (in this order):

1) press "1" and wait "50secs" -this for 100times-, then wait "30secs"

2) press "/qtd", "pressINSERT" and wait "50secs"

3) shut down windows (so press "WINstartButton"+"UParrow"+"INSERT" ]

Could you please post your creation(s) in this pages like .txt files?

Thank you very much.

Uhh...Sorry for my english, i'm [iTA]... You can't imagine how difficult has been to write this post! :P

I hope you'll answer soon,

thanks again,

-shock-

Edited by Shock

Share this post


Link to post
Share on other sites



HotKeySet("^{F1}", "_Thingo")

While 1
    Sleep(5000)
WEnd

Func _Thingo()
For $i = 1 to 100
    Send("1")
    Sleep(50000)
Next
    Sleep(30000)
    Send("/qtd")
    Send("{INSERT}")
    Sleep(50000)
    Send("{LWIN}")
    Send("{UP}")
    Send("{ENTER}")
    Send("{TAB}")
    Send("{ENTER}")
EndFunc

Like this? When you press Ctrl + F2 itll do it


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I tried to copy your project in a .txt, then I modified the extension in .au3 and started it, but i doesn't work.

I edited it a bit in the end to reduce the risk of a "freeze" of windows when It should get shut down.

HotKeySet("^{F1}", "_Thingo")

While 1
    Sleep(5000)
WEnd

Func _Thingo()
For $i = 1 to 100
    Send("1")
    Sleep(50000)
Next
    Sleep(30000)
    Send("/qtd")
    Send("{INSERT}")
    Sleep(50000)
    Send("{LWIN}")
    Sleep(1000)
    Send("{UP}")
    Sleep(1000)
    Send("{ENTER}")

I tried it using WindowsWord, but "1" doesn't appear. Have you set up to press "F1" or...what? :P

:nuke:

Edited by Shock

Share this post


Link to post
Share on other sites

Well, It should do it when you press CTRL + F2, And, Dont know if you put this in but, remember to keep the

"EndFunc" at the bottom of the script


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Well, It should do it when you press CTRL + F2, And, Dont know if you put this in but, remember to keep the

"EndFunc" at the bottom of the script

I put "EndFunc" at the end of the script (you had already done it:))..

If I well understand you have set the script to start when i press CTRL + F2....can't we eliminate this input i should give him just setting a delay of 5secs to start after i've LeftClicked2times on his icon to open it? :)

Thank you soo much, you're an angel!

:nuke::P

Edited by Shock

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I put "EndFunc" at the end of the script (you had already done it:))..

If I well understand you have set the script to start when i press CTRL + F2....can't we eliminate this input i should give him just setting a delay of 5secs to start after i've LeftClicked2times on his icon to open it? :)

Thank you soo much, you're an angel!

:nuke::P

Well, The reason I asked about the end func thing, was because when you reposted the code, it was missing "EndFunc"

Sleep(10000)
For $i = 1 to 100
    Send("1")
    Sleep(50000)
Next
    Sleep(30000)
    Send("/qtd")
    Send("{INSERT}")
    Sleep(50000)
    Send("{LWIN}")
    Send("{UP}")
    Send("{ENTER}")
    Send("{TAB}")
    Send("{ENTER}")

Itll start 10 seconds after being ran.

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Well, The reason I asked about the end func thing, was because when you reposted the code, it was missing "EndFunc"

Touché. :P

Well, that's my last request, i promise: how can i set a random delay [from 0 to 1.5secs] between every "1button" press?

Thank you so much, really. :nuke:

Edited by Shock

Share this post


Link to post
Share on other sites

Touché. :P

Well, that's my last request, i promise: how can i set a random delay [from 0 to 1.1secs] between every "1button" press?

Thank you so much, really. :nuke:

Button1?

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Button1?

Err...[ Send("1") ] :P

Share this post


Link to post
Share on other sites

Between the send("1")? So, It will have the 50seconds, then an extra random sleep between0 to 1.1?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Between the send("1")? So, It will have the 50seconds, then an extra random sleep between0 to 1.1?

Yes, this is what I was trying to say. :P

Share this post


Link to post
Share on other sites

Sleep(10000)
For $i = 1 to 100
    $RandomSleep = Random(0, 1100)
    Send("1")
    Sleep($RandomSleep)
    Sleep(50000)
Next
    Sleep(30000)
    Send("/qtd")
    Send("{INSERT}")
    Sleep(50000)
    Send("{LWIN}")
    Send("{UP}")
    Send("{ENTER}")
    Send("{TAB}")
    Send("{ENTER}")


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

AzKay won.

Tyvm. :P

Share this post


Link to post
Share on other sites

AzKay won.

Tyvm. :P

Anytime :nuke:

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

What's the "ESC" button name? :lmao:

Send("{ESC}")
?

Share this post


Link to post
Share on other sites
Sleep(10000)
For $i = 1 to 100
    $RandomSleep = Random(0, 1100)
    Send("1")
    Sleep($RandomSleep)
    Sleep(50000)
Next
    Sleep(30000)
    Send("/qtd")
    Send("{INSERT}")
    Sleep(50000)
    Send("{LWIN}")
    Send("{UP}")
    Send("{ENTER}")
    Send("{TAB}")
    Send("{ENTER}")
oÝ÷ Ûú®¢×¢é]m¶­më"b~'i¸­jëh×6Sleep(10000)
For $i = 1 to 100
    Send("1")
    Sleep(50000)
Next
Sleep(30000)
Send("/qtd")
Send("{INSERT}")
Sleep(50000)
Shutdown(1)

[center]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.[/center]

Share this post


Link to post
Share on other sites

Nope. :lmao:

...Can you answer to my question, please? :ph34r:

If you search the helpfile, itll tell you what the "esc" code is. :geek:

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Nope. :ph34r:

...Can you answer to my question, please? :geek:

I wasn't answering your question but more so pointing out an obvious :lmao:

[center]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.[/center]

Share this post


Link to post
Share on other sites

Esc = the Escape button. It in the top-left most button on the keyboard. It might have a different abbreviation on an Italian keyboard :lmao:


- Dan [Website]

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