Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andybrewer/mack
/ functions
Functions
51 in github.com/andybrewer/mack
⨍
Functions
51
◇
Types & classes
6
↓ 29 callers
Function
wrapInQuotes
Wrap text in quotes for proper command line formatting
mack.go:60
↓ 16 callers
Function
parseResponse
Parse a button response
mack.go:103
↓ 14 callers
Function
runStringAssertTests
* ** Test Helpers */ Compare two string values
mack_test.go:195
↓ 12 callers
Function
build
Build the AppleScript command, ignoring any blank optional parameters
mack.go:65
↓ 11 callers
Function
buildDialogBox
Parse the DialogBox options and build the command
dialog.go:68
↓ 8 callers
Function
buildAlertBox
Parse the AlertBox options and build the command
alert.go:65
↓ 8 callers
Function
run
Build the AppleScript command from a set of optional parameters, return the output
mack.go:21
↓ 6 callers
Function
buildAlert
Parse the alert options and build the command
alert.go:32
↓ 6 callers
Function
buildDialog
Parse the dialog options and build the command
dialog.go:33
↓ 6 callers
Function
makeButtonList
Parse and format the button values
mack.go:87
↓ 5 callers
Function
buildNotification
Parse the notify options and build the command
notification.go:31
↓ 4 callers
Function
buildSay
Parse the say options and build the command
say.go:28
↓ 4 callers
Function
runWithButtons
Build the AppleScript command from a set of optional parameters, return a Response
mack.go:35
↓ 3 callers
Function
Say
Say triggers a voice notification that will read the text provided in a given voice. mack.Say("Hi in Fred's voice!", "Fred") // Have the "Fred" vo
say.go:22
↓ 3 callers
Function
buildBeep
Parse the beep options and build the command
beep.go:26
↓ 2 callers
Function
AlertBox
AlertBox triggers a desktop alert with the option for custom buttons. Either an error is returned, or the string output from the user interaction. a
alert.go:60
↓ 2 callers
Function
Beep
Beep triggers a given number of system beeps. mack.Beep(1) // Beeps once mack.Beep(3) // Beeps 3 times Parameters: times int // Required - Th
beep.go:20
↓ 2 callers
Function
buildClipboard
Build the command
clipboard.go:14
↓ 2 callers
Function
buildList
(list ListOptions)
list.go:56
↓ 2 callers
Function
buildSetClipboard
Wrap the content in quotes and build the command
clipboard.go:25
↓ 2 callers
Function
fail
Global fail message format
mack_test.go:220
↓ 2 callers
Function
runErrorAssertTests
Compare two error values
mack_test.go:204
↓ 2 callers
Function
runList
(list ListOptions)
list.go:41
↓ 1 callers
Function
Clipboard
Clipboard returns the content of the clipboard
clipboard.go:9
↓ 1 callers
Function
DialogBox
DialogBox triggers a desktop dialog box with the option for custom buttons. Either an error is returned, or the string output from the user interactio
dialog.go:63
↓ 1 callers
Function
SetClipboard
SetClipboard changes the content of the clipboard
clipboard.go:19
↓ 1 callers
Function
Tell
Tell tells an application the specified commands mack.Tell("TextEdit", "activate") // Activates TextEdit mack.Tell("TextEdit", "quit") // Qui
tell.go:20
↓ 1 callers
Function
buildTell
Parse the Tell options and build the command
tell.go:25
↓ 1 callers
Function
mkList
Construct an applescript string list
mack.go:78
Function
Alert
Alert triggers a desktop alert with custom buttons. Either an error is returned, or the string output from the user interaction. mack.Alert("Alert")
alert.go:27
Function
Dialog
Dialog triggers a desktop dialog box. Either an error is returned, or the string output from the user interaction. mack.Dialog("Dialog text")
dialog.go:28
Function
List
List triggers a desktop list selection box. It accepts a title and one or more string items for the user to select from Use ListWithOpts for more con
list.go:18
Function
ListWithOpts
ListWithOpts trigger a desktop list selection box accepting custom parameters. list := mack.ListOptions{ Items: []string{"item one", 'item two"}
list.go:37
Function
Notify
Notify triggers a desktop notification. mack.Notify("My message") // Display a notification with the content "My
notification.go:25
Function
TestBuild
Test building a command
mack_test.go:80
Function
TestBuildAlert
(t *testing.T)
alert_test.go:12
Function
TestBuildAlertBox
(t *testing.T)
alert_test.go:39
Function
TestBuildBeep
(t *testing.T)
beep_test.go:12
Function
TestBuildClipboard
(t *testing.T)
clipboard_test.go:12
Function
TestBuildDialog
(t *testing.T)
dialog_test.go:12
Function
TestBuildDialogBox
(t *testing.T)
dialog_test.go:39
Function
TestBuildList
(t *testing.T)
list_test.go:5
Function
TestBuildNotification
(t *testing.T)
notification_test.go:12
Function
TestBuildSay
(t *testing.T)
say_test.go:12
Function
TestBuildSetClipboard
(t *testing.T)
clipboard_test.go:23
Function
TestMakeButtonList
Test parsing a button list
mack_test.go:92
Function
TestParseResponse
Test parsing an alert or dialog response
mack_test.go:116
Function
TestRun
Test executing the commands
mack_test.go:15
Function
TestSetClipboard
(t *testing.T)
clipboard_test.go:34
Function
TestTell
(t *testing.T)
tell_test.go:10
Function
TestWrapInQuotes
Test wrapping a string in quotes
mack_test.go:68