DonationCoder.com Forum

Main Area and Open Discussion => General Software Discussion => Topic started by: Contro on February 04, 2014, 06:23 PM

Title: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 04, 2014, 06:23 PM
I don't remember well.
I think sometime I make this with windows xp.
Now is for windows 7
How can I do this ?

Best Regards
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: 4wd on February 04, 2014, 06:56 PM
It's there by default:

[ You are not allowed to view attachments ]
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 04, 2014, 07:30 PM
 ;D
Yeahhhhh
By I would like under new by command, and mantain in the submenu optional.....
Is it possible
I think it is possible
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 06, 2014, 08:00 PM
Is not possible ?
I remember it was not possible in windows xp, but I think is possible in seven ......

 :-[
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 06, 2014, 08:02 PM
Finally I found the post . It seemed to me that I did this question before :

https://www.donationcoder.com/forum/index.php?topic=31439

I continue investigating
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: mouser on February 07, 2014, 11:20 AM
Check out also FileMenuTools: http://www.lopesoft.com/en/filemenutools

Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Curt on February 07, 2014, 05:01 PM
Finally I found the post . It seemed to me that I did this question before : https://www.donationcoder.com/forum/index.php?topic=31439

-back then the answer was Notepad++.
What has changed, if Notepad++ no longer is the answer?

Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 07, 2014, 06:38 PM
Check out also FileMenuTools: http://www.lopesoft.com/en/filemenutools



I think is the past i renounce to this target because using a more powerful script to create even list of txt files in a folder with the hotkey win+y.
I am using filemenu tools for years, now in seven.
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 07, 2014, 06:41 PM
Finally I found the post . It seemed to me that I did this question before : https://www.donationcoder.com/forum/index.php?topic=31439

-back then the answer was Notepad++.
What has changed, if Notepad++ no longer is the answer?



I don't understand what you are trying to tell me. But I have to understand.
At the present moment when i open a txt file does with pspad. It's the default. But I use notepad++ too.
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 07, 2014, 06:47 PM
I am trying with filemenu tools.
Seems easy, but I don't know how to put in the parameters to create a new empty notepad++
I only open the program.
How can i do that ?
 :-*

P.D. I will explore the submenus, specially the new submenu for ideas...... meanwhile....
 :P
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 07, 2014, 06:52 PM
really i am lost. I don't discover exactly the structure or operation way or configuration of the program. I don't know the structure indeed. I don't know how to locate any icon present in the contextual menu.

Except those properly from lopesoft......

Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 07, 2014, 07:10 PM
I think i need the line from the command line to create an empty notepad++ txt file
 :-*

Running to try
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 12, 2014, 07:48 PM
I am here after a little virus on my pc, but I haven't discovered how to add that entry.

Some help '

 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 15, 2014, 07:26 PM
Ejem.
I need a little "rempujoncito" with this post to create the option in the contextual menu
How can i finally create ?
 ;D
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 17, 2014, 01:56 PM
I put two screenshots of my attemps until this moment :

How can i propose a new empty txt file ?
what i am doing is launche notepad++  .......

 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 19, 2014, 06:29 AM
Probably is a question of arguments in the corrresponding line, but how can i do that.
It's like propose a command from the command line i think
Best Regards
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 21, 2014, 06:23 AM
Is the main menu also a folder ?
likes the sendto folder ? C:\Users\JOSE\AppData\Roaming\Microsoft\Windows\SendTo
Can i do something ?
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Curt on February 21, 2014, 10:26 AM
I forgot the question.

Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: MilesAhead on February 21, 2014, 03:33 PM
http://www.techrepublic.com/article/techrepublic-tutorial-add-file-types-to-windows-new-command-menu/

At least in AutoIt and AHK they use the name Template.au3 or .ahk.  I think you can do the same with a text file.  Have it start with some default text.  But I think you have to put the name of the template file in the reg key.  For example C:\Windows\ShellNew\Template.txt

I tried just creating that file with some text in it.  Didn't work.  So it must need the registry key.
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: tomos on February 21, 2014, 03:47 PM
Did you get Dopus that time Contro (I know you gave it a trial), or are you using Windows Explorer?
(I ask cause, AFAIK, it's easy to add to Dopus context menu)
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 22, 2014, 08:01 PM
I am using windows explorer tomos. I am very used to addons collected along the years and adapted when change system.

At the present moment i prefer to try with a explorer related tool.

continue trying with lopesoft.

Do you know if exist a forum of this tool ?

Best Regards
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 22, 2014, 08:03 PM
It must be easy. Some day i will get.
I note down this post to not forget.
 :P
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: lanux128 on February 22, 2014, 08:28 PM
have you tried running this command via a batch file? fsutil file [createnew]

• https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: MilesAhead on February 23, 2014, 07:54 AM
Ok.  I already had Text File in New menu.  Here's what I did to get a template file.

This key
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt\ShellNew

I added a new string named FileName and for value Template.txt


In the folder C:\Windows\ShellNew I made a file named Template.txt.  The contents is:
This is a text file template.

Now if I right click the desktop or in a folder, select New text document, name it, then double click, it has the text from the template.

One thing I notice I can't do it directly under C:\

It has to be in a folder.  The permissions situation with W8 seems even worse than W7 now.  Every move is hamstrung. I can't even save a file from Editpad directly into C:\Windows\ShellNew.  I have to save it somewhere else, then drag it.  Really asinine.

Anyway, I hope the template text default was what you were interested in.  If not then, Never Mind.  :)
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 08:17 AM
have you tried running this command via a batch file? fsutil file [createnew]

• https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx
Running to try inmediately.
Best Regards
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 08:26 AM
have you tried running this command via a batch file? fsutil file [createnew]

• https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx
Running to try inmediately.
Best Regards
 :-*

Seems a very powerful tool.
Have you tried really ?
I don't the command and is for windows 7-64

Best Regards
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 08:27 AM
Ok.  I already had Text File in New menu.  Here's what I did to get a template file.

This key
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt\ShellNew

I added a new string named FileName and for value Template.txt


In the folder C:\Windows\ShellNew I made a file named Template.txt.  The contents is:
This is a text file template.

Now if I right click the desktop or in a folder, select New text document, name it, then double click, it has the text from the template.

One thing I notice I can't do it directly under C:\

It has to be in a folder.  The permissions situation with W8 seems even worse than W7 now.  Every move is hamstrung. I can't even save a file from Editpad directly into C:\Windows\ShellNew.  I have to save it somewhere else, then drag it.  Really asinine.

Anyway, I hope the template text default was what you were interested in.  If not then, Never Mind.  :)

Seems easy for me. Running to try and will comment.

Best Regards
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 08:29 AM
Miles only hopes is a new entry in the main contextual menu, not in the new submenu of the main contextual menu......

 :-[
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 08:31 AM
Really asinine

I prefer to wait to you. Seems an annoying solution by your words. And not for the main contextual menu.
 :-[
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: MilesAhead on February 23, 2014, 08:49 AM
Ok.  Let me get it straight.  You right click an empty space on desktop or folder and the command is in the menu?  Or you right click on a file and the command is there?  It would seem more logical to do the former if making new files.
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 08:58 AM
Ok.  Let me get it straight.  You right click an empty space on desktop or folder and the command is in the menu?  Or you right click on a file and the command is there?  It would seem more logical to do the former if making new files.

Yes, the former Miles.
Create a new txt file just clicking right in an empty space of the desktop or any windows explorer folder .
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: MilesAhead on February 23, 2014, 09:00 AM
Ok.  After the text file is created do you want to open it in an editor or just double click to open?
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 09:04 AM
Ok.  After the text file is created do you want to open it in an editor or just double click to open?

Just double click to open. the same behaviour like in the "new" secondary contextual menu.
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: MilesAhead on February 23, 2014, 11:36 AM
This ahk should do it.

Sendmode,input
Click,Right
Send,w
Sleep,200
Send,t

Compile it to exe.. maybe NewTextFile.exe.
In RegEdit go to
HKEY_CLASSES_ROOT\Directory\shell
create a key
New Text File
under that create a key
command

for default value put path to NewTextFile.exe
example C:\Utils\NewTextFile.exe

Since there is no window it should not block the mouse.  It's just a macro to right click to open menu, then sends 'w' and then 't'  the system does the rest.  It's just opening the New submenu.
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 01:06 PM
This ahk should do it.

Sendmode,input
Click,Right
Send,w
Sleep,200
Send,t

Compile it to exe.. maybe NewTextFile.exe.
In RegEdit go to
HKEY_CLASSES_ROOT\Directory\shell
create a key
New Text File
under that create a key
command

for default value put path to NewTextFile.exe
example C:\Utils\NewTextFile.exe

Since there is no window it should not block the mouse.  It's just a macro to right click to open menu, then sends 'w' and then 't'  the system does the rest.  It's just opening the New submenu.

I don't understand all the concept, but I will try and comment.
Best Regards
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 01:15 PM
Ejem. The concept is clear after analyze. Applying
 :-[ :tellme:
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: MilesAhead on February 23, 2014, 04:36 PM
Ejem. The concept is clear after analyze. Applying
 :-[ :tellme:

You don't have to go the macro route.  But I figured the mechanism is there and you don't have to mess with temp filename stuff.  Plus newer versions of Windows are finicky about creating files.  You could use a program that just calls CreateFile() but it may need to be run as administrator.
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 04:43 PM
Applied.
Nothing happen after multiple proofs.

I will revise everything trying to determine what i am doing bad

the code i use :

Code: Autohotkey [Select]
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. #Warn  ; Recommended for catching common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5. Click,Right
  6. Sleep,200
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 04:46 PM
Ejem. The concept is clear after analyze. Applying
 :-[ :tellme:

You don't have to go the macro route.  But I figured the mechanism is there and you don't have to mess with temp filename stuff.  Plus newer versions of Windows are finicky about creating files.  You could use a program that just calls CreateFile() but it may need to be run as administrator.

I have several utilities to generate one or more empty txt files in a folder. so the purpose now is create with the contextual menu. But I think you are right. Is only create a new empty txt file with an entry in the main contextual menu.

How can i do that ?
Or what am i doing bad in the prior script ?

Best Regards
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 04:48 PM
By the way i have initial problems with compilers.

One of my compilers don't go well.
Where is the official version of Autohotkey_L ?

Best Regards
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Curt on February 23, 2014, 05:00 PM
Lexikos / AutoHotkey_L
Continuation of Chris Mallett's AutoHotkey, by Lexikos. https://github.com/Lexikos (https://github.com/Lexikos)
Don't know where to start or how to fix your script? Join the friendly AutoHotkey community (http://ahkscript.org/boards/) and ask for help.
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 05:15 PM
Lexikos / AutoHotkey_L
Continuation of Chris Mallett's AutoHotkey, by Lexikos. https://github.com/Lexikos (https://github.com/Lexikos)
Don't know where to start or how to fix your script? Join the friendly AutoHotkey community (http://ahkscript.org/boards/) and ask for help.

Thanks Curt
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 05:25 PM
First time i tried this : Compile_AHK.exe
Now I know the official version is ahk2exe.exe

Best Regards
I also has in the contextual menu working well.
 :-*
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: lanux128 on February 23, 2014, 07:49 PM
Seems a very powerful tool.
Have you tried really ?
I don't the command and is for windows 7-64

no idea why 'you don't the command'.. it works here in win 7 64-bit..

FSUTIL:
(http://i.imgur.com/zacOMop.png)

context menu:
(http://i.imgur.com/c2iSZbt.png)
Title: Re: create a new entry in the main contextual menu : a new txt file
Post by: Contro on February 23, 2014, 08:13 PM
Seems a very powerful tool.
Have you tried really ?
I don't the command and is for windows 7-64

no idea why 'you don't the command'.. it works here in win 7 64-bit..

FSUTIL:
(http://i.imgur.com/zacOMop.png)

context menu:
(http://i.imgur.com/c2iSZbt.png)

sorry. I don't know how to do that screenshot with fsutil.  :-[
What command and parameters do you use exactly ?
Best regards