Skip to content

Commit

Permalink
Fix 'uo' command to work with renamed app under Ulysses 12
Browse files Browse the repository at this point in the history
  • Loading branch information
robwalton committed Dec 17, 2017
1 parent 64cf6d0 commit d212ca3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 53 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ To install, download a released Ulysses.alfredworkflow and double-click to open

## Versions

**1.0.2**
- Fixed 'uo' command to work with renamed UlyssesMac application name under Ulysses 12 update

**1.0.1**
- Fixed displayName KeyError exception that **completely broke the workflow with Ulysses 12 update**
- Fixed an older issue with 'un' command
Expand Down
93 changes: 40 additions & 53 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,6 @@
<false/>
</dict>
</array>
<key>4D3DEADF-FC0D-4085-ACA7-3A1CCE6865A9</key>
<array>
<dict>
<key>destinationuid</key>
<string>31247F5F-C0FC-46BB-AEEB-33B53A0EA869</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
<key>vitoclose</key>
<false/>
</dict>
</array>
<key>51639D3C-CF18-491E-846B-4C6771C1CFA5</key>
<array>
<dict>
Expand Down Expand Up @@ -379,7 +366,7 @@
<array>
<dict>
<key>destinationuid</key>
<string>4D3DEADF-FC0D-4085-ACA7-3A1CCE6865A9</string>
<string>31247F5F-C0FC-46BB-AEEB-33B53A0EA869</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
Expand Down Expand Up @@ -645,6 +632,10 @@ ulysses_view.set_view_setting("group", view_to_set)</string>
<dict>
<key>alfredfiltersresults</key>
<true/>
<key>alfredfiltersresultsmatchmode</key>
<integer>0</integer>
<key>argumenttrimmode</key>
<integer>0</integer>
<key>argumenttype</key>
<integer>1</integer>
<key>escaping</key>
Expand Down Expand Up @@ -689,6 +680,10 @@ ulysses_view.set_view_setting("group", view_to_set)</string>
<dict>
<key>alfredfiltersresults</key>
<true/>
<key>alfredfiltersresultsmatchmode</key>
<integer>0</integer>
<key>argumenttrimmode</key>
<integer>0</integer>
<key>argumenttype</key>
<integer>1</integer>
<key>escaping</key>
Expand Down Expand Up @@ -754,23 +749,6 @@ ulysses_view.set_view_setting("sheet", view_to_set)</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>keychar</key>
<string>o</string>
<key>keycode</key>
<integer>-1</integer>
<key>keymod</key>
<integer>1048576</integer>
</dict>
<key>type</key>
<string>alfred.workflow.output.dispatchkeycombo</string>
<key>uid</key>
<string>4D3DEADF-FC0D-4085-ACA7-3A1CCE6865A9</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -801,19 +779,15 @@ ulysses_view.set_view_setting("sheet", view_to_set)</string>
<integer>68</integer>
<key>script</key>
<string>on run argv
set theQuery to item 1 of argv
set ulyssesWasRunning to application "Ulysses" is running
if not ulyssesWasRunning
activate application "Ulysses"
--bring Ulysses to forground starting if necessary activate application "UlyssesMac" --Ulysses takes a while to open its main window even after it has started. --So loop until its in the forground: repeat while getFrontmostApplicationName() is not "UlyssesMac" delay 0.2 end repeat tell application "System Events" keystroke "O" using command down end tell return theQuery
repeat until application "Ulysses" is running
delay .2
end repeat
end if
end run
return theQuery
end run</string>
on getFrontmostApplicationName() tell application "System Events" set frontApp to name of first application process whose frontmost is true end tell return frontAppend getFrontmostApplicationName</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
Expand Down Expand Up @@ -1030,6 +1004,10 @@ cat "$query"</string>
<dict>
<key>alfredfiltersresults</key>
<false/>
<key>alfredfiltersresultsmatchmode</key>
<integer>0</integer>
<key>argumenttrimmode</key>
<integer>0</integer>
<key>argumenttype</key>
<integer>1</integer>
<key>escaping</key>
Expand Down Expand Up @@ -1095,6 +1073,10 @@ cat "$query"</string>
<dict>
<key>alfredfiltersresults</key>
<false/>
<key>alfredfiltersresultsmatchmode</key>
<integer>0</integer>
<key>argumenttrimmode</key>
<integer>0</integer>
<key>argumenttype</key>
<integer>1</integer>
<key>escaping</key>
Expand Down Expand Up @@ -1165,6 +1147,8 @@ Allow Alfred access in the Accessibility section of the Privacy tab of your Mac'
<dict>
<key>config</key>
<dict>
<key>count</key>
<integer>1</integer>
<key>keychar</key>
<string>f</string>
<key>keycode</key>
Expand Down Expand Up @@ -1322,6 +1306,10 @@ sys.stdout.write(ulysses_view.get_view_setting(node_type))</string>
<dict>
<key>alfredfiltersresults</key>
<false/>
<key>alfredfiltersresultsmatchmode</key>
<integer>0</integer>
<key>argumenttrimmode</key>
<integer>0</integer>
<key>argumenttype</key>
<integer>1</integer>
<key>escaping</key>
Expand Down Expand Up @@ -1392,6 +1380,10 @@ sys.stdout.write(ulysses_view.get_view_setting(node_type))</string>
<dict>
<key>alfredfiltersresults</key>
<false/>
<key>alfredfiltersresultsmatchmode</key>
<integer>0</integer>
<key>argumenttrimmode</key>
<integer>0</integer>
<key>argumenttype</key>
<integer>1</integer>
<key>escaping</key>
Expand Down Expand Up @@ -1454,6 +1446,10 @@ sys.stdout.write(ulysses_view.get_view_setting(node_type))</string>
<dict>
<key>alfredfiltersresults</key>
<true/>
<key>alfredfiltersresultsmatchmode</key>
<integer>0</integer>
<key>argumenttrimmode</key>
<integer>0</integer>
<key>argumenttype</key>
<integer>1</integer>
<key>escaping</key>
Expand Down Expand Up @@ -1736,15 +1732,6 @@ create_new_sheet = true</string>
<key>ypos</key>
<integer>1160</integer>
</dict>
<key>4D3DEADF-FC0D-4085-ACA7-3A1CCE6865A9</key>
<dict>
<key>colorindex</key>
<integer>4</integer>
<key>xpos</key>
<integer>400</integer>
<key>ypos</key>
<integer>370</integer>
</dict>
<key>51639D3C-CF18-491E-846B-4C6771C1CFA5</key>
<dict>
<key>colorindex</key>
Expand Down Expand Up @@ -1935,7 +1922,7 @@ then highlight query in sheet</string>
<key>colorindex</key>
<integer>4</integer>
<key>note</key>
<string>Activate Ulyssis and wait until running</string>
<string>Activate Ulyssis and wait until running then send cmd-O</string>
<key>xpos</key>
<integer>210</integer>
<key>ypos</key>
Expand Down Expand Up @@ -2032,10 +2019,10 @@ then highlight query in sheet</string>
<key>variables</key>
<dict>
<key>SemVer</key>
<string>1.0</string>
<string>1.0.2</string>
</dict>
<key>version</key>
<string>1.0</string>
<string>1.0.2</string>
<key>webaddress</key>
<string>github.com/robwalton/alfred-ulysses-workflow</string>
</dict>
Expand Down

0 comments on commit d212ca3

Please sign in to comment.