Skip to content

Commit

Permalink
added swift code
Browse files Browse the repository at this point in the history
  • Loading branch information
luckman212 committed Sep 23, 2023
1 parent 129b083 commit 75fcd1f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions read_wfobj_from_pasteboard.swift
@@ -0,0 +1,10 @@
import Cocoa

let pasteboard = NSPasteboard.general
let customType = NSPasteboard.PasteboardType(rawValue: "com.runningwithcrayons.alfred.workflow.editor.prefab")

if let data = pasteboard.data(forType: customType) {
if let str = String(data: data, encoding: .utf8) {
print(str)
}
}

0 comments on commit 75fcd1f

Please sign in to comment.