Classic Shell
http://www.classicshell.net/forum/

New text file / New notepad document to toolbar button ?
http://www.classicshell.net/forum/viewtopic.php?f=8&t=4660
Page 1 of 1

Author:  BitOn [ Tue May 26, 2015 8:53 am ]
Post subject:  New text file / New notepad document to toolbar button ?

How can i add command "new notepad" to toolbar button ?

Custom button have a "new folder" command, but don't have a "new notepad" command to quickly create the new notepad in window. Notepad is a often use command too.

please answer me.

classicshell 4.0.4

Author:  Gaurav [ Tue May 26, 2015 9:11 am ]
Post subject:  Re: How can i add command "new notepad" to toolbar button ?

By new notepad, you mean only opening a new instance of Notepad or new text document in the current folder where you are browsing?

For only opening Notepad, add a Custom command to the toolbar. To add a Custom button, open Classic Explorer Settings and go to the Toolbar Buttons tab. In the right column, scroll all the way down and drag the Custom item from the right column to the left and position it where you want.

Then double click "Custom" and in the command field, type: C:\Windows\notepad.exe. Pick an icon and label if you want.

If you want to add a button to a create a new text file, use this command instead in the Custom button: notepad "%1%\New Text Document.txt". This will start Notepad and it will ask to create a new text document in the current folder where you are.

Author:  BitOn [ Tue May 26, 2015 9:53 am ]
Post subject:  Re: How can i add command "new notepad" to toolbar button ?  Topic is solved

Thanks, it's work. :)

Author:  str8arrow [ Wed Jul 08, 2015 4:38 pm ]
Post subject:  Re: How can i add command "new notepad" to toolbar button ?

Hi - PLEASE HELP! I used the suggested command to create a CUSTOM TOOLBAR button that creates a
"New Text Document.txt" (at the current location/within current folder)

BUT EACH TIME I USE THIS BUTTON I get a popup box "New Text Document.txt" was not found at this location. Create new document at this location?" You must click yes to continue.

It's very irritating. PLEASE HELP!!!!

Thanks.
str8arrow

Author:  Gaurav [ Wed Jul 08, 2015 9:04 pm ]
Post subject:  Re: How can i add command "new notepad" to toolbar button ?

Well that's how it's supposed to be. The command does not itself create the new document. It starts Notepad and tells it to create the new document called "New text document.txt" if one doesn't exist already. Click Yes and the text file will be created.

Author:  nathan323 [ Sat Nov 26, 2016 12:05 am ]
Post subject:  Re: New text file / New notepad document to toolbar button ?

Is there any way to emulate exactly the behaviour you see when right-clicking the whitespace of a folder and choosing New-Text Document?

ie. a text file is created in current folder with title text highlighted ready for renaming.


I went to the registry and found the ShellNew key for .txt files, the ItemName string has value "@%SystemRoot%\system32\notepad.exe,-470"
I hoped this could put into the command field of the custom button, but unfortunately didnt work..

Author:  Gaurav [ Sat Nov 26, 2016 1:48 am ]
Post subject:  Re: New text file / New notepad document to toolbar button ?

No there isn't.

Author:  nathan323 [ Sat Nov 26, 2016 4:04 pm ]
Post subject:  Re: New text file / New notepad document to toolbar button ?

Ok thanks.

Author:  Stamimail [ Sun Jun 04, 2017 5:32 am ]
Post subject:  Re: New text file / New notepad document to toolbar button ?

nathan323 wrote:
Is there any way to emulate exactly the behaviour you see when right-clicking the whitespace of a folder and choosing New-Text Document?

ie. a text file is created in current folder with title text highlighted ready for renaming.

Not exactly the same thing, but may help
https://superuser.com/questions/1091268 ... y-a-hotkey

Author:  nathan323 [ Sat Aug 26, 2017 6:58 am ]
Post subject:  Re: New text file / New notepad document to toolbar button ?

Thankyou Stamimail, this gave me the kickstart to work on this again. I checked out old mates script idea and the problem was it depended on where the mouse was positioned to work properly. I've now got a working Autohotkey script that factors this in, works great.

Code:
SetMouseDelay, 0

MouseGetPos, mouseposX
ControlGetPos, , buttonY, , , ToolbarWindow325, A ; gets

RestoreClip := Clipboard
Send !d
Sleep 10
FolderPath := Clip()

buttonY += 86
MouseMove, %mouseposX%, %buttonY%

Click, Right
Sleep, 10
SendRaw, wt

Clipboard := RestoreClip

ExitApp
Return


Set the saved script as button Command in Classic Shell and will be good to go.

Author:  Stamimail [ Sun Sep 03, 2017 5:37 am ]
Post subject:  Re: New text file / New notepad document to toolbar button ?

Note that this command available also via Explorer Menu:
In Explorer:
Alt or F10 > File > New

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/