Sign in to follow this  
Followers 0
dpaschal

Help with a loop please

4 posts in this topic

I thought I would write a sort of "Master Control Program" for some tasks here at work. I basicly want to define a bunch of keys that will trigger functions within the script. Here is what I have for my first function. It will run, but it will not recognize the hotkey. I removed the application's window name for descreetness(SP?) Please advise:

;set hotkey to run function

HotKeySet("{LALT}q", "checkcase")

;define functions

Func checkcase()

WinActivate("Activate application window", "")

ControlClick("Activate a button in that application's window", "", "Button85")

ControlFocus("Load Query", "", "Edit1")

Sleep(200)

Send("cases.vql")

ControlClick("Load Query", "", "Button2")

Send("{enter}")

EndFunc

;main program

While 1

Sleep(1000)

WEnd

Share this post


Link to post
Share on other sites



Hi,

doesn't look that bad, but no use Control func all the time? So you needn't to acitvate the window or send ...

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

The following hotkeys cannot be set:

Ctrl+Alt+Delete It is reserved by Windows

F12 It is also reserved by Windows, according to its API.

NumPad's Enter Key Instead, use {Enter} which captures both Enter keys on the keyboard.

Win+B,D,E,F,L,M,R,U; and Win+Shift+M These are built-in Windows shortcuts. Note: Win+B and Win+L might only be reserved on Windows XP and above.

Alt, Ctrl, Shift, Win These are the modifier keys themselves!

Other Any global hotkeys a user has defined using third-party software, any combos of two or more "base keys" such as '{F1}{F2}', and any keys of the form '{LALT}' or '{ALTDOWN}'.

Read the helpfile for HotKeySet


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Ah ok, so it is !q instead of {LALT}q.

I put that in and it worked. Thanks for the quick responses. :P

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