forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Indent, Outdent for If Statements

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code
View previous topic :: View next topic  
Author Message
cnodnarb
Valued Contributor
Valued Contributor


Joined: 11 Sep 2002
Posts: 641
Location: Evansville, IN

PostPosted: Sat May 14, 2011 6:40 pm    Post subject: Indent, Outdent for If Statements Reply with quote

I don't like the way tab works in the IDE. It's 'iffy'.

When I beautify code (only on large projects) I use four space indenting.

Compile and place in your tools folder.

Indent
Code:
window send,@winactive(),@ctrl(c)
list create,1
list paste,1
list create,2
list seek,1,0
repeat
%a = @item(1)
list add,2,"    "%a
until @null(@next(1))
clipboard set,@text(2)
window send,@winactive(),@ctrl(v)


Outdent
Code:
window send,@winactive(),@ctrl(c)
list create,1
list paste,1
list create,2
list seek,1,0
repeat
%a = @substr(@item(1),5,@len(@item(1)))
list add,2,%a
until @null(@next(1))
clipboard set,@text(2)
window send,@winactive(),@ctrl(v)
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group