Dev Posted September 19, 2004 Share Posted September 19, 2004 can i create some while loop which is active only when i hold a key down? thanks Link to comment Share on other sites More sharing options...
the_lord_mephy Posted September 19, 2004 Share Posted September 19, 2004 (edited) Hold a key down? or press a key. You could make something like L starts a loop and E stops a loop (not tested) $endloop = HotKeySet("e") HotKeySet("l", "loop") Do Func loop() STATEMENTS EndFunc Until $endloop = 1 Edited September 19, 2004 by the_lord_mephy My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
Developers Jos Posted September 19, 2004 Developers Share Posted September 19, 2004 (edited) can i create some while loop which is active only when i hold a key down? thanks <{POST_SNAPBACK}>if the question is to activate the while when any key is pressed then...nope.. you can activate a function with hotkeyset() when a specific key is presses. Edited September 19, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Dev Posted September 19, 2004 Author Share Posted September 19, 2004 i wanna do eg. MouseClick-loop while eg. TAB is hold down. im noob so a little code would not hurt Link to comment Share on other sites More sharing options...
ezzetabi Posted September 19, 2004 Share Posted September 19, 2004 Tab can be hooked. HotKeySet ( '{tab}' , '_MouseClick-loop' ) While 1 Sleep(100) WEnd Exit Func _MouseClick-loop() ; What you want EndFunc Link to comment Share on other sites More sharing options...
the_lord_mephy Posted September 19, 2004 Share Posted September 19, 2004 Ezzetabi, is there a particular reason u put the _ infront of ur function, just curious if it does something i dont know about My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
emmanuel Posted September 20, 2004 Share Posted September 20, 2004 Ezzetabi, is there a particular reason u put the _ infront of ur function, just curious if it does something i dont know about <{POST_SNAPBACK}>it's tradition/custom to do so, helps differentiate your udf's from real functions "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
trids Posted September 20, 2004 Share Posted September 20, 2004 it's tradition/custom to do so, helps differentiate your udf's from real functions <{POST_SNAPBACK}>.. and allows clever editors like TextPad ( ) to highlight them differently to the way that regular functions are highlighted Link to comment Share on other sites More sharing options...
emmanuel Posted September 20, 2004 Share Posted September 20, 2004 .. and allows clever editors like TextPad ( ) to highlight them differently to the way that regular functions are highlighted <{POST_SNAPBACK}>Hey, JdeB, why doesn't SciTE do that? "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
ezzetabi Posted September 20, 2004 Share Posted September 20, 2004 it's tradition/custom to do so, helps differentiate your udf's from real functions <{POST_SNAPBACK}>Yep. This is the point. Also I dislike the #include command. I prefere copying the code of UDFs in the botton of the script, so when I see _* I know that I need the code. Also, sometime I script using a TopDown procedure so, sometime I use UDF that I have still to develop saying 'I'll do later, lets finish the main script'. So, when the moment arrive, I just look for _s for finding every UDF I have to develop. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 20, 2004 Developers Share Posted September 20, 2004 (edited) Hey, JdeB, why doesn't SciTE do that? <{POST_SNAPBACK}>anything is possible...... only cost more.... Seriously... it can be done if thats what we all want... but there is no way to verify that the function really exists. how/what does textpad do with this? Edited September 20, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
emmanuel Posted September 20, 2004 Share Posted September 20, 2004 anything is possible...... only cost more.... Seriously... it can be done if thats what we all want... but there is no way to verify that the function really exists. how/what does textpad do with this? <{POST_SNAPBACK}>that's fine with me, AU3check does that... "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
Valik Posted September 20, 2004 Share Posted September 20, 2004 Yep. This is the point. Also I dislike the #include command. I prefere copying the code of UDFs in the botton of the script, so when I see _* I know that I need the code. Also, sometime I script using a TopDown procedure so, sometime I use UDF that I have still to develop saying 'I'll do later, lets finish the main script'. So, when the moment arrive, I just look for _s for finding every UDF I have to develop. <{POST_SNAPBACK}>You dislike a feature that makes writing scripts easier because instead of cluttering your code with commonly used functions, you'd rather copy/paste them all over the place and have a copy in every single script so that you have to manually re-copy them if you make a significant change? :: shrugs :: To each his own, I suppose. Link to comment Share on other sites More sharing options...
Valik Posted September 20, 2004 Share Posted September 20, 2004 Small point.... Every bit of text that I can think of is styled with the current lexer. The only text that uses the default color is user function names in either the declaration or use of a function. So... why not change the default color to something besides black (Which I'm assuming most people have as default) and be done with it? Isn't that close enough? Link to comment Share on other sites More sharing options...
ezzetabi Posted September 20, 2004 Share Posted September 20, 2004 Common or not, you may add Function you do not use. But as you said 'to each his own'. Who care? Link to comment Share on other sites More sharing options...
Developers Jos Posted September 20, 2004 Developers Share Posted September 20, 2004 Small point.... Every bit of text that I can think of is styled with the current lexer. The only text that uses the default color is user function names in either the declaration or use of a function. So... why not change the default color to something besides black (Which I'm assuming most people have as default) and be done with it? Isn't that close enough? <{POST_SNAPBACK}>True.... I was just wondering what TextPad is doing extra here ??.. is it just giving a piece of text a color when it starts with _ and ends with ( or does it something really intelligent ?? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ezzetabi Posted September 20, 2004 Share Posted September 20, 2004 Maybe it changes color for everything starts with _ and ' ' OR ( that is not already something other. But at this point I may not work with Func names like: _WinActivate() But, once in a while, I agree with Valik. Black is already a different color from most of the script. Why bother? Link to comment Share on other sites More sharing options...
trids Posted September 20, 2004 Share Posted September 20, 2004 [..]how/what does textpad do with this? <{POST_SNAPBACK}> I'm happy (eager even) to share this .. but it will cost you all 5 nice things to say about Textpad ... ; AutoIt v3 Syntax File ; Created by Jonathan Bennett <jon@hiddensoft.com> ; C=1 [Syntax] Namespace1 = 3 IgnoreCase = Yes KeyWordLength = BracketChars = ()[] OperatorChars = +-*/& PreprocStart = # HexPrefix = 0x SyntaxStart = SyntaxEnd = CommentStart = #cs CommentEnd = #ce CommentStartAlt = _ CommentEndAlt = ( SingleComment =; SingleCommentCol = SingleCommentAlt = SingleCommentColAlt = SingleCommentEsc = StringsSpanLines = Yes StringStart = " StringEnd = " StringAlt = ' StringEsc = CharStart = CharEnd = CharEsc = .. see, it's actually a clever fiddle: I'm setting "_" as an alternative comment, which i highlight in bright pink .. the side-effect is that using the continuation feature makes you blind ( ) Link to comment Share on other sites More sharing options...
Developers Jos Posted September 20, 2004 Developers Share Posted September 20, 2004 I'm happy (eager even) to share this .. but it will cost you all 5 nice things to say about Textpad ... .. see, it's actually a clever fiddle: I'm setting "_" as an alternative comment, which i highlight in bright pink .. the side-effect is that using the continuation feature makes you blind ( ) <{POST_SNAPBACK}>Ok... so all your functions are considered comments... cool ... avoids lots of coding issues... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ezzetabi Posted September 20, 2004 Share Posted September 20, 2004 What a second. What happen if you use the _ as line divider? $eg= 'a very long, but of course less than 4096 chars ' &_ 'text?' 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