mutleey Posted April 16, 2020 Share Posted April 16, 2020 Hello guys, I searched the web and found nothing about it. If pressing Ctrl+Shift+N will create a new folder, I would have to assign a key combination to create a .au3 file example Ctrl+Shift+3 Link to comment Share on other sites More sharing options...
Exit Posted April 16, 2020 Share Posted April 16, 2020 (edited) A free area on the desktop or in Explorer must be in focus. APPSKEY --> N --> A Appskey is a small icon depicting a pointer hovering above a menu, and it is typically found on the right side of the keyboard between the right Windows Logo Key and the right Control Key (or between the right Alt Key and the right Control Key). Edited April 16, 2020 by Exit mutleey 1 App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
mutleey Posted April 16, 2020 Author Share Posted April 16, 2020 Exit thanks for the answer, your recommendation was to create a shortcut and what I wanted to assign would not be that, the idea would be to create a combination to create .au3 in the same way that Ctrl+Shift+N does. Link to comment Share on other sites More sharing options...
Exit Posted April 16, 2020 Share Posted April 16, 2020 "Appskey> N> A" does not create a shortcut but a new file. A free area on the desktop or in Explorer must be in focus. mutleey 1 App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Nine Posted April 16, 2020 Share Posted April 16, 2020 As @Exit said, it will create a new file, but the problem is that the key sequence changes from one language to another. Also on some circumstances, you could have 2 shortcut keys in the popup menu. But you are lucky, I made some times ago this script, maybe you will like it : expandcollapse popup#NoTrayIcon #include <Constants.au3> #include <WinAPISysWin.au3> #include <File.au3> #include <WinAPIFiles.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> HotKeySet ("^+{END}", _Exit) HotKeySet ("^+a", _NewAu3) While True Sleep (100) WEnd Func _NewAu3 () Local $hWnd = WinGetHandle ("[ACTIVE]") Local $sClass = _WinAPI_GetClassName ($hWnd) Local $sCurrentDir, $sFileName Switch $sClass Case "Progman" $sCurrentDir = @DesktopDir Case "CabinetWClass" If Not ControlCommand ($hWnd, "", "Edit1", "IsVisible", "") Then ControlClick ($hWnd, "", "ToolbarWindow322", "left", 1, 10, 20) Sleep (800) EndIf $sCurrentDir = ControlGetText($hWnd, "", "Edit1") ConsoleWrite ($sCurrentDir & @CRLF) If Not FileExists($sCurrentDir) Then Return MsgBox ($MB_SYSTEMMODAL,"Error","Select one folder only") Case Else Return EndSwitch $sFileName = ShowGUI () If @error Then Return $sFileName = MakeUniqueFileName ($sCurrentDir & "\" & $sFileName) ConsoleWrite ($sFileName & @CRLF) If FileExists (@WindowsDir & "\ShellNew\Template.au3") Then ConsoleWrite ("Template exists" & @CRLF) FileCopy (@WindowsDir & "\ShellNew\Template.au3", $sFileName) Else _FileCreate ($sFileName) EndIf EndFunc Func _Exit () Exit EndFunc Func MakeUniqueFileName ($sFile) Local $sDrive, $sDir, $sFileName, $sExtension, $iCount = 1 _PathSplit ($sFile, $sDrive, $sDir, $sFileName, $sExtension) $sFile = $sFileName While FileExists ($sDrive & $sDir & $sFileName & $sExtension) $iCount += 1 $sFileName = $sFile & " (" & $iCount & ")" WEnd Return $sDrive & $sDir & $sFileName & $sExtension EndFunc Func ShowGUI () Local Const $NEW_AU3_NAME = ".au3" Local $hGUI = GUICreate("", 300, 65, -1, -1, $WS_BORDER+$WS_POPUP) GUISetBkColor (0xFF0000) Local $Label = GUICtrlCreateLabel("FileName", 18, 24, 60, 17) GUICtrlSetColor (-1, 0xFFFFFF) GUICtrlSetFont (-1, 10) Local $Input = GUICtrlCreateInput("", 85, 22, 193, 21) GUISetState(@SW_SHOW) ControlSetText($hGUI, "", $Input, $NEW_AU3_NAME) Local $sFile While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete () Return SetError (1) Case $Input $sFile = GUICtrlRead ($Input) If StringLeft ($sFile, 1) = "." Then ContinueLoop GUIDelete () Return $sFile EndSwitch WEnd EndFunc mutleey 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
mutleey Posted April 16, 2020 Author Share Posted April 16, 2020 Exit my language is Brazilian Portuguese so here the keys have changed, in my case it would be "Appskey> V> A" .. Nine I will use your script for now and research if I can directly assign the combination .. thanks for now Link to comment Share on other sites More sharing options...
Nine Posted April 16, 2020 Share Posted April 16, 2020 1 hour ago, mutleey said: and research if I can directly assign the combination Don't loose your time. Do not search for Windows to do it, as you will not find anything. My solution is probably the best you can find. mutleey 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
mutleey Posted April 16, 2020 Author Share Posted April 16, 2020 Yes I will do that, thanks for the help !! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now