Jump to content

Help with a loop please


Recommended Posts

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

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

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


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

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