Watch File Download Progress Easily in Mac OS X from. Shows the progress of files being. On the Mac will show you a progress bar. May 5, 2018 - 1 Ada; 2 AutoHotkey; 3 AWK; 4 BASIC; 5 BBC BASIC; 6 C; 7 C++; 8 C#; 9 Clojure. Copy the temporary file back over the source file. I'm a completely noob when it comes to AutoHotkey scripts, the limit of my knoweldge is opening a folder with a key combination. There's one Mac feature that I've always been envious of, the spacebar-to-open-a-file feature (I think it's called Preview). Is it possible to set up an AutoHotkey script to open a file with a certain program? Specifically, I'd like to be able to press ctrl+enter and open files with Picasa Photo Viewer (obviously this isn't quite as advanced as Preview, but most of what I want to preview are PSD files anyway). The Photoviewer's exe is located here with a default install: C: Program Files (x86) Google Picasa3 PicasaPhotoViewer.exe Thanks! EDIT: I've found this, but it doesn't fit my needs entirely. I need to be able to have a file selected in Windows Explorer and just press ctrl+enter to open the selected file. Run, wordpad my.txt. AutoHotkey doesn't interface with Windows Explorer. However, we can use the clipboard to overcome this. The script ^Enter:: Backup:= ClipboardAll Clipboard = SendPlay, ^c ClipWait, 1 Type:= FileExist(Clipboard) If Type = A Run, 'C: Program Files (x86) Google Picasa3 PicasaPhotoViewer.exe'%Clipboard% Clipboard:= Backup return Hot it works • ^Enter:. Return specifies the hotkey, where ^ is Ctrl and Enter is Enter. If it's pressed. Gets executed. • Backup:= ClipboardAll backs up all data stored in the clipboard ( All also includes non-text data like, e.g., screenshots). • Clipboard = clears the clipboard, so we can check when something gets copied to it. • SendPlay, ^c simulates pressing the key combination Ctrl + C to copy the current file to the clipboard. As a result, the variable Clipboard now hold the file's name. • ClipWait, 1 waits for up to one second for the clipboard to contain any data. • Type:= FileExist(Clipboard) and If Type = A check if the clipboard's content points to an actual file. • Run, 'C: Program Files (x86) Google Picasa3 PicasaPhotoViewer.exe'%Clipboard% opens the selected file in Picasa. • Clipboard:= Backup restores the inital clipboard data. If you copy a file in Explorer the paste options via mouse (right-click) and keyboard (menu and/or ctrl+v) aren't even available in Notepad2--as far as I can tell--which me thinks makes item 2 a moot point. I use a different shortcut key to execute shell code that grabs the full path and/or filename of whatever file was selected last in Explorer. Not exactly what you reference, but doesn't rely on intercepting paste or messing with the clipboard. If you've clicked on a file and copied it without clicking on another file then you can use Shell.Application windows and paste the path – May 10 '16 at 6:29 •. Try this: #If WinActive('ahk_class CabinetWClass') && WinExist('ahk_class Notepad2U'); select a file in explorer and press F1 to copy the path and paste it in Notepad2. F1:: ClipSaved:= ClipboardAll; Save the entire clipboard to the variable ClipSaved clipboard:= '; empty clipboard Send, ^c; copy the selected file ClipWait, 1; wait for the clipboard to contain data if (!ErrorLevel); If NOT ErrorLevel clipwait found data on the clipboard clipboard:= clipboard; convert to text (= copy the path) Sleep, 300; MsgBox,%clipboard%; display the path WinActivate, ahk_class Notepad2U WinWaitActive, ahk_class Notepad2U Send, ^v; paste the path clipboard:= ClipSaved; restore original clipboard return #If.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2019
Categories |