Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Automator & AppleScript

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> General Programming
General Programming  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Mar 04, 2007 8:26 pm    Post subject: Automator & AppleScript Reply with quote

Digg: Forget to Turn off Your Mac? Put it to Sleep via Email

"This is just awesome. Learn how to automate a process that can put your
Mac to sleep via email."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Sep 25, 2017 10:24 am    Post subject: Reply with quote

iworkautomation - Populating Tables with Data

"Tables are meant to hold data. That's obvious. So the question you're
probably asking now is: using scripting, how do you get data into a table?
The answer is: the script iterates the data one bit at a time, and places
each bit in its corresponding table cell.

Huh?

It makes sense, once you understand that it's all about the data and how it
is read. You see, table data is grouped by either row or column."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Sep 25, 2017 11:46 am    Post subject: Reply with quote

su -Bundle applescript into application from the command line

"/usr/bin/osacompile -o /path/to/applicationbundle.app /path/to/textfile.txt"


Last edited by delovski on Mon Sep 25, 2017 12:02 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Sep 25, 2017 12:01 pm    Post subject: Reply with quote

Jamf Nation - Finding and formatting cells in Excel

"So, like a lot of people, when I do archives to tape, I build a spreadsheet
of the files in a given archive so that folks can easily find files they need
restored. However, when you have say, gobs of folders and potentially
hundreds of thousands of files, you want to do a bit of formatting to help
folks out. Doing this manually would suck, so of course, I script it."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Sep 26, 2017 1:45 pm    Post subject: Reply with quote

jacobsalmela.com - Enable Access to Assistive Devices Programmatically in OS X Mavericks 10.9.x - Simulate Keystrokes

"Using a bash script to enable access to assistive devices is possible in
Mavericks (and also Yosemite) despite the move to a per-app database.
This is useful for entering keystrokes or clicking GUI buttons via a bash
script."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Oct 02, 2017 12:03 pm    Post subject: Reply with quote

iworkautomation - Exporting Documents

"Exporting Pages documents is done using the export command from the Pages Suite."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Oct 02, 2017 4:17 pm    Post subject: Reply with quote

Apple - Folder Actions Reference

"Folder Actions is a feature of macOS that lets you associate AppleScript scripts
with folders. A Folder Action script is executed when the folder to which it is
attached has items added or removed, or when its window is opened, closed,
moved, or resized. The script provides a handler that matches the appropriate
format for the action, as described in this chapter."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Thu Dec 14, 2017 12:31 pm    Post subject: Reply with quote

r - The only thing my touchbar is good for

Code:
set json to (do shell script "curl https://www.bitstamp.net/api/v2/ticker/btcusd")

tell application "JSON Helper"
    set result to read JSON from json
    set price to |last| of result as string
end tell

set result_string to "$" & price & ""


First i had to install "Json Helper" from the App store, it's a small plugin for AppleScript.
This is how I got it working in BetterTouch tools:
1) Global -> [+Widget]
2) Select toucbar wigdet: Run apple script and show...
3) Click [Advanced Configuration]
Paste this, modify for dollar and other exchange if you wish.
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Fri Feb 16, 2018 3:27 pm    Post subject: Reply with quote

https://www.reddit.com/r/Automator/comments/7xrgf5/apple_icon_cache_removal/

Hi guys, I've got this script but I need to automate it so my boss (who has difficulty remembering scripts nowadays) can simply double click it as an app. Found the following script on github (works perfect when pasted into terminal):
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
Need to turn it into an application, i've tried pasting that into run shell script but no luck. Any idea's? I've posted it in applescript but not had much luck.
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Mon Jul 05, 2021 7:33 am    Post subject: Reply with quote

r - How to Send a Push Notification from Terminal

"How to Send a Push Notification from Terminal. Let your Mac notify your
iPhone or Apple Watch when it's ready for you."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Sat Jun 18, 2022 3:42 pm    Post subject: Reply with quote

so - Using Applescript to Change desktop icon size

Code:
tell application "Finder"
    activate
    set iconViewOptions to desktop's window's icon view options
    tell iconViewOptions
        set arrangement to not arranged
        set icon size to 32
        set shows item info to false
        set shows icon preview to false
    end tell
    quit
end tell
delay 1
tell application "Finder" to activate
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> General Programming All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group