Jump to content

Friendly newbie help please?


Recommended Posts

I am trying very hard to do something that really ought to be so easy.

I managed to get a small bit of help last time and, well...

perhaps it was my fault for not stating what I wanted and why....

perhaps it was my fault for not saying please and thank you...

perhaps it was my fault for not giving enough structure to what I was asking for...

perhaps it was my fault for not providing my best guess to a solution so far...

perhaps mahy things including that I was treated a little poorly? maybe a little?

Anyways, I want to make a simple program that will simply wait for the spacebar to be hit

and upon spacebar pressing, it would paste (control v) text that was already set to clipboard.

I was given this:

#include <Misc.au3>

While 1

If _IsPressed('20') then Send('{LCTRL}V{TAB}')

If _IsPressed('1B') then Exitloop

WEnd

Maybe it is my netbook keyboard layout's fault, (despite it having a left control) however

executing this would result in near instant fashion several spaces and a V... and several instances of it

per second should the spacebar be depressed for more than a micro second.

Ok, here is where I say please and if I get polite help (I think that is not an exessive request),

I will be sure to include a thank you ok? :)

Please help me learn this without including a kitchen sink? this is really very simple.

Refering to helpfiles tends to push toward including extra peramiters and conditions, that I am really

quite conviced are not neccissary. I do not want to learn how to get this done in an exessive to the need

fashion.

Here is where I provide my best guess at the solution. It ought be easy to tell what the end goal here is

and probably easy to point out why it won't work (without telling me to drudge through more

help files). I need a positive working example that fits the need with certainty (this really is not found to

be a parasitic request on other forums). Here is my ongoing attempt, I hope it pleases that jury:

#include <Misc.au3>

While 1

If _IsPressed('20') then = 2

If _IsPressed('C0') then Exitloop

While = 2

Sleep(100)

Send("^V")

Sleep(100)

Send("{TAB}")

WEnd

WEnd

So simple....

it waits for either spacebar or ` keys to be pressed

if spacebar, then it goes to a loop where it should send control+v then 'tab' ONCE per spacebar- then returns to waiting

if ` then it exits the program altogether

Come on someone please just help?

I am being so reasonable... would someone else be reasonable also?

Link to comment
Share on other sites

Have you taken AutoIt 1 2 3 yet? It is located in the Examples section of the forum and you would benefit greatly from it. Take the class, then your knowledge will be greatly expanded on how to do what you are asking for.

The point of this is to teach you to fish. Your post is only asking for fish. Think about it.

Link to comment
Share on other sites

Honestly, you are not being reasonable, you are being an ass.

If you put more effort into explaining properly what you need to do, instead of your

victimized cry baby moaning you would not be waiting years to learn a simple script.

Here is all I can help you with from the poor explanation of what you are trying to do.

HotKeySet("{SPACE}","_Paste")

While 1
    Sleep(200)
WEnd

Func _Paste()
    Send("^v")
    Send("{TAB}")
EndFunc

So simple....

it waits for either spacebar or ` keys to be pressed

if spacebar, then it goes to a loop where it should send control+v then 'tab' ONCE per spacebar- then returns to waiting

if ` then it exits the program altogether

Is it so simple? is there even a condition to exit such a loop?

Stop acting like a tosser, and explain exactly what you are trying to do.

I'll write it for you if I can, just so I don't have to read another "hard done

to" whiny post.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

JohnOne's example is good.

Here is my modification of your original script:

#include <Misc.au3>

While 1
    If _IsPressed('C0') then Exitloop

    If _IsPressed('20') then
        Send("^V")
        Send("{TAB}")
        Sleep(250) ; to avoid invoking more times at one press
    Else
        Sleep(100) ; to reduce CPU load
    EndIf
WEnd
Link to comment
Share on other sites

  • Moderators

perhaps mahy things including that I was treated a little poorly? maybe a little?

I was part of your previous post, and don't think you were treated poorly at all. You began with "will someone please just take 30 seconds and type this out for me". You DID receive assistance, and a suggestion that you take the time to learn the language. You were treated better than you should have been right up to the point you began calling forum members "snotty" for not just writing your script for you. By the time Valik locked the thread, you'd pretty much proven you weren't willing to put any effort into it.

You're being reasonable now? That's great :) You've already received assistance from 3 of our finest. I would suggest you study their examples, LEARN from them, and try things on your own.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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