Registering a Textfile & Later Easy Access

Registering a Textfile & Later Easy Access

for later easy access of any textfile

Sometimes when I have downloaded a textfile I want to ’register’ this textfile (F ex ”texts to read soon”) for later easy access. Regarding the ”H” see below fn3.

Saving the path and the file name

The steps are simple enough:

  1. Download a new textfile (rtf) or find an existing textfile on the computer.

  2. Select then Copy path with ( H - 0 ) [fn1]

  3. In DT3 select file and ^⌥⌘C

  4. Paste to save the info (path & file name) in a dedicated ’register’ (also a text file (rtf))

Later, at any given time, looking through the register (of interesting texts)

  1. Select the path (of any textfile)

  2. open it with the trigger ( H - 9 ) [fn2] with the default application.


fn1

Here using Chris Stone’s AppleScript [ Get Path01 w AScr ]

    ------------------------------------------------------------------------------------------
- Auth: Christopher Stone
- dCre: 2010-10-06 : 06:43
- dMod: 2014-01-24 : 08:03
- Appl: Finder
- Task: Get posix path of selected items and copy to clipboard
- Osax: None 
- Tags: @Applescript, @Finder, @Posix, @Path, @Selection
------------------------------------------------------------------------------------------

    try
	
	tell application "Finder"
		set _sel to selection as alias list
	end tell
	
	if length of _sel > 0 then
		repeat with ndx in _sel
			set ndx's contents to POSIX path of ndx
		end repeat
		set AppleScript's text item delimiters to linefeed
		set _sel to _sel as string
		set the clipboard to _sel
	end if
	
    on error e number n
	stdErr(e, n, true, true) of me
    end try

-------------------------------------------------------------------------------------------
    --» HANDLERS
-------------------------------------------------------------------------------------------
    on stdErr(e, n, beepFlag, ddFlag)
	set e to e & return & return & "Num: " & n
	if beepFlag = true then
		beep
	end if
	if ddFlag = true then
		tell me
			set dDlg to display dialog e with title "ERROR!" buttons {"Cancel", "Copy", "OK"} default button "OK"
		end tell
		if button returned of dDlg = "Copy" then set the clipboard to e
	else
		return e
	end if
    end stdErr
-------------------------------------------------------------------------------------------

fn2

2 tasks

a.)
Copy to Named Clipboard “Default Clipboard”

b.)
Open “%SystemClipboard%”

Actions (v9.0.4)

Keyboard Maestro Actions.kmactions (689 B)


fn3

A Hyperkey “H” in my case is set to ⇧ ⌃ ⌥ ⌘ {then any letter or number}
So H - 0 is the Hyperkey and the 0 (zero).

/

with best regards, Omar KN, Stockholm, Sweden

Omar, thanks for sharing.

But I'm not sure of your intent, since you did not attach a Macro, but you posted to the "Macro Library" sub-forum.

So, I'm changing the sub-forum to "Questions..." for now. If you attach a macro, you can change it back to "Macro Library"

Did you have any questions?

Also, please use the Forum Code Block with "applescript" as the language when you post an AppleScript. I have revised your post to use this.

Hi and good day JMichael,

Now added a macro, but how to move it to another category?

/

with best regards, Omar KN, Stockholm, Sweden

Unfortunately you added it as a set of "Actions", NOT as the complete Macro.
Please revise to upload the complete Macro. Select the Maco, in the "Macros" list column, then upload. See how to upload your macro .

There is no complete Macro, only a set of “Actions”.

/
with best regards, Omar KN, Stockholm, Sweden