Post

Replies

Boosts

Views

Activity

Where can I read the help for all Do Shell Script commands?
Where can I read the help for all Do Shell Script commands? For example, there is a "test" command. Which reference book mentions this command? I.e. I want to go to some website, all the Do Shell Script commands will be there, and among these commands I will find the "test" command. Or are there no such directories and the programmer should randomly find commands on the Internet on random sites?
5
0
743
May ’24
AppleScript, Do Shell. How do I write the "test" command to the "script editor"?
Hello. How to write this command correctly on a Macbook, in the script editor, so that I can click the "Run script" button and the script will give the result: if there is no folder, then report that there is no folder, if there is a folder, then report that the folder exists. do shell script "test -d 'Users/user/Desktop/New folder'" Now, if the folder exists, an empty string ("") is returned, if the folder does not exist, the script editor reports that an error has occurred. In general, my task is to write a script that checks the existence of a folder.
12
0
1k
May ’24
AppleScript Language Guide. open for access. The parameter is not specified in the syntax.
Here is the help for the "open for access" command. In the Syntax - Parameters section, the first parameter is not specified, but immediately write something in parentheses. In the "write" command, it is done differently. https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW31
1
0
539
Aug ’23
AppleScript. Split the string into parts by the separator character.
This code does not make sense, I would just like to get information based on it. set MyData to "MyData1|MyData2" on MyScript(MyData) set MyVar1 to "MyData1" set MyVar2 to "MyData2" return MyVar1 & "|" & MyVar2 end MyScript The text is passed in the code: "MyData1|MyData2". I need to divide it into two parts by the "|" symbol. And write each part into two variables: myVar1 and myVar2. How to do it? P.S. The problem is that only one parameter can be passed to on...end. I need to pass two. I'll pass one, then split it into two.
1
0
1.5k
Aug ’23
AppleScript. Tell application "TextEdit" - the syntax of all commands.
Where can I see the entire list of commands for the "TextEdit" program? For example, there is a code: tell application "TextEdit" activate make new document with properties {text:"XDXDXD"} end tell There are two commands in this code: activate make new document with properties {text:"XDXDXD"} Where can I see all the available commands for the "TextEdit" program?
2
0
771
Aug ’23
How to create an xml file in VBA?
How to create an xml file in VBA? The text can contain any characters: " (quotation mark), ' (apostrophe), etc. For example, in AppleScript, the printf, echo commands convert the source text: for example, ' (apostrophe) is deleted. It is necessary that the Mac does not convert anything at all, but writes to a file what it is given.
0
0
398
Aug ’23
How to create a UTF-8 encoded text file in VBA?
How to create a UTF-8 encoded text file in VBA? The text can contain any characters: " (quotation mark), ' (apostrophe), etc. For example, in AppleScript, the printf, echo commands convert the source text: for example, ' (apostrophe) is deleted. It is necessary that the Mac does not convert anything at all, but writes to a file what it is given.
0
0
369
Aug ’23