Jump to content

HotKeySet - key sequence alternative


Recommended Posts

Hey forum,

we have a custom built piece of ordering software at our firm. Many of my colleagues forget adding one piece of information into the orders.

Now, I would like to create a script that would remind them to add the information at the very end of entering the order. (endless while loop with IF statements to call a MsgBox function)

The thing is everyone runs the program at different "resolution" so I cannot use a simple pixelsearch.

 

Is there a way to use a some form of HotKeySet but use it as a key sequence? Let me rephrase... Once keys "123" are pressed consecutively display a MsgBox?

 

Or better yet, do you see any other alternative?

Thanks

Link to comment
Share on other sites

Look at the> HotStrings UDF, it may help with what you are trying to do with key sequences.  

Also, see if you can use the AutoIt Window Info tool to get information about the controls in the ordering software's window.  Then look at the control functions in the Help File.  If you can work with the window's controls directly, then you do not have to worry about screen resolution, and you may be able to enter the information directly into a control.  

 

Adam

Link to comment
Share on other sites

Look at the> HotStrings UDF, it may help with what you are trying to do with key sequences.  

Also, see if you can use the AutoIt Window Info tool to get information about the controls in the ordering software's window.  Then look at the control functions in the Help File.  If you can work with the window's controls directly, then you do not have to worry about screen resolution, and you may be able to enter the information directly into a control.  

 

Adam

Hello Adam... not help file available :-/ that's why I'm choosing this route. HotStrings looks promising. Thank you

Link to comment
Share on other sites

here:

HotStringSet("111", "examplefunction")
HotStringSet("{NUM 1}{NUM 1}{NUM 1}", "examplefunction")

While 1
    Sleep(10)
WEnd

Func examplefunction()
    MsgBox(0,"","You typed callme! :)")
EndFunc

I guess, if you want all possible entries of 1, and numpad 1:

HotStringSet("111", "examplefunction")
HotStringSet("{NUM 1}{NUM 1}{NUM 1}", "examplefunction")
HotStringSet("1{NUM 1}{NUM 1}", "examplefunction")
HotStringSet("11{NUM 1}", "examplefunction")
HotStringSet("1{NUM 1}1", "examplefunction")
HotStringSet("{NUM 1}11", "examplefunction")
HotStringSet("{NUM 1}{NUM 1}1", "examplefunction")
HotStringSet("{NUM 1}1{NUM 1}", "examplefunction")
HotStringSet("{NUM 1}{NUM 1}{NUM 1}", "examplefunction")
Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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...