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 

Unofficial Syntax and Style Standard
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Fri Feb 25, 2005 7:25 am    Post subject: Reply with quote

Oh yes I do the same as you might be able to tell from my little example above. I am very proper I guess you might say although I should make more comments in my script because when I set a project on the back burner for a while, when I come back to it, I look at it and ask "what the @$#% was I doing here...hmmm"
_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Fri Feb 25, 2005 11:51 am    Post subject: Reply with quote

here's my tidy hosted on Titan's server.

i don't know how much it works, if at all... afaik i was in the midst of some major changes while i left it...
_________________
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Fri Feb 25, 2005 1:14 pm    Post subject: Reply with quote

I should have known that Rajat has something in place. :) Due to insomnia last night, I did something similar to his "Tidy". See this post for my script

http://www.autohotkey.com/forum/viewtopic.php?t=2528

I wanted to start with the basic thing frist -> auto indentation. The rest is a bit fancy, HTML, color coding, etc.. I don't think I will do that.

Auto-Indentation should serve well for most cases and most people. Specially when you get scripts from others (or from the forum) that do not have any indentation at all.

Several other ideas are noted in the header of the script.
Code:
; Possible extentions (not included yet):
;  - User selects file in explorer and start script via hotkey
;  - User highlights a sytax in an editor (or a passage of it)
;      and calls script via hotkey, highlight text will be replaced
;  - calculate statistic for script (lines of code, lines of out-of-line comments, total lines)
;  - Gui, for drag and drop, options, ...
;  - Adjust commands to capitalize the first letter of words,
;       e.g. "GuiControl" instead of "guicontrol"

_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5009
Location: imaginationland

PostPosted: Fri Feb 25, 2005 1:23 pm    Post subject: Reply with quote

toralf wrote:
Due to insomnia last night
Sorry if this is off-topic but being an insomniac myself I'm curious to know wether you have insomnia too or just couldn't sleep that night Question
_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Fri Feb 25, 2005 1:42 pm    Post subject: Reply with quote

Quote:
I wanted to start with the basic thing frist -> auto indentation. The rest is a bit fancy, HTML, color coding, etc.. I don't think I will do that.

i suggest we use the freeware PSPad for color coding html coz it will be rarely used. it is inbuilt in PSPad and doing it in ahk will be like re-inventing the wheel.

let's continue the rest in toralf's post... i didn't post mine in a new post (as jonny suggested) coz i don't think that with all the latest changes in ahk, my old script is worth much.
_________________
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Fri Feb 25, 2005 1:59 pm    Post subject: Reply with quote

@Titan
I'm sorry to hear that you have insomnia.
Actually, I do not know if I do have "real" insomnia. It just happens every once in a while that I can't get sleep. Then I get up and do something for some hours. Yesterday it was till 2am (I get up at 6am).
It happens once every month or two. But since my wife goes to bed early and needs much more sleep then I do, but I still join her (for obvious reasons) I just regard it as a "too MUCH sleep lately syndrom".
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jonny



Joined: 13 Nov 2004
Posts: 3005
Location: Minnesota

PostPosted: Fri Feb 25, 2005 5:46 pm    Post subject: Reply with quote

Great work done so far! I don't have much time now, but when I do I'll give it a try of my own, working from the base Rajat and toralf have already set. My biggest goal will be customizability, but I don't want to completely abandon the idea of a standard. It's not going to be set in stone, it would just be useful for defaults in the options. If noone else cares, though, that's fine, I already have plenty to work with from Chris' and IU's suggestions.

Quote:
it is inbuilt in PSPad


Would you mind making a small tutorial for those of us less experienced with the more obscure features of PSPad? I'd never heard of this, though I did know it had very advanced HTML features. Do you mean it can create an html out of an existing syntax file, or do you have to configure it from the ground up?
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3005
Location: Minnesota

PostPosted: Sat Feb 26, 2005 4:29 am    Post subject: Reply with quote

Rajat, the link to tidy.zip is broken. Confused
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Sat Feb 26, 2005 6:35 am    Post subject: Reply with quote

jonny wrote:

Would you mind making a small tutorial for those of us less experienced with the more obscure features of PSPad?


small tutorial? ..here it is!

1. Open a .ahk file in PSPad (make sure u've installed the syntax files and u see syntax highlighting)
2. Use File Menu > Export to export in available formats including html.
Wink

and Titan's server is down... so get my file here
_________________
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3005
Location: Minnesota

PostPosted: Sat Feb 26, 2005 5:33 pm    Post subject: Reply with quote

Nice. Thanks for the tip, I'll probably use that when publishing in the future.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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