Sign in to follow this  
Followers 0
dakota

if statment

6 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

no it works think you i made a script that when you press control-c it copies what is in the clipboard to a text file. :D Think You

Share this post


Link to post
Share on other sites

...i made a script that when you press control-c it copies what is in the clipboard to a text file...

You are welcome. I rather like your idea.

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

Share this post


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

Share this post


Link to post
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]

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