lawonama Posted August 23, 2011 Share Posted August 23, 2011 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 More sharing options...
JohnOne Posted August 23, 2011 Share Posted August 23, 2011 That code wont do anything, its just a function How about you supply a working example, a proper explanation, or both. 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 More sharing options...
lawonama Posted August 23, 2011 Author Share Posted August 23, 2011 I already have the whole code. Let me explain: When I press T a func will work. But I want also that he will send T Link to comment Share on other sites More sharing options...
JohnOne Posted August 23, 2011 Share Posted August 23, 2011 Send("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 More sharing options...
lawonama Posted August 23, 2011 Author Share Posted August 23, 2011 -.-... That won't work. Can't you just explain how to disable a func? Link to comment Share on other sites More sharing options...
JohnOne Posted August 23, 2011 Share Posted August 23, 2011 This will disable your func. Func t() Return $variable = 0 Send("t") EndFunc 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 More sharing options...
monoscout999 Posted August 23, 2011 Share Posted August 23, 2011 @JohnOne @lawonama put a working code. that is just a function.. what expect from us.. to wirte the rest? Please put a working code. Link to comment Share on other sites More sharing options...
lawonama Posted August 23, 2011 Author Share Posted August 23, 2011 For an example:Func t()$variable = 0Here the HotKeySet "t" must stop workingSend("t")And here the HotKeySet "t" must work againEndFuncHotKeySet("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 More sharing options...
JohnOne Posted August 23, 2011 Share Posted August 23, 2011 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 More sharing options...
monoscout999 Posted August 23, 2011 Share Posted August 23, 2011 (edited) For an example:Func t()$variable = 0Here the HotKeySet "t" must stop workingSend("t")And here the HotKeySet "t" must work againEndFuncHotKeySet("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 JOBAbout 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 August 23, 2011 by monoscout999 Link to comment Share on other sites More sharing options...
lawonama Posted August 23, 2011 Author Share Posted August 23, 2011 Can you explain me how that works? Link to comment Share on other sites More sharing options...
MvGulik Posted August 24, 2011 Share Posted August 24, 2011 (edited) 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 August 24, 2011 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 More sharing options...
kaotkbliss Posted August 24, 2011 Share Posted August 24, 2011 Example: When the variable is 1 it must send : blablabla.For this part you need an If Else statementsomething likeIf $variable = 0 ThenSend("T")ElseSend("blablabla")EndIfBut you need somewhere in your script to tell it when to change $variable 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now