Jump to content

The code wont work?


Recommended Posts

I have the following code:

Func t()
 $variable = 0
 Send("t")
EndFunc

When I press t: the variable must be t, but it must send T.

Example: When the variable is 1 it must send : blablabla.

But when I press T it will stop sending, but it will still send the character T.

(PS: I wont change the T key, it must be T)

Link to comment
Share on other sites

For an example:

Func t()

$variable = 0

Here the HotKeySet "t" must stop working

Send("t")

And here the HotKeySet "t" must work again

EndFunc

HotKeySet("t","t")

__

I have the whole code already, but I just want to know how to stop the HotKeySet, and start again?

Link to comment
Share on other sites

Well why didnt you say that to begin with you were using hotkey

At the start of your func you must disable hot key, and at the end re-enable it.

HotKeySet("t")

func stuff

HotKeySet("t","t")

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

For an example:

Func t()

$variable = 0

Here the HotKeySet "t" must stop working

Send("t")

And here the HotKeySet "t" must work again

EndFunc

HotKeySet("t","t")

__

I have the whole code already, but I just want to know how to stop the HotKeySet, and start again?

@lawonama two advices...

1 - Create only ONE THREAD about the same issue.

2 - Still don`t work.. it is annoying try to help you when you are not capable of put a working code... i know that the only part that is missed in your code example is a loop, but I should not be the one to write that... IS YOUR JOB

About your answer you need a Pause Function with a loop and a variable to check the pause state... also you need a main loop.

according to your efforts in your posts, the answers is more than fair...

Plese consider my advices next time.

EDIT: I didnt see that your problem is not a pause function, but JohnOne has already answer you

Edited by monoscout999
Link to comment
Share on other sites

Can you explain me how that works?

And what would 'that' be ?

- It pays to be specific.

(especially if you did not notice that someone else dropped a post in between your replay of a other(last in your mind) post.)

Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Example: When the variable is 1 it must send : blablabla.

For this part you need an If Else statement

something like

If $variable = 0 Then

Send("T")

Else

Send("blablabla")

EndIf

But you need somewhere in your script to tell it when to change $variable

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

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