ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Create an empty txt file in the active window

<< < (5/5)

Contro:
Now I understand why in the script you propose the hotkey too.
I have a program to control the hotkeys that is resident. So I only need the code

1. Open a selection list
2. With the selected item create a txt file in the active window .

 :-*

Contro:
I have received help from dylan904


--- ---#SingleInstance Force

#if winactive("ahk_class CabinetWClass")
{
  ^!z::
  WinGet, WinID, ID, A
  ControlGetText, DesPath, Edit1, ahk_id %WinID%
  Gui, Add, ListView, r10 NoSort gChoose vChosenName, File Name
  For A,B in {1:"File1.txt",2:"File2.txt",3:"File3.txt",4:"File4.txt",5:"File5.txt",6:"File6.txt",7:"File7.txt",8:"File8.txt",9:"File9.txt",10:"File10.txt"}
    LV_Add("",B)
  Gui, Show,, Choose File Name
  Return
 
  Choose:
  LV_GetText(ChosenName, A_EventInfo)
  Gui, Destroy
  FileAppend,, %DesPath%\%ChosenName%
  Sleep, 850
  While (ClipBoard != DesPath "\" ChosenName)
  {
    Send, % SubStr(ChosenName, 1, 1)
    Sleep, 15
    SendInput, ^c
    Sleep, 15
  }
  Return
}

Goes well. Rarely fails, but his author tells :
"To the extent of my knowledge, Windows Explorer is not very easy to manipulate.
But you may use something like this, you can use an .ini instead, but for now i just used a general list of file names to choose from (Control+Alt+z to activate)..."

 :-*

Now I am considering the possibility of insert date/time in the name of the txt file.
I supposed I have to use a system memory variable and propose in the name of the txt file.
For me is enough to edit the ahk file.

 :P

Navigation

[0] Message Index

[*] Previous page

Go to full version