Sign in to follow this  
Followers 0
thewrinklyninja

Autoit Tutorials Or Helpful Nudge In The Right Direction

5 posts in this topic

Hi, I have recently discovered AutoIT and am looking for some more in depth tutorials than the ones in the Documentation.

I just want to automate some keystrokes for my job. I am forever entering the same keystrokes and pressing the same buttons for the different fields on a form for my Tech support role. Basically I always type the following for a standard call.

Select the current current field ( I can do that myself)

Then press F4 ,

At this point I would need to wait for a new Window to load and become active.

Then press D,

Then press Return twice,

Then enter the current system time,

Then press Return,

Then enter the current system time,

The press Return,

I want to if possible tie this to a hotkey, is Alt + D

Any help would be appreciated,

Thanks

Share this post


Link to post
Share on other sites



This is a great starting point Welcome to AutoIt 1-2-3

Then lookup HoyKeySet(), Send(), and ControlSend() in the helpfile.

Share this post


Link to post
Share on other sites

In the Help File, take a look at WinWait, HotKeySet, Send, ControlSend (as big_daddy mentioned).

@HOUR, @MIN are the macros for the current hour and minute, respectively.

An example of sending Alt+D is: Send("!d")

Share this post


Link to post
Share on other sites

Hi, I have recently discovered AutoIT and am looking for some more in depth tutorials than the ones in the Documentation.

I just want to automate some keystrokes for my job. I am forever entering the same keystrokes and pressing the same buttons for the different fields on a form for my Tech support role. Basically I always type the following for a standard call.

Select the current current field ( I can do that myself)

Then press F4 ,

At this point I would need to wait for a new Window to load and become active.

Then press D,

Then press Return twice,

Then enter the current system time,

Then press Return,

Then enter the current system time,

The press Return,

I want to if possible tie this to a hotkey, is Alt + D

Any help would be appreciated,

Thanks

all that can be made with autoit, something like that:

HotKeySet ("{ALT}+{d}","AlwaysSameThing"); I want to if possible tie this to a hotkey, is Alt + D

While 1
    Sleep (50)
WEnd

Func AlwaysSameThing ()
    Send ("{F4}"); Then press F4
    WinWait ("Window title","window text");put the info here...
    WinActivate ("Window title","window text");the same thing
    Do
        Sleep (50)
    Until WinActive ("Window title","window text"); At this point I would need to wait for a new Window to load and become active.
    
    Send ("{D}");~ Then press D
    Send ("{Enter 2}"); Then press Return twice
    $date=@HOUR&":"&@MIN&":"&@SEC
    For $loop=1 To 2
        Send ($date);Then enter the current system time <======= Here maybe you should get info of control so that works.
        Send ("{Enter}"); The press Return
    Next
EndFunc

Share this post


Link to post
Share on other sites

Thank you for all the advice, you have helped me grasp some of the fundamentals.

Thanks again

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