AutoHotkey Community

It is currently May 26th, 2012, 4:44 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: April 1st, 2009, 6:23 pm 
Offline

Joined: March 6th, 2008, 11:54 pm
Posts: 167
So, I've been teaching myself HTML and CSS and every time I edit the html file I use notepad. So i highlight the file, right click and then go down to "open with" the hit NOTEPAD.

I know there is an easier way. I'd like to make a hotkey that opens up a html file under notepad without having to do all those steps.
Something like this:
1. I highlight file with the mouse
2. <alt>+N
3. opens up the html file in NOTEPAD


I know how to create a hotkey that just opens up NOTEPAD but then it just opens up a blank new one.

thanks in advance


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2009, 6:47 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
Why don't you just associate notepad with .htm/.html files?
In Windows Explorer, go to Tools>Folder Options>File Types>Select html and click Change to select notepad.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2009, 6:47 pm 
Offline

Joined: February 17th, 2008, 8:52 pm
Posts: 314
Maybe thispost might help.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: April 1st, 2009, 6:47 pm 
Offline

Joined: April 13th, 2007, 8:28 am
Posts: 28
it's not ahk ... but you can install paint.net , install package create a shortcut in context menu.

with ahk:
before help you, i ned to know your ahk lvl to know if you just need help or all code ...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2009, 6:58 pm 
Offline

Joined: March 6th, 2008, 11:54 pm
Posts: 167
TheGood, yes, I could change the html files to open with NOTEPAD but then I'd have to do the opposite to view them as html.

Vahju, thanks for that post. that will be helpful in writing html files, but won't work for what I'm trying to accomplish at this point. That is, creating a hotkey to open any html file under notepad


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2009, 7:18 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Try this:
- highlight file
- press desired hotkey
- in script: send ^c (this will copy filepath to clipboard, read docs about this)
- run notepad %clipboard%

should work?

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2009, 7:27 pm 
Offline

Joined: March 6th, 2008, 11:54 pm
Posts: 167
HugoV,

Kaboom! that's it. Crumple this post up. I've got to write some html.
thanks a lot :D


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Miguel, notsoobvious, poserpro and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group