Jump to content

if statment


Recommended Posts

i need to make an if statment that will check to see if a key combination is pressed (ctrl + c) but it needs to moniter this outside of the program so if i am in anofther program and i press ctrl + c it will pick it up :D

Link to comment
Share on other sites

HotKeySet("^c", "test")

While 1
    Sleep(111)
WEnd

Func test()
    HotKeySet("^c")
    Send("^c")
    MsgBox(0, "", "")
    HotKeySet("^c", "test")
EndFunc ;==>test
if I understood your request...

Edit:

i need to make an if statment

That remains to be seen...

...that will check to see if a key combination is pressed (ctrl + c)

The code above can "check to see if ctrl-c is pressed"

You can add your code within the "test" func

but it needs to moniter this outside of the program

I assume that "it" = the AutoIt script and "the program" equals some other application

so if i am in anofther program and i press ctrl + c it will pick it up

You want the ctrl-c to be passed to the application (another program)

I assume that this time - "it" = that other program

...the code above does that also.

Let me know if I misinterpreted your post.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Did you make this script in the past or just now? I thout it was usefull :D maby you could send me your script in a pm :D i will send you wahat i made :P

No, I've not made a script like this - I just liked the idea. Good Job. See my PM for some suggestions to you code.

[size="1"][font="Arial"].[u].[/u][/font][/size]

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