Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


yet another notepad

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,47210
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> yet another notepad
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 yet another notepad - 5/18/2007 8:10:08 AM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
Yes, it's a notepad.
Actually, I was trying to make some kind of menu for..., well it turned out to be a notepad .
It's only halve way, but the basics are there. I'm using a CommonDialog object, it works for me, but maybe not for others.?

stuff that doesn't work (yet)
  • Print
  • Find
  • Replace
  • Tabs in the textarea
  • Font change on just a selection
  • A statusbar that keeps track of cursor position
  • ...
You can download the full program with all the bells here

So, here's the basic code


      


And the Style.css sheet


      

Updates will follow, and if you know a solution to any of the yet todo stuff, post it here

< Message edited by SilentBob -- 6/10/2007 7:21:47 AM >


_____________________________

If you're looking for the truth, STOP lying.
 
 
Revisions: 3 | Post #: 1
 
 RE: yet another notepad - 5/18/2007 10:18:25 AM   
  dm_4ever


Posts: 2220
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
That's pretty neat! 

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to SilentBob)
 
 
Post #: 2
 
 RE: yet another notepad - 5/25/2007 7:35:31 PM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
Version 0.7 is out. It's using MeadCo's ScriptX object, the free version offcourse . I'm not posting the code here because of all the extra's it's using, just use the link in the first post .

New feature are
  • Page setup
  • Print preview
  • Print
  • Undo
  • Redo

Still todo
  • Find
  • Replace
  • Tabs in the textarea
  • Font change on just a selection
  • A statusbar that keeps track of cursor position

don't know if those last 3 will ever be possible though.

_____________________________

If you're looking for the truth, STOP lying.

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: yet another notepad - 5/26/2007 4:52:34 AM   
  dm_4ever


Posts: 2220
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
Hi SilentBob,

For the Find and Replace I would probably recommend using Regular Expressions.

I was browsing through some of the ScriptingGuy's posts and found this one...
http://www.microsoft.com/technet/scriptcenter/resources/qanda/mar07/hey0321.mspx

That looks like it may give you more flexibility when it comes to editing certain areas as compared to using the textarea. It would also allow you to highlight keys words as a result to your "find"....
http://www.microsoft.com/technet/scriptcenter/resources/qanda/may07/hey0511.mspx

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to SilentBob)
 
 
Post #: 4
 
 RE: yet another notepad - 6/10/2007 7:56:55 AM   
  SilentBob


Posts: 38
Score: 0
Joined: 3/27/2007
Status: offline
Due to a lack of time, this fun little project is coming to a premature ending .

The 'find' feature works, kind off. Just do a search for File and you'll see what I mean .

Did come across something nice though. Just adding a single line of code enabled a nice little drag n drop feature. Even dragging text from another application into the textarea works.
Just add the following line in the window onLoad event.

                   document.execCommand "2D-position", false, true

The full version is still here

If anyone feels the urgh to finish it, please do, cause I don't like leaving things hanging.

_____________________________

If you're looking for the truth, STOP lying.

(in reply to dm_4ever)
 
 
Post #: 5
 
 RE: yet another notepad - 6/24/2007 12:47:33 PM   
  wanghuok


Posts: 17
Score: 0
Joined: 10/13/2005
Status: offline
the effect is very good.

but i dont know what are they mean underside.(i come from china ,so my english is poor)

factory.printing.header = ""  factory.printing.footer = ""
mnuBckGrd.Style.width = document.body.clientWidth
txtArea.Style.width = document.body.clientWidth
txtArea.Style.Height = document.body.clientHeight-25

txtArea.Style.fontfamily = "arial"
txtArea.Style.fontsize = "10pt"

PrintText.Style.fontfamily = "arial"
PrintText.Style.fontsize = "10pt"

Document.Title = NotePadHTA.ApplicationName & "  -  " & "New File"
blnTextChanged = False
txtArea.Focus

< Message edited by wanghuok -- 6/24/2007 12:59:08 PM >


_____________________________

I come from China,This is a very beautiful country.

Welcome to China.

(in reply to SilentBob)
 
 
Revisions: 1 | Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> yet another notepad Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts