AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multi Line Comments

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
JDN



Joined: 24 Mar 2004
Posts: 135

PostPosted: Fri Nov 23, 2007 2:08 pm    Post subject: Multi Line Comments Reply with quote

Does anyone know of a way to write comments containg multiple lines without having to insert a semicolon into each line?

I'd like to be able to write comments containing one or more paragraphs. It seems to me there should be a simple way to do this that I'm just missing due to a lack of sleep. Does anyne know of something obvious that I'm missing?

I like to have a few different versions of commands in my AHK script files and be able to turn one version on or off at will. I had hought of disabling some of the commands and enablling others but sometimes problems in the syntax of disapbed commands prevent the ehtire script file from bieing able to be compiled.
Back to top
View user's profile Send private message
garry



Joined: 19 Apr 2005
Posts: 1186
Location: switzerland

PostPosted: Fri Nov 23, 2007 2:52 pm    Post subject: Reply with quote

examples, first remark, second example goto/ gosub to label AA2
( post in ask for help )
Code:
/*
this is  remark1
this is  remark2
*/

Code:
AA2:
msgbox,this is label AA2
return
Back to top
View user's profile Send private message
JDN



Joined: 24 Mar 2004
Posts: 135

PostPosted: Fri Nov 23, 2007 4:18 pm    Post subject: Reply with quote

Thanks very much Gary. I must have missed where that feature was documented.

But I'm afraid I don't understand your second example. Does this show how to take a working piece of code and effectively convert it into a comment by enclosing it using an invalid label?

If so, there is a problem with multiple comments because when you load the definition file, it gives you a warning message for each such label.

But perhaps I'm not understanding your intent.
Back to top
View user's profile Send private message
garry



Joined: 19 Apr 2005
Posts: 1186
Location: switzerland

PostPosted: Fri Nov 23, 2007 4:31 pm    Post subject: Reply with quote

sorry , I can't good english
second example is only to jump here
I was thinking you can use to test different commands / part of scripts
when use a gLabel you get error or when you goto a label which don't exist
but no error in this case when you never need these labels
Code:
A:=1
if A=1
 goto,SKIP01
else
 goto,SKIP02
return

SKIP01:
msgbox,you skipped to 1 because A=1
return

SKIP02:
msgbox,you skipped to 2 because A<>1
return
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group