Posts

Post not yet marked as solved
0 Replies
151 Views
I'm working through Apple's SwiftUI tutorials. At one point it says: Experiment – Adjust the Dynamic Type slider in the Canvas Device Settings The Canvas Device Settings pop-up in Xcode doesn't show the Dynamic Type slider: How can I make the Dynamic Type slider visible ?
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
2 Replies
223 Views
I'm a beginner so please forgive my use of wrong terminology. I have been working through the Apple tutorial on SwiftUI. I tried to edit the PreviewProvider in "ContentView.swift" made a mistake and tried to revert back. I have checked that the code is now as it was when it worked. But, the code in that file is not showing the same as before – it has none of the colours which show that Xcode has parsed and checked the code. Thus, the canvas is not showing. The code looks like this: Nonetheless, the project builds and runs without error. How can I make Xcode parse a file and thus show the canvas ?
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
0 Replies
413 Views
I am trying to import an Automator workflow into the Shortcuts app. I have tried all the methods [suggested by Apple] but all fail with this error: I have copied the workflow to various folders and tried again with the same result. Is this a permissions issue ? I'm on macOS 14.1 Sonoma with Shortcuts 7.0.
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
1 Replies
689 Views
On wake from sleep the Mac Studio's Desktop picture is shown in actual resolution instead of stretched to fit screen. For example, a picture which is 2059 × 1371 is shown at that resolution on a 5K Retina screen and so only fills about 60% of the screen area. It starts with the picture positioned in the top left corner but sometimes moves down the screen. This behaviour does not change if the screen is scaled up or down – the picture size is also scaled. Notice that icons on the Desktop are displayed in the correct position. At the same time, the Dock is shown at the bottom of the picture instead of at the bottom of the screen. Usually, the Desktop redisplays correctly. But increasingly, the only solution is to log out and in again. This might be related to my other question on the Desktop picture Pref Pane. See attached example which is a full screen capture i.e. command-shift-3 (with my personal details obscured):
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
0 Replies
443 Views
According to the Shortcuts User Guide, the following command should sign a shortcut: shortcuts sign --mode anyone --input "Share me.shortcut" --output "Share me signed.shortcut" I have tried that formulation but get this error: Error: The file couldn’t be opened because it isn’t in the correct format. So, I tried to sign an exported shortcut: shortcuts sign --mode anyone --input /Users/[Home]/Test.shortcut --output /Users/[Home]/Test-signed.shortcut That returns nothing suggesting there was no error. But codesign says: /Users/[Home]/Test-signed.shortcut: code object is not signed at all Is code signing working for shortcuts ? Is there a way to sign a shortcut ?
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
2 Replies
589 Views
I would like to distribute a Shortcut with my AppleScript applet (currently the work is done by an Automator Service). I have two questions: Is it possible to automate the installation for users ? It seems that the only way a shortcut can be installed is via the Shortcuts app. So, when they ask for the Shortcut to be installed, the app must be opened and then users have to respond to the install shortcut dialog and, at least, click on "Add Shortcut". Can that process be automated ? A shortcut can be run from a URL, which is very useful. The URL looks like this: shortcuts://run-shortcut?name=[name of shortcut] However, running a shortcut from a URL always opens the Shortcuts app before running the shortcut. This breaks my code which is expecting a web browser to be active. Is there a way of using at the shortcuts URL scheme run the shortcut in place i.e. without opening the shortcuts app ? Or, can the URL scheme be used to call the Shortcuts Event app ? Thanks.
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
3 Replies
1.2k Views
I am trying to submit my AppleScript applet for notarization. My applet is code signed using my developer id. I have stored an app-specific password in my logins keychain with the correct name and account. My developer id is not connected with multiple teams. I tried this on the command line: xcrun notarytool submit "/Users/[home]/Desktop/[applet].zip" --keychain-profile "[name]" --wait The response, very quickly, was: "Error: No Keychain password item found for profile: [name]". Is something else needed to enable notarytool to find the Keychain login item ? Thanks.
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
0 Replies
585 Views
SOLVED I want to parse some plain text and pull out the 11th and 13th words. I can't get it to work because "text item delimiters" sometimes treats additional characters as delimiters. set test_text to "one two three four five six seven eight nine ten elev-en twelve thir-teen" set AppleScript's text item delimiters to "" set AppleScript's text item delimiters to {" "} set word_11 to word 11 of test_text set word_12 to word 12 of test_text set word_13 to word 13 of test_text set word_14 to word 14 of test_text set word_15 to word 15 of test_text set AppleScript's text item delimiters to "" log word_11 & " " & word_12 & " " & word_13 & " " & word_14 & " " & word_15 The result is: (elev en twelve thir teen) But the result should be an error – it should NOT be using the hyphen as a delimiter. Why is the hyphen being used as a delimiter ? UPDATE: Because I should be using "text item" instead of "word"
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
2 Replies
515 Views
Documentation says: BoxType.primary Specifies the primary box appearance. BoxType.separator Specifies that the box is a separator. Nice, but what does it mean ? What does a "primary" box look like ? How is it different to a "secondary" box ? I have tried both forms (in ASOC) and they look the same. So, is there a difference in how they look ? Thanks.
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
4 Replies
931 Views
Ventura 12.3 seems to have broken part of my Applescript applet – it no longer hides reliably. Previously pressing command-h or choosing the app menu=>Hide [applet] would cause the applet to hide. This has been working for over 5 years. Now, sometimes, the applet does not hide – instead it just loses the focus. Then, clicking on the applet does not give it the focus – but clicking on the titlebar does. But, often, the applet hides normally. I can't find a pattern except it might make a difference if hiding the applet would shift focus to Finder. If this is due to an announced change in Ventura can someone point me to the documentation ? Otherwise, what could be going on ? Thanks.
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
4 Replies
1.5k Views
My Apple ID a member of the Apple Developer Program. So, Software Update shows that I can install Ventura 13.1 beta 2 which is fine. I want to install the Ventura 13.0.1 update. But, Software Update does not show the 13.0.1 update (see capture). Is there a way to force Software Update to show production updates as well as beta versions ? Thanks.
Posted
by Crudgle.
Last updated
.
Post not yet marked as solved
0 Replies
1.3k Views
I have a plain text file saved to my Desktop the result of an earlier script. I have a simple AppleScript telling Finder to open the text file: set open_this to (path to desktop as text) & "Test.txt" tell application "Finder" to open alias open_this This results in the error: "The document "Test.txt" could not be opened. You don't have permission. To view or change permissions, select the item in the Finder and choose File > Get Info." Weirdly, if I duplicate the text file and tell Finder to open it I get: "Finder got an error: Handler can’t handle objects of this class." I've check permissions on the file and they look normal – my user account has read & write permission. I have given "Full Disk Access" to Script Debugger, my AppleScript IDE. This was a known bug in macOS 12.3/12.3.1 and I thought it has been fixed in 12.4 when I tested the beta. But, it is definitely a bug in macOS 12.4. Does anyone have a way in AppleScript of telling Finder to open a file ?
Posted
by Crudgle.
Last updated
.
Post marked as solved
1 Replies
1.4k Views
When I select a picture in the Desktop picture pref pane, the pane shifts its display up about 15% and so crops off the top 15% of its area. This is on a Mac Studio Max running macOS 12.3.1. This does not occur on a late 2015 iMac using the same desktop picture files and also running 12.3.1. See attached example:
Posted
by Crudgle.
Last updated
.
Post marked as solved
9 Replies
2.1k Views
My AppleScript applet has a user guide in its resources folder. The guide is in PDF format. To show the guide, my applet has this code: set path_to_Applet_alias to path to me as alias set help_file to (path to resource "Help.pdf" in bundle path_to_Applet_alias) as string tell application "Finder" open file help_file end tell That code works. The applet is localised for a few languages. When I set the language in my applet to another language, e.g. French, that code punches an error: "The application "Preview" can't be opened" -1703 According to Apple, the "-1703" error means "The wrong data type was detected". But, the data type hasn't changed. I suspect something is going on with the translation but, I can't figure out what. Any ideas ?
Posted
by Crudgle.
Last updated
.
Post marked as solved
4 Replies
1k Views
My AppleScript applet is localized for French, German, Italian and Spanish. The applet displays text in the correct language if the preferred language is changed in the "General" pane of the Language & Region preferences. That is, the applet correctly works in all four languages. However, the "Apps" pane shows Spanish, German and Italian but, does not show French. For example: Why would the "Apps" pane not show all languages for which the applet is localized ? Thanks late 2015 iMac 27", macOS 12.2.1
Posted
by Crudgle.
Last updated
.