Jump to content

[HELP] script.


Shock
 Share

Recommended Posts

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
Link to comment
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- #
Link to comment
Share on other sites

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

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
Link to comment
Share on other sites

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- #
Link to comment
Share on other sites

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
Link to comment
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- #
Link to comment
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- #
Link to comment
Share on other sites

  • 4 weeks later...
  • Moderators
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)

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

  • Moderators

Nope. :ph34r:

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

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

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

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