Тёмный

AppleScript Tutorial : Variables 

ClickingKeys
Подписаться 1,2 тыс.
Просмотров 4,5 тыс.
50% 1

Learn how to AppleScript, Apple's built in automation platform. This video will give a brief overview of variables and variable scope.
For more AppleScript tutorial videos, check out this play list.
• Learn to AppleScript (...
If you're interested in watching full scripts being written, have a look at this play list.
• AppleScript Project Ex...

Хобби

Опубликовано:

 

19 ноя 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 13   
@razvanmihai4884
@razvanmihai4884 2 года назад
Thanks for the great video. Quick question on the principles of implementing Applescripts automations: When trying to implement a simple system-wide AppleScript via Automator/Shortcuts, e.g., inserting the current date and time, you need to give permission to any newly open application separately whenever the service is accessed. Sometimes the newly created service doesn’t work from the get-go unless you log out and log back in, which seems to help. It would be much appreciated if you could have a tutorial showing how to implement a simple automation action from top to bottom as a goal of putting the Applescript to good use. Thanks, and keep up the excellent work! Razvan
@ClickingKeys
@ClickingKeys 2 года назад
Hey Razvan, that’s a good point. I believe what you’re referring to has to do with the entitlements that Apple has added to MacOS. In my opinion they didn’t implement this idea very well as it’s not very reliable, but it does seem to be improving as we move into updates with Big Sur. I can try and cover some of this in a future video, at least the steps I take to try and get things to function as expected.
@Bronze-td8jq
@Bronze-td8jq Год назад
Hello, thank you for this video. How can I create a variable to hold a name of a file so that I can use that variable elsewhere (like within a block that tells Photoshop)? Thank you for your help.
@ClickingKeys
@ClickingKeys Год назад
set filePath to “Macintosh HD:Users:youraccount:Desktop:sample.tif” set theName to name of (info for (filePath as alias))
@tfarfolini9742
@tfarfolini9742 Год назад
Hi I need help. I am new to mac. I declare a variable (It counts a folders and adds +1) and I use it for naming a new folder, but when I try to create a subfolder in my new folder: make new folder at folder "myVarible" of folder „TODO" of disk "_NEW" with properties {name:”temp"} I got error. When I close the quote this is not variable (green) any more... When I get rid of quote the script doesn't work because the name needs to be in quote. How to do that? Is it possible? I tried lot of &\\" with no sucess :(
@ClickingKeys
@ClickingKeys Год назад
Hello T Farfolini, when you want to use a variable it cannot have quotes around it. Also, it looks like you’re trying to use the variable myVarible as an existing folder name, and put a new folder named “temp” inside it, is that correct? Or are you trying to create a folder with the name that’s in myVarible? This is the path you are trying to create with the sample of code you shared… _NEW:TODO:myVarible:temp:
@tfarfolini9742
@tfarfolini9742 Год назад
@@ClickingKeys Thanks for reply :) I want to write the script which counts folders in catalog, creates new folder with number +1 (I already have almost 7000 of folder with jobs for this client), creates subfolder with current date and name which I provide in form. It seems to work, well, almost :) first problem is naming subfolder and the second is how to add a name and date to the name of the folder at the same time. This is my whole code: tell application „Finder" activate set myCount to 6801 + (count (folders of folder "OZ" of disk "_NEW”)) make new folder at folder "OZ" of disk "_NEW" with properties {name:"temp”} tell application "Finder" to open "_NEW:OZ:temp” set name of folder "temp" of folder "OZ" of disk "_NEW" to myCount set myName to text returned of (display dialog „Name:" default answer „Name”) set myTime to (do shell script "date +\"%D\”") make new folder at folder „myCount" of folder "OZ" of disk „_NEW" with properties {name:”temp2”} set name of folder „temp2" of folder „myCount" of folder "OZ" of disk "_NEW" to myTime end tell
@Foolimp
@Foolimp 5 месяцев назад
uhh what about variable numbers that go down every time
@ClickingKeys
@ClickingKeys 5 месяцев назад
Hey Foolimp! I’m not sure I understand your question. If you can try and clarify what you’re asking, I would be happy to help.
@Foolimp
@Foolimp 5 месяцев назад
well its like, uhh that you can do a repeat loops that the variable number goes down like that it subtracts one every time it repeats @@ClickingKeys
@zhouyu9971
@zhouyu9971 Год назад
Unless it’s a list?
@ClickingKeys
@ClickingKeys Год назад
Hey zhou, I’m not sure I know what you’re asking. What do you mean “unless it’s a list?”
@zhouyu9971
@zhouyu9971 Год назад
@@ClickingKeys i mean it’s a veritable and can hold up more than one value😂 but never mind. I like your video
Далее
AppleScript Tutorial : Data Types
11:34
Просмотров 3,9 тыс.
AppleScript Tutorial : First Script
9:52
Просмотров 11 тыс.
ХЕРЕЙД БОИТСЯ МОЕЙ СОБАКИ!
37:08
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Просмотров 9 млн
AppleScript Tutorial : Error Handling
6:56
Просмотров 1,7 тыс.
An introduction to Apple Script for Noobs
19:39
Просмотров 78 тыс.
AppleScript Tutorial : Handlers (aka Functions)
5:21
Просмотров 3,6 тыс.
Vim Tips I Wish I Knew Earlier
23:00
Просмотров 42 тыс.
Designing Billions of Circuits with Code
12:11
Просмотров 581 тыс.
Why Developers Are OBSESSED With Obsidian
11:26
Просмотров 40 тыс.
AppleScript Tutorial : Alias, HFS & POSIX - OH MY!
4:23
Who has won ?? 😀 #shortvideo #lizzyisaeva
0:24
Просмотров 22 млн