Jump to content

Quick Script Suggestion!


Recommended Posts

Why into infinity? Anyway, here's some code:

Send("{TAB down}") ;Holds the Tab key down
;Send("{TAB up}") Releases the Tab key
Send("{A down}") ;Holds the A key down
;Send("{A up}") Releases the A key

You'll also want to use the help documentation, or even the forum search tool. You would have solved your problem much more quickly that way.

Edited by motionman95
Link to comment
Share on other sites

This will send tab +k to a notepad window.. only when it is active..

Script will exit when end key is pressed

hotkeyset("{END}","Terminate")
while 1
    WinWaitActive("Untitled - Notepad","")
    Send("{Tab}K") 
WEnd    

Func Terminate()
    Exit
EndFunc
[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

This code will begin pressing "TAB" and then "k" over and over and over and over. Shift + G starts and pauses the script.

HotKeySet("G", "_Go")

global $paused

While 1
     Sleep(500)
WEnd

Func _Go()
     While $Paused
          $Paused = NOT $Paused
          Send("{TAB}")
          Send("k")
     WEnd
EndFunc
Link to comment
Share on other sites

This code will begin pressing "TAB" and then "k" over and over and over and over. Shift + G starts and pauses the script.

CODEHotKeySet("G", "_Go")

global $paused

While 1

Sleep(500)

WEnd

Func _Go()

While $Paused

$Paused = NOT $Paused

Send("{TAB}")

Send("k")

WEnd

EndFunc

Sleep in while loop?? that will pause the script for ever.. Did u test this?? coz i did.. nd it didn't do anything.. other than hang forever..

Edited by Manjish
[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

You'll also want to use the help documentation, or even the forum search tool. You would have solved your problem much more quickly that way.

My dear friends ....

Many people, even I prefer to use direct forum to resolve their doubts Xq You "pros" also cite examples of teaching still very rich.

So the help of you is 1000% better than the help of Au3 ^^^^

I read ... I update ... I learn ...
Link to comment
Share on other sites

@ Fioda..

I agree.. It's much more easier here..

But to tell u the truth, one needs to be self sufficient.. as far as possible..

And one shoudl ask only for help when it is most needed..

Laziness is not a gr8 virtue.. Thats what my buddy motionman meant..

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

With something like this, I agree with motion man. If you got asked the same question every day, and it was always the same answer, would you get tired of answering?

So that is why many of us prefer the OP to be proactive, try some stuff out, search the forums, try explore the help file. Just by doing that little bit, it saves them time, they might learn a bit more, and it saves our fingers and sanity! :)

Cheers,

Brett

Link to comment
Share on other sites

@Manjish

@BrettF

Q I agree with everything you said ...

I understand that there are too many lazy ... but I want to say is that the help of Au3 is not very explanatory.

In the most simple script ... that you do not think a solution if anyone not quest. This to exercise constantly recycles knowledge.

Already praised the great attention of many of you now and praise the dedication and commitment in teaching us.

Lets see more that Au3Help

"The excellence comes with time"

Cheers

Fi0da

I read ... I update ... I learn ...
Link to comment
Share on other sites

The help file is one of the best you can get. No other language I've ever looked at has so much information and examples as it does.

I think it is fairly explanatory if you sit down and study what you need to know.

For example I chose a random topic in the help file. Here's me analyzing it:

FileGetShortcut

Second line, I learn about what it does "Retrieves details about a shortcut.", next line is syntax. Then I see what each parameter is, and possible values in some cases. Then I see what it returns, an array or it sets @error. That tells me how I should go about testing for success or failure. Then in the remarks, it tells me what the array returns. Then I have related functions and then finally the code example. Which contains comments so you can see how it works. Your next step is to experiment (I might choose a random shortcut, and then see what is returned using _ArrayDisplay etc.)

Can I ask what is not explanatory? What is hard to understand?

Cheers

Brett

Link to comment
Share on other sites

I agree with you to be lazy to get what we need ...

It is much easier to ask and collect the exact response ... We need to more study.

When I said that aid is not very conclusive, I meant to people newbies can not learn just for the help.

If questions of beginners annoy you, make sure that my part of not more trouble.

Regards

Fi0da (Sad student)

sorry to divert the topic

I read ... I update ... I learn ...
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...