Code Bucket …

mLAN Activation Script

You can visit http://www.the-barn.org/codebucket.php?id=75 to view this snippet directly.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
set process_name to "mLANGraphicPatchbay"
set mlc_path to "/Users/James/Documents/i88x.mlc"

on is_running(process_name)
	tell application "System Events" to (name of processes) contains process_name
end is_running

on start(path)
	do shell script "open '" & path & "'"
end start

on apply(process_name)
	tell application "System Events"
		tell process process_name
			tell menu bar 1
				tell menu bar item "View"
					tell menu "View"
						click menu item "Apply"
					end tell
				end tell
			end tell
		end tell
	end tell
end apply

on set_visibility(process_name, visible)
	tell application "Finder" to set visible of process process_name to visible
end set_visibility

if not is_running(process_name) then
	start(mlc_path)
	delay 5
else
	set_visibility(process_name, true)
	tell application process_name to activate
end if

apply(process_name)
set_visibility(process_name, false)
  • Posted on 23.06.2010 at 6:42 AM by stoffle
  • Language: Plain Text

Snippets

 
36 Results
Page 1 of 3
TitleLanguagePosted ByPostedExpiresActions
Python first-class classes for KodenPythonstoffle04.07.2010 8:19 AM (64 days 3h 14m ago)-view
mLAN Activation ScriptPlain Textstoffle23.06.2010 6:42 AM (75 days 4h 50m ago)-view
areaC#stoffle27.02.2010 3:51 AM (191 days 8h 41m ago)-view
list extensionsC#stoffle09.02.2010 11:12 PM (208 days 13h 20m ago)-view
possible IComponent intererface version 95C#stoffle09.02.2010 11:04 PM (208 days 13h 29m ago)-view
Render SystemC++spam05.06.2009 12:14 PM (457 days 23h 18m ago)-view
Effect SampleC++spam03.06.2009 2:40 PM (459 days 20h 52m ago)-view
Rho LambdasC++spam03.06.2009 2:38 PM (459 days 20h 55m ago)-view
Example VSM implC++spam02.06.2009 1:21 PM (460 days 22h 11m ago)-view
Vector3 Interface (public)C++kalin11.02.2008 9:53 PM (937 days 14h 39m ago)-view
TimesTablesC++kalin09.02.2008 6:04 PM (939 days 18h 29m ago)-view
Skruje Account Search PagePHPstoffle03.02.2008 5:12 PM (945 days 19h 20m ago)-view
C++ is still bork...C++spam26.01.2008 5:58 PM (953 days 18h 34m ago)-view
C++ is bork #3C++spam26.01.2008 5:47 PM (953 days 18h 46m ago)-view
C++ is bork #2C++spam26.01.2008 5:46 PM (953 days 18h 46m ago)-view
36 Results
Page 1 of 3