Jump to content

Recommended Posts

Posted (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 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]
  • Developers
Posted (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 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.
  :)

Posted

Tab can be hooked.

HotKeySet ( '{tab}' , '_MouseClick-loop' )

While 1
Sleep(100)
WEnd

Exit
Func _MouseClick-loop()
  ; What you want
EndFunc
Posted

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]
Posted

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)

Posted

it's tradition/custom to do so, helps differentiate your udf's from real functions

<{POST_SNAPBACK}>

.. and allows clever editors like TextPad ( :ph34r: ) to highlight them differently to the way that regular functions are highlighted :(
Posted

.. and allows clever editors like TextPad ( :ph34r: ) 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)

Posted

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.

  • Developers
Posted (edited)

Hey, JdeB, why doesn't SciTE do that?

<{POST_SNAPBACK}>

anything is possible...... only cost more.... :ph34r:

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

Posted

anything is possible......  only cost more....  :ph34r:

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)

Posted

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

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?

  • Developers
Posted

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

Posted

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?

Posted

[..]how/what does textpad do with this?

<{POST_SNAPBACK}>

:lol: I'm happy (eager even) to share this .. but it will cost you all 5 nice things to say about Textpad :ph34r: ...

; 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 ( :lol: )

  • Developers
Posted

:D  I'm happy (eager even) to share this .. but it will cost you all 5 nice things to say about Textpad  :ph34r:  ...

.. 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 ( :lol: )

<{POST_SNAPBACK}>

Ok... so all your functions are considered comments... cool ... avoids lots of coding issues... :lol:

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...