-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eugene / Dae
committed
Nov 23, 2014
0 parents
commit de8d394
Showing
4 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
APP_NAME="Force Paste.app" | ||
|
||
rm -rf "$APP_NAME" | ||
osacompile -o "$APP_NAME" -x "main.scpt" | ||
/usr/libexec/PlistBuddy -c "Add NSUIElement String 1" "$APP_NAME/Contents/Info.plist" | ||
/usr/libexec/PlistBuddy -c "Set CFBundleIconFile icon" "$APP_NAME/Contents/Info.plist" | ||
rm -f "$APP_NAME/Contents/Resources/applet.icns" | ||
cp "icon.icns" "$APP_NAME/Contents/Resources/" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
set numbers_key_codes to {29, 18, 19, 20, 21, 23, 22, 26, 28, 25} | ||
|
||
set input to do shell script "pbpaste" | ||
|
||
if (input is not missing value) then | ||
tell application "System Events" | ||
repeat with char in the characters of input | ||
try | ||
set test to char as number | ||
key code numbers_key_codes's item (char + 1) | ||
on error | ||
keystroke char | ||
end try | ||
end repeat | ||
end tell | ||
end if |