Begin work on launching QuickTime Player 7 on Mavericks computers.

--
--  AppDelegate.applescript
--  PerianOpener
--
--  Created by C.W. Betts on 9/25/13.
--  Copyright (c) 2013 Perian Team. All rights reserved.
--

script AppDelegate
	property parent : class "NSObject"

	on isMavericksOrLater()
		-- TODO: Implement
		return yes
	end isMavericksOrLater

	on applicationWillFinishLaunching_(aNotification)
		-- Insert code here to initialize your application before any files are opened
	end applicationWillFinishLaunching_

	on applicationDidFinishLaunching_(aNotification)
		-- Insert code here to initialize your application before any files are opened
		tell current application's NSTimer to set theTimer to scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(10, me, "timerFired:", missing value, false)
	end applicationDidFinishLaunching_

	on timerFired_(timer)
		quit
	end timerFired_

	on applicationShouldTerminate_(sender)
		-- Insert code here to do any housekeeping before your application quits
		return current application's NSTerminateNow
	end applicationShouldTerminate_

	on application_openFiles_(appl, theFiles)

		set mavericks to isMavericksOrLater()
		if mavericks is true
		tell application "com.apple.quicktimeplayer"
			repeat with theFile in theFiles's allObjects()
				set theFilePox to (theFile's fileSystemRepresentation())
				open theFilePox as POSIX file
			end repeat

			activate
		end tell

		else

		tell application "QuickTime Player"
			repeat with theFile in theFiles's allObjects()
				set theFilePox to (theFile's fileSystemRepresentation())
				open theFilePox as POSIX file
			end repeat

			activate
		end tell
		end
		quit

		return yes
	end application_openFiles_

end script

--
--  AppDelegate.applescript
--  PerianOpener
--
--  Created by C.W. Betts on 9/25/13.
--  Copyright (c) 2013 Perian Team. All rights reserved.
--

script AppDelegate
	property parent : class "NSObject"

	on applicationWillFinishLaunching_(aNotification)
		-- Insert code here to initialize your application before any files are opened
	end applicationWillFinishLaunching_

	on applicationDidFinishLaunching_(aNotification)
		-- Insert code here to initialize your application before any files are opened
		tell current application's NSTimer to set theTimer to scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(10, me, "timerFired:", missing value, false)
	end applicationDidFinishLaunching_

	on timerFired_(timer)
		quit
	end timerFired_

	on applicationShouldTerminate_(sender)
		-- Insert code here to do any housekeeping before your application quits
		return current application's NSTerminateNow
	end applicationShouldTerminate_

	on application_openFiles_(appl, theFiles)
		tell application "QuickTime Player"
			repeat with theFile in theFiles's allObjects()
				set theFilePox to (theFile's fileSystemRepresentation())
				open theFilePox as POSIX file
			end repeat

			activate
		end tell
		quit

		return yes
	end application_openFiles_

end script


make it work again

make it work again

-- thumbscrew.scpt
-- usage: thumbscript.scpt <path_to_git_root_dir> <path_to_keynotePresentation>
--
-- Will create scaled thumbnails of length `thumbSize` in the directory
-- <path_to_presentation>
property thumbSize : 480

on getImages(f)
  tell application "Finder" to return (files of folder f) as alias list
end getImages

on run argv
  set savePath to item 1 of argv
  set keynoteName to item 2 of argv
  set thumbnailDir to keynoteName
  if thumbnailDir ends with ".key" then set thumbnailDir to text 1 thru -5 of thumbnailDir

  set keynoteFile to (POSIX file keynoteName) as alias
  set keynoteFullName to savePath & "/" & keynoteName
  set savePath to posix file savePath

  tell application "Finder"
    if not (exists folder thumbnailDir of folder savePath)
      make new folder at folder savePath with properties {name:thumbnailDir}
    end if
    set the targetFolder to folder thumbnailDir of folder savePath
    set the targetFolderHFSPath to targetFolder as string
  end tell

  tell application "Keynote" to run
  tell application "Keynote"
    open keynoteFile

    if playing is true then stop the front document

    export front document as slide images to file targetFolderHFSPath with properties {image format: JPEG}
    set jpegs to my getImages(targetFolderHFSPath)
    repeat with thisJPEG in jpegs
      try
        tell application "Image Events"
          launch
          set this_image to open thisJPEG
          scale this_image to size thumbSize
          save this_image with icon
          close this_image
        end tell
        on error error_message
          display dialog error_message
      end try
    end repeat

    close front document without saving
  end tell
end run

-- thumbscrew.scpt
-- usage: thumbscript.scpt <path_to_git_root_dir> <path_to_keynotePresentation>
--
-- Will create scaled thumbnails of length `thumbSize` in the directory
-- <path_to_presentation>
property thumbSize : 480

on getImages(f)
  tell application "Finder" to return (files of folder f) as alias list
end getImages

on run argv
  set savePath to item 1 of argv
  set keynoteName to item 2 of argv
  set thumbnailDir to keynoteName
  if thumbnailDir ends with ".key" then set thumbnailDir to text 1 thru -5 of thumbnailDir

  set keynoteFile to (POSIX file keynoteName) as alias
  set keynoteFullName to savePath & "/" & keynoteName
  set documentPath to posix file (POSIX path of (do shell script "dirname " & quoted form of keynoteFullName)) as alias

  tell application "Finder"
    if not (exists folder thumbnailDir of folder documentPath)
      make new folder at folder documentPath with properties {name:thumbnailDir}
    end if
    set the targetFolder to folder thumbnailDir of folder documentPath
    set the targetFolderHFSPath to targetFolder as string
  end tell

  tell application "Keynote" to run
  tell application "Keynote"
    open keynoteFile

    if playing is true then stop the front document

    export front document as slide images to file targetFolderHFSPath with properties {image format: JPEG}
    set jpegs to my getImages(targetFolderHFSPath)
    repeat with thisJPEG in jpegs
      try
        tell application "Image Events"
          launch
          set this_image to open thisJPEG
          scale this_image to size thumbSize
          save this_image with icon
          close this_image
        end tell
        on error error_message
          display dialog error_message
      end try
    end repeat

--    close front document without saving
  end tell
end run


Alfred checkpoint

Alfred checkpoint

FasdUAS 1.101.10
l
i
I
.aevtoappnull****
o0argv
r
I

.sysodsct****scpt

l
b

b
mL
	tell application "System Events"
		set _app to item 1 of (every process whose frontmost is true)
	end tell

	tell application "System Events"
		tell _app
			tell
n
4

cobj
m
o0argv

m
				if (it exists) then perform action "AXPress"
			end tell
		end tell
	end tell
	o0scpt
.aevtoappnull****0scpt
.aevtoappnull****0argv0argv

cobj
.sysodsct****scpt0scptk/%%jE !"!#$#%&%'(')*)+,+--.
misccura

pcap.//iTerm2

mbar

mbri,00Edit

menE*11Edit

menI(22*Marks and Annotations

menE&33*Marks and Annotations

menI$44Alerts

menE"55Alerts

menI 66$Alert on Next Mark

actT77AXPressascrޭ

FasdUAS 1.101.10
l
i
I
.aevtoappnull****
o0argv
r
I

.sysodsct****scpt

l
b

b
mL
	tell application "System Events"
		set _app to item 1 of (every process whose frontmost is true)
	end tell

	tell application "System Events"
		tell _app
			tell
n
4

cobj
m
o0argv

m
				if (it exists) then perform action "AXPress"
			end tell
		end tell
	end tell
	o0scpt
.aevtoappnull****0scpt
.aevtoappnull****0argv0argv

cobj
.sysodsct****scpt0scptk/%%jE !"!#$#%%&
misccura

pcap&''TablePlus

mbar

mbri$((File

menE"))File

menI **Backup...

actT++AXPressascrޭ


Simplify

Simplify

-- vim-anywhere - use Vim whenever, wherever
-- Author: Chris Knadler
-- Homepage: https://www.github.com/cknadler/vim-anywhere
--
-- Open the keyboard shortcuts tab of keyboard system preferences

tell application "System Preferences"
  activate
  reveal anchor "shortcutsTab" of pane id "com.apple.preference.keyboard"
end tell

-- vim-anywhere - use Vim whenever, wherever
-- Author: Chris Knadler
-- Homepage: https://www.github.com/cknadler/vim-anywhere
--
-- Open the "Services" keyboard shortcuts tab of keyboard system preferences

tell application "System Preferences"
  activate
  reveal anchor "shortcutsTab" of pane id "com.apple.preference.keyboard"
  keystroke tab
  repeat 3 times
    key code 125
  end repeat
end tell


Fix pdf script

Fix pdf script

############################
# How to generate the PDFs #
############################
# 1. Generate Cover.pdf with latest version date
#    a. Create "ebook" folder in ~/Downloads
#    b. update date in cover.html
#    c. open in safari file:///Users/frank/Sites/ServerlessStackCom/etc/cover.html
#    d. "Export to PDF…"
#    e. Place Cover.pdf in ~/ebook folder
# 2. Ensure "ebook" folder is an option when "Export to PDF…" in Safari
# 3. In terminal, run "osascript pdf.scpt"

set theChaptersStr to "who-is-this-guide-for
what-does-this-guide-cover
how-to-get-help
what-is-serverless
what-is-aws-lambda
why-create-serverless-apps
create-an-aws-account
create-an-iam-user
what-is-iam
what-is-an-arn
configure-the-aws-cli
create-a-dynamodb-table
create-an-s3-bucket-for-file-uploads
create-a-cognito-user-pool
create-a-cognito-test-user
setup-the-serverless-framework
add-support-for-es6-es7-javascript
initialize-the-backend-repo
add-a-create-note-api
add-a-get-note-api
add-a-list-all-the-notes-api
add-an-update-note-api
add-a-delete-note-api
working-with-3rd-party-apis
setup-a-stripe-account
add-a-billing-api
load-secrets-from-env
test-the-billing-api
unit-tests-in-serverless
handle-api-gateway-cors-errors
deploy-the-apis
create-a-cognito-identity-pool
cognito-user-pool-vs-identity-pool
test-the-apis
create-a-new-reactjs-app
initialize-the-frontend-repo
add-app-favicons
setup-custom-fonts
setup-bootstrap
handle-routes-with-react-router
create-containers
adding-links-in-the-navbar
handle-404s
configure-aws-amplify
create-a-login-page
login-with-aws-cognito
add-the-session-to-the-state
load-the-state-from-the-session
clear-the-session-on-logout
redirect-on-login-and-logout
give-feedback-while-logging-in
create-a-custom-react-hook-to-handle-form-fields
create-a-signup-page
create-the-signup-form
signup-with-aws-cognito
add-the-create-note-page
call-the-create-api
upload-a-file-to-s3
list-all-the-notes
call-the-list-api
display-a-note
render-the-note-form
save-changes-to-a-note
delete-a-note
create-a-settings-page
add-stripe-keys-to-config
create-a-billing-form
connect-the-billing-form
setup-secure-pages
create-a-route-that-redirects
use-the-redirect-routes
redirect-on-login
getting-production-ready
what-is-infrastructure-as-code
configure-dynamodb-in-serverless
configure-s3-in-serverless
configure-cognito-user-pool-in-serverless
configure-cognito-identity-pool-in-serverless
deploy-your-serverless-infrastructure
automating-serverless-deployments
setting-up-your-project-on-seed
configure-secrets-in-seed
deploying-through-seed
set-custom-domains-through-seed
test-the-configured-apis
automating-react-deployments
manage-environments-in-create-react-app
create-a-build-script
setting-up-your-project-on-netlify
custom-domain-in-netlify
frontend-workflow
debugging-full-stack-serverless-apps
setup-error-reporting-in-react
report-api-errors-in-react
setup-an-error-boundary-in-react
setup-error-logging-in-serverless
logic-errors-in-lambda-functions
unexpected-errors-in-lambda-functions
errors-outside-lambda-functions
errors-in-api-gateway
wrapping-up
further-reading
translations
giving-back
changelog
staying-up-to-date
best-practices-for-building-serverless-apps
organizing-serverless-projects
cross-stack-references-in-serverless
dynamodb-as-a-serverless-service
s3-as-a-serverless-service
cognito-as-a-serverless-service
share-code-between-services
share-an-api-endpoint-between-services
deploy-a-serverless-app-with-dependencies
environments-in-serverless-apps
structure-environments-across-aws-accounts
manage-aws-accounts-using-aws-organizations
parameterize-serverless-resources-names
deploying-to-multiple-aws-accounts
deploy-the-resources-repo
deploy-the-api-services-repo
manage-environment-related-config
storing-secrets-in-serverless-apps
share-route-53-domains-across-aws-accounts
monitor-usage-for-environments
working-on-serverless-apps
invoke-lambda-functions-locally
invoke-api-gateway-endpoints-locally
creating-feature-environments
creating-pull-request-environments
promoting-to-production
rollback-changes
deploying-only-updated-services
tracing-serverless-apps-with-x-ray
wrapping-up-the-best-practices
api-gateway-and-lambda-logs
debugging-serverless-api-issues
serverless-environment-variables
stages-in-serverless-framework
backups-in-dynamodb
configure-multiple-aws-profiles
customize-the-serverless-iam-policy
mapping-cognito-identity-id-and-user-pool-id
connect-to-api-gateway-with-iam-auth
serverless-nodejs-starter
package-lambdas-with-serverless-bundle
understanding-react-hooks
code-splitting-in-create-react-app
environments-in-create-react-app
deploying-a-react-app-to-aws
create-an-s3-bucket
deploy-to-s3
create-a-cloudfront-distribution
setup-your-domain-with-cloudfront
setup-www-domain-redirect
setup-ssl
deploy-updates
manage-user-accounts-in-aws-amplify
handle-forgot-and-reset-password
allow-users-to-change-passwords
allow-users-to-change-their-email
facebook-login-with-cognito-using-aws-amplify"

set text item delimiters to "
"

set theChapters to text items of theChaptersStr

########
# Main #
########
downloadPdfs(theChapters)
mergePdfs(theChapters)

##############
# Merge PDFs #
##############
on mergePdfs(theChapters)
  set outputFile to "~/Downloads/ebook/ServerlessStack.pdf"

  set pdfFiles to "~/Downloads/ebook/Cover.pdf"
  repeat with theCurrentChapter in theChapters
    set pdfFiles to pdfFiles & " ~/Downloads/ebook/" & theCurrentChapter & ".pdf"
  end repeat

  do shell script "/System/Library/Automator/Combine\\ PDF\\ Pages.action/Contents/Resources/join.py " & "-o " & outputFile & " " & pdfFiles
end mergePdfs

#################
# Download PDFs #
#################
on downloadPdfs(theChapters)
  repeat with theCurrentChapter in theChapters
    if not(checkFileExist(theCurrentChapter)) then
      downloadPdf(theCurrentChapter)
    end if
  end repeat
end downloadPdfs

on checkFileExist(theChapterName)
  set basePath to POSIX path of (path to home folder) & "Downloads/ebook/"

  tell application "Finder"
    return exists basePath & theChapterName & ".pdf" as POSIX file
  end tell
end checkFileExist

on downloadPdf(theChapterName)
  tell application "System Events"

    tell process "Safari"
      set frontmost to true

      if ((theChapterName as string) is equal to "index") then
        set urlPath to theChapterName
      else
        set urlPath to "chapters/" & theChapterName
      end if
      open location "https://serverless-stack.com/" & urlPath & ".html"

      delay 1

      repeat until menu item "Export as PDF…" of menu "File" of menu bar 1 exists
        delay 0.2
      end repeat
      repeat
        if ((value of menu item "Export as PDF…" of menu "File" of menu bar 1 is enabled) = true)
          exit repeat
        end if
        delay 0.2
      end repeat
      click menu item "Export as PDF…" of menu "File" of menu bar 1

      tell window 1
        repeat until sheet 1 exists
        end repeat

        tell sheet 1
          keystroke theChapterName
          click pop up button "Where:"

          repeat until menu 1 of pop up button "Where:" exists
          end repeat
          click menu item "ebook" of menu 1 of pop up button "Where:"
          click button "Save"
        end tell

      end tell

      click menu item "Close Tab" of menu "File" of menu bar 1

    end tell

  end tell
end downloadPdf

############################
# How to generate the PDFs #
############################
# 1. Generate Cover.pdf with latest version date
#    a. Create "ebook" folder in ~/Downloads
#    b. update date in cover.html
#    c. open in safari file:///Users/frank/Sites/ServerlessStackCom/etc/cover.html
#    d. "Export to PDF…"
#    e. Place Cover.pdf in ~/ebook folder
# 2. Ensure "ebook" folder is an option when "Export to PDF…" in Safari
# 3. In terminal, run "osascript pdf.scpt"

set theChaptersStr to "who-is-this-guide-for
what-does-this-guide-cover
how-to-get-help
what-is-serverless
what-is-aws-lambda
why-create-serverless-apps
create-an-aws-account
create-an-iam-user
what-is-iam
what-is-an-arn
configure-the-aws-cli
create-a-dynamodb-table
create-an-s3-bucket-for-file-uploads
create-a-cognito-user-pool
create-a-cognito-test-user
setup-the-serverless-framework
add-support-for-es6-es7-javascript
initialize-the-backend-repo
add-a-create-note-api
add-a-get-note-api
add-a-list-all-the-notes-api
add-an-update-note-api
add-a-delete-note-api
working-with-3rd-party-apis
setup-a-stripe-account
add-a-billing-api
load-secrets-from-env
test-the-billing-api
unit-tests-in-serverless
handle-api-gateway-cors-errors
deploy-the-apis
create-a-cognito-identity-pool
cognito-user-pool-vs-identity-pool
test-the-apis
create-a-new-reactjs-app
initialize-the-frontend-repo
add-app-favicons
setup-custom-fonts
setup-bootstrap
handle-routes-with-react-router
create-containers
adding-links-in-the-navbar
handle-404s
configure-aws-amplify
create-a-login-page
login-with-aws-cognito
add-the-session-to-the-state
load-the-state-from-the-session
clear-the-session-on-logout
redirect-on-login-and-logout
give-feedback-while-logging-in
create-a-custom-react-hook-to-handle-form-fields
create-a-signup-page
create-the-signup-form
signup-with-aws-cognito
add-the-create-note-page
call-the-create-api
upload-a-file-to-s3
list-all-the-notes
call-the-list-api
display-a-note
render-the-note-form
save-changes-to-a-note
delete-a-note
create-a-settings-page
add-stripe-keys-to-config
create-a-billing-form
connect-the-billing-form
setup-secure-pages
create-a-route-that-redirects
use-the-redirect-routes
redirect-on-login
getting-production-ready
what-is-infrastructure-as-code
configure-dynamodb-in-serverless
configure-s3-in-serverless
configure-cognito-user-pool-in-serverless
configure-cognito-identity-pool-in-serverless
deploy-your-serverless-infrastructure
automating-serverless-deployments
setting-up-your-project-on-seed
configure-secrets-in-seed
deploying-through-seed
set-custom-domains-through-seed
test-the-configured-apis
automating-react-deployments
manage-environments-in-create-react-app
create-a-build-script
setting-up-your-project-on-netlify
custom-domain-in-netlify
frontend-workflow
debugging-full-stack-serverless-apps
setup-error-reporting-in-react
report-api-errors-in-react
setup-an-error-boundary-in-react
setup-error-logging-in-serverless
logic-errors-in-lambda-functions
unexpected-errors-in-lambda-functions
errors-outside-lambda-functions
errors-in-api-gateway
wrapping-up
further-reading
translations
giving-back
changelog
staying-up-to-date
best-practices-for-building-serverless-apps
organizing-serverless-projects
cross-stack-references-in-serverless
dynamodb-as-a-serverless-service
s3-as-a-serverless-service
cognito-as-a-serverless-service
share-code-between-services
share-an-api-endpoint-between-services
deploy-a-serverless-app-with-dependencies
environments-in-serverless-apps
structure-environments-across-aws-accounts
manage-aws-accounts-using-aws-organizations
parameterize-serverless-resources-names
deploying-to-multiple-aws-accounts
deploy-the-resources-repo
deploy-the-api-services-repo
manage-environment-related-config
storing-secrets-in-serverless-apps
share-route-53-domains-across-aws-accounts
monitor-usage-for-environments
working-on-serverless-apps
invoke-lambda-functions-locally
invoke-api-gateway-endpoints-locally
creating-feature-environments
creating-pull-request-environments
promoting-to-production
rollback-changes
deploying-only-updated-services
tracing-serverless-apps-with-x-ray
wrapping-up-the-best-practices
api-gateway-and-lambda-logs
debugging-serverless-api-issues
serverless-environment-variables
stages-in-serverless-framework
backups-in-dynamodb
configure-multiple-aws-profiles
customize-the-serverless-iam-policy
mapping-cognito-identity-id-and-user-pool-id
connect-to-api-gateway-with-iam-auth
serverless-nodejs-starter
package-lambdas-with-serverless-bundle
understanding-react-hooks
code-splitting-in-create-react-app
environments-in-create-react-app
deploying-a-react-app-to-aws
create-an-s3-bucket
deploy-to-s3
create-a-cloudfront-distribution
setup-your-domain-with-cloudfront
setup-www-domain-redirect
setup-ssl
deploy-updates
manage-user-accounts-in-aws-amplify
handle-forgot-and-reset-password
allow-users-to-change-passwords
allow-users-to-change-their-email
facebook-login-with-cognito-using-aws-amplify"

set text item delimiters to "
"

set theChapters to text items of theChaptersStr

########
# Main #
########
downloadPdfs(theChapters)
mergePdfs(theChapters)

##############
# Merge PDFs #
##############
on mergePdfs(theChapters)
  set outputFile to "~/Downloads/ebook/ServerlessStack.pdf"

  set pdfFiles to "~/Downloads/ebook/Cover.pdf"
  repeat with theCurrentChapter in theChapters
    set pdfFiles to pdfFiles & " ~/Downloads/ebook/" & theCurrentChapter & ".pdf"
  end repeat

  do shell script "/System/Library/Automator/Combine\\ PDF\\ Pages.action/Contents/Resources/join.py " & "-o " & outputFile & " " & pdfFiles
end mergePdfs

#################
# Download PDFs #
#################
on downloadPdfs(theChapters)
  repeat with theCurrentChapter in theChapters
    if not(checkFileExist(theCurrentChapter)) then
      downloadPdf(theCurrentChapter)
    end if
  end repeat
end downloadPdfs

on checkFileExist(theChapterName)
  set basePath to POSIX path of (path to home folder) & "Downloads/ebook/"

  tell application "Finder"
    return exists basePath & theChapterName & ".pdf" as POSIX file
  end tell
end checkFileExist

on downloadPdf(theChapterName)
  tell application "System Events"

    tell process "Safari"
      set frontmost to true

      if ((theChapterName as string) is equal to "index") then
        set urlPath to theChapterName
      else
        set urlPath to "chapters/" & theChapterName
      end if
      open location "https://serverless-stack.com/" & urlPath & ".html"

      delay 1

      repeat until menu item "Export as PDF…" of menu "File" of menu bar 1 exists
        delay 0.2
      end repeat
      repeat until menu item "Export as PDF…" of menu "File" of menu bar 1 is enabled
        delay 0.2
      end repeat
      click menu item "Export as PDF…" of menu "File" of menu bar 1

      tell window 1
        repeat until sheet 1 exists
        end repeat

        tell sheet 1
          keystroke theChapterName
          click pop up button "Where:"

          repeat until menu 1 of pop up button "Where:" exists
          end repeat
          click menu item "ebook" of menu 1 of pop up button "Where:"
          click button "Save"
        end tell

      end tell

      click menu item "Close Tab" of menu "File" of menu bar 1

    end tell

  end tell
end downloadPdf


Modified the poll script to work with iTunes 4.7 and tracks that don't have artwork.

--HG--
extra : convert_revision : svn%3A99687598-2e92-11dd-8019-fe7b9d601d1b/trunk%40583

FasdUAS 1.101.10
k
l
Q

O
k

r

m
fsck
o0returnvaluereturnValue
r
1

pPlS
o0astateaState
Z
=
o0astateaState
m
ePlSkPSP
k
r!"
!1

pTrk
"o0atrackaTrack #$
#r$%&
%n"'(
'1 "

pnam
(1

pPla
&o0alibraryaLibrary$)*
)r%*+,
+n%(-.
-1&(

pDID
.o%&0atrackaTrack
,o0atrackidaTrackID*/0
/r+012
1n+.34
31,.

pnam
4o+,0atrackaTrack
2o0
atrackname
aTrackName056
5r1678
7n149:
9124

pTim
:o120atrackaTrack
8o0atracklengthaTracklength6;<
;r7@=>
=n7<?@
?18<

pAlb
@o780atrackaTrack
>o0atrackalbumaTrackAlbum<AB
ArAJCD
CnAFEF
E1BF

pArt
FoAB0atrackaTrack
Do0atrackartistaTrackArtistBGH
GrKTIJ
InKPKL
K1LP

pAnt
LoKL0atrackaTrack
Jo&0atrackcompilationaTrackCompilationHMN
MrU^OP
OnUZQR
Q1VZ

pRte
RoUV0atrackaTrack
Po0atrackratingaTrackRatingNST
Sr_fUV
Um_b

null
Vo0
atrackartwork
aTrackArtworkTWX
WZgYZ
Y@gp[\
[Ign]
.corecnte********
]mgj

cArt
\mno
Zrs^_
^ns}`a
`1y}

pPCT
ansybc
b4tyd

cArt
dmwx
cost0atrackaTrack
_o0
atrackartwork
aTrackArtworkXe
erfg
fJhhij
io0atrackidaTrackIDjkl
ko0
atrackname
aTrackNamelmn
mo0atracklengthaTracklengthnop
oo0atrackartistaTrackArtistpqr
qo0atrackalbumaTrackAlbumrst
so&0atrackcompilationaTrackCompilationtuv
uo0atrackratingaTrackRatingvwx
wo0
atrackartwork
aTrackArtworkxy
yo0alibraryaLibrary
go0returnvaluereturnValuez{
z=|}
|o0astateaState
}m
ePlSkPSp{~
~r
mpaused
o0returnvaluereturnValue
r
m
stopped
o0returnvaluereturnValue
mnull
iTunes.app0L7 $)4(K @hookalisLMacintosh HDFwH+
iTunes.app@T	 ApplicationsF$Macintosh HD:Applications:iTunes.app
iTunes.appMacintosh HDApplications/iTunes.app/
	R
.ascrerr ********

r
m
fsck
o0returnvaluereturnValue
l
L
o0returnvaluereturnValue
l
.aevtoappnull****0returnvaluereturnValue0astateaState0atrackaTrack0alibraryaLibrary0atrackidaTrackID0
atrackname
aTrackName0atracklengthaTracklength0atrackalbumaTrackAlbum0atrackartistaTrackArtist&0atrackcompilationaTrackCompilation0atrackratingaTrackRating0
atrackartwork
aTrackArtwork
.aevtoappnull****
k$~}|{z0returnvaluereturnValue

pPlS0astateaState
ePlSkPSP

pTrk0atrackaTrack

pPla

pnam0alibraryaLibrary

pDID0atrackidaTrackID0
atrackname
aTrackName

pTim0atracklengthaTracklength

pAlb0atrackalbumaTrackAlbum

pArt0atrackartistaTrackArtist

pAnt&0atrackcompilationaTrackCompilation

pRte0atrackratingaTrackRating

null0
atrackartwork
aTrackArtwork

cArt
.corecnte********
~
pPCT}
|ePlSkPSp{zEO*,EO*,EO*,,EO,EO,EO,EOa,E`Oa,E`Oa,E`Oa,E`OaE`Oajkak/a,E`YhO_____avEYa
aEYa EUWX!"a#EOyy		xwvuxH(Random Drinking Song3:32
wboovfalsv<
u
nullParty Shuffle
ePlSkPSPtsrqponml
n
cSrcm#
lkfrmID
q
cUsPpE
okfrmID
t
cFlTs4.
rkfrmID  H
boovfals<

nullascr
ޭ

FasdUAS 1.101.10
k
l
Q

O
k

r

m
fsck
o0returnvaluereturnValue
r
1

pPlS
o0astateaState
Z
=
o0astateaState
m
ePlSkPSP
k
r!"
!1

pTrk
"o0atrackaTrack #$
#r$%&
%n"'(
'1 "

pnam
(1

pPla
&o0alibraryaLibrary$)*
)r%*+,
+n%(-.
-1&(

pDID
.o%&0atrackaTrack
,o0atrackidaTrackID*/0
/r+012
1n+.34
31,.

pnam
4o+,0atrackaTrack
2o0
atrackname
aTrackName056
5r1678
7n149:
9124

pTim
:o120atrackaTrack
8o0atracklengthaTracklength6;<
;r7@=>
=n7<?@
?18<

pAlb
@o780atrackaTrack
>o0atrackalbumaTrackAlbum<AB
ArAJCD
CnAFEF
E1BF

pArt
FoAB0atrackaTrack
Do0atrackartistaTrackArtistBGH
GrKTIJ
InKPKL
K1LP

pAnt
LoKL0atrackaTrack
Jo&0atrackcompilationaTrackCompilationHMN
MrU^OP
OnUZQR
Q1VZ

pRte
RoUV0atrackaTrack
Po0atrackratingaTrackRatingNST
Sr_fUV
Um_b

null
Vo0
atrackartwork
aTrackArtworkTWX
WZgYZ
Y@gs[\
[ngq]^
]1mq

pKnd
^ngm_`
_4hma

cArt
amkl
`ogh0atrackaTrack
\mqr
Zrvbc
bnvde
d1|

pPCT
env|fg
f4w|h

cArt
hmz{
govw0atrackaTrack
co0
atrackartwork
aTrackArtworkXi
irjk
jJllmn
mo0atrackidaTrackIDnop
oo0
atrackname
aTrackNamepqr
qo0atracklengthaTracklengthrst
so0atrackartistaTrackArtisttuv
uo0atrackalbumaTrackAlbumvwx
wo&0atrackcompilationaTrackCompilationxyz
yo0atrackratingaTrackRatingz{|
{o0
atrackartwork
aTrackArtwork|}
}o0alibraryaLibrary
ko0returnvaluereturnValue~
~=
o0astateaState
m
ePlSkPSp
r
mpaused
o0returnvaluereturnValue
r
m
stopped
o0returnvaluereturnValue
mnull
iTunes.app07 $)( @hookalis8ShireOH+
iTunes.appxͼG	 ApplicationsOShire:Applications:iTunes.app
iTunes.appShireApplications/iTunes.app/
	R
.ascrerr ********

r
m
fsck
o0returnvaluereturnValue
l
L
o0returnvaluereturnValue
l
.aevtoappnull****
.aevtoappnull****
k$0returnvaluereturnValue

pPlS0astateaState
ePlSkPSP

pTrk0atrackaTrack

pPla

pnam0alibraryaLibrary

pDID0atrackidaTrackID0
atrackname
aTrackName

pTim0atracklengthaTracklength

pAlb0atrackalbumaTrackAlbum

pArt0atrackartistaTrackArtist

pAnt&0atrackcompilationaTrackCompilation

pRte0atrackratingaTrackRating

null0
atrackartwork
aTrackArtwork

cArt

pKnd

pPCT
ePlSkPSpEO*,EO*,EO*,,EO,EO,EO,EOa,E`Oa,E`Oa,E`Oa,E`OaE`Oak/a,jak/a,E`YhO_____avEYa
aEYa EUWX!"a#EOascr
ޭ


Setting this back to the value it had before accidentally changing it.

tell application "Finder"
	tell disk "Growl"
		open
		tell container window
			set current view to icon view
			set toolbar visible to false
			set statusbar visible to false
			set the bounds to {30, 50, 480, 350}
		end tell
		close
		set opts to the icon view options of container window
		tell opts
			set icon size to 56
			set arrangement to not arranged
		end tell
		set background picture of opts to file ".background:growlDMGBackground.png"
		set position of item "Growl.prefPane" to {45, 41}
		set position of item "Extras" to {162, 33}
		--set position of item "Scripts" to {36, 153}
		set position of item "Growl Documentation.webloc" to {128, 123}
		set position of item "Growl version history.webloc" to {265, 41}
		set position of item "Get more styles.webloc" to {383, 41}
		set position of item "Uninstall Growl.app" to {383, 123}
		update without registering applications
		tell container window
			set the bounds to {31, 50, 579, 350}
			set the bounds to {30, 50, 579, 350}
		end tell
		update without registering applications
	end tell
	--give the finder some time to write the .DS_Store file
	delay 5
end tell

tell application "Finder"
	tell disk "Growl"
		open
		tell container window
			set current view to icon view
			set toolbar visible to false
			set statusbar visible to false
			set the bounds to {30, 50, 480, 350}
		end tell
		close
		set opts to the icon view options of container window
		tell opts
			set icon size to 56
			set arrangement to not arranged
		end tell
		set background picture of opts to file ".background:growlDMGBackground.png"
		set position of item "Growl.prefPane" to {45, 41}
		set position of item "Extras" to {162, 33}
		--set position of item "Scripts" to {36, 153}
		set position of item "Growl Documentation.webloc" to {128, 123}
		set position of item "Growl version history.webloc" to {265, 41}
		set position of item "Get more styles.webloc" to {383, 41}
		set position of item "Uninstall Growl.app" to {383, 123}
		update without registering applications
		tell container window
			set the bounds to {31, 50, 579, 4000}
			set the bounds to {30, 50, 579, 4000}
		end tell
		update without registering applications
	end tell
	--give the finder some time to write the .DS_Store file
	delay 5
end tell


Save before committing!

Save before committing!

tell application "Finder"
	tell disk "Growl"
		open
		tell container window
			set current view to icon view
			set toolbar visible to false
			set statusbar visible to false
			--set the bounds to {30, 50, 579, 600}
		end tell
		close
		set opts to the icon view options of container window
		tell opts
			set icon size to 64
			set arrangement to not arranged
		end tell
		set background picture of opts to file ".background:growlDMGBackground.png"
		set position of item "Growl.prefPane" to {147, 75}
		set position of item "Extras" to {80, 315}
		--set position of item "Scripts" to {36, 153}
		set position of item "Growl Documentation.webloc" to {100, 215}
		set position of item "Growl version history.webloc" to {275, 215}
		set position of item "Get more styles.webloc" to {415, 215}
		set position of item "Uninstall Growl.app" to {415, 315}
		update without registering applications
		tell container window
			open
			set the_window_id to id
		end tell
		update without registering applications
	end tell
	set bounds of window id the_window_id to {30, 50, 579, 462}
	--give the finder some time to write the .DS_Store file
	delay 5
end tell

tell application "Finder"
	tell disk "Growl"
		open
		tell container window
			set current view to icon view
			set toolbar visible to false
			set statusbar visible to false
			--set the bounds to {30, 50, 579, 600}
		end tell
		close
		set opts to the icon view options of container window
		tell opts
			set icon size to 64
			set arrangement to not arranged
		end tell
		set background picture of opts to file ".background:growlDMGBackground.png"
		set position of item "Growl.prefPane" to {147, 75}
		set position of item "Extras" to {80, 315}
		--set position of item "Scripts" to {36, 153}
		set position of item "Growl Documentation.webloc" to {100, 215}
		set position of item "Growl version history.webloc" to {275, 215}
		set position of item "Get more styles.webloc" to {415, 215}
		set position of item "Uninstall Growl.app" to {415, 315}
		update without registering applications
		set the_window_id to id of container window
		update without registering applications
	end tell
	set bounds of window id the_window_id to {30, 50, 579, 900}
	--give the finder some time to write the .DS_Store file
	delay 5
end tell


Changed dialog text for phone number

Changed dialog text for phone number

FasdUAS 1.101.10
k
l Render and Message		& Render and Message

l
+% A rendering and notification service
J A rendering and notification service
l by Axel Villamil" by Axel Villamil
l
l Get user's phone number0 Get user's phone number
l
I
.sysodlogaskrTEXT
m  !!.Enter your phone number"

dtxt
"m##$$1647XXXXXXX%&
%l
'
'r
()
(n*+
*1

ttxt
+1

rslt
)o0phonenumberphoneNumber&,-
,l-./
.l010 Run rendify.jsx122  Run rendify.jsx/34
3l456
5l7
7O89
8l:;<
:l=>?
=I@
.miscfilenull****
@mAABB/Applications/Adobe After Effects CC 2015.3/Scripts/AErendify.jsx>5/ Change depending on path of rendify.jsx script?CC^ Change depending on path of rendify.jsx script;3- Change depending on version of After Effects<DDZ Change depending on version of After Effects
9mEERFXTCalisMacintosh HDH+Adobe After Effects CC 2015.appӠ@	 Adobe After Effects CC 2015.31RӠxOIYMacintosh HD:Applications:Adobe After Effects CC 2015.3:Adobe After Effects CC 2015.app@Adobe After Effects CC 2015.appMacintosh HDJApplications/Adobe After Effects CC 2015.3/Adobe After Effects CC 2015.app/6FG
FlGHI
HlJKJ&  Read string from jsx error fileKLL@ Read string from jsx error fileIMN
MlNOP
OlQ
QrRS
RmTTUUX/Users/axelvillamil/Desktop/rendifyError.txt
So
0myfilePVW
Vl$X
Xr$YZ
YI"[
.rdwrread********
[o
0myfile
Zo0aenumberAEnumberW\]
\l]^_
^l%(`
`r%(ab
am%&ccdd\Your After Effects render queue is complete =
bo0smessagesMessage_ef
el)0g
gr)0hi
hm),jjkkxYour render queue is on it's last item. Start heading home!
io0lmessagelMessageflm
llmno
nlpqp+% Checks if jsx render queue is empty qrrJ Checks if jsx render queue is empty ost
sltuv
ul1w
wO1xy
xk7zz{|
{r7P}~
}67L
47=

icsv
m;<
=@K
1AE

styp
mFJ
stypsims
~o0
targetservice
targetService|
rQ]
nQY
4TY

pres
oWX0phonenumberphoneNumber
oQT0
targetservice
targetService
o0targetbuddytargetBuddy
l^^
Z^
E^c
o^_0aenumberAEnumber
m_b1
Ifq
.ichtsendnull****
ofg0smessagesMessage

TO
ojm0targetbuddytargetBuddy
Ety
otu0aenumberAEnumber
mux2
k|
I|
.sysodlogaskrTEXT
m|Please add items to your render queue.
 Click 'Ready' once your queue is filled

btns
J
mCancel
m
Ready

dflt
m
r
n
1

bhit
1

rslt
o0x
Z
=
o0x
mCancel
I
.sysodlogaskrTEXT
m:You have canceled the program
=
o0x
m
Ready
I
.sysodsct****scpt
4

file
m~Applications:Adobe After Effects CC 2015.3:Scripts:rendify.scpt
E
o0aenumberAEnumber
m3
I
.ichtsendnull****
o0lmessagelMessage

TO
o0targetbuddytargetBuddy
ym14fez!alisVMacintosh HDH+OIMessages.appOʹ	 Applications1R?OI'Macintosh HD:Applications:Messages.appMessages.appMacintosh HDApplications/Messages.app/v
l
l
.aevtoappnull****
.aevtoappnull****
k%5OV^eu- #EA~T}|{czjyxwvutsrqponmlkj

dtxt
.sysodlogaskrTEXT

rslt

ttxt0phonenumberphoneNumber
~.miscfilenull****}
0myfile
|.rdwrread********{0aenumberAEnumberz0smessagesMessagey0lmessagelMessage
x
icsv
w
styp
vstypsimsu0
targetservice
targetService
t
press0targetbuddytargetBuddy
r
TO
q.ichtsendnull****
p
btns
o
dfltn
m
bhitl0x
k
file
j.sysodsct****scptlO,EOj	UOEOjEOEOaE`Oa*ak/a[a,\Za81E`O_a/E`Oaa_lYwaVaaa a!lva"la#Oa$,E`%O_%a&a'jY_%a(*a)a*/j+YhYa,_a_lYhUascr
ޭ

FasdUAS 1.101.10
k
l Render and Message		& Render and Message

l
+% A rendering and notification service
J A rendering and notification service
l by Axel Villamil" by Axel Villamil
l
l Get users credentials, Get users credentials
lTN must be exact name, email and phone associated with your iMessage credentials must be exact name, email and phone associated with your iMessage credentials !
 l!"#
"l$%$QK display dialog "Enter your iMessage email" default answer "your@email.com"%&& display dialog "Enter your iMessage email" default answer "your@email.com"#'(
'l)*)+% set email to text returned of result*++J set email to text returned of result(,-
,l.
.I/0
.sysodlogaskrTEXT
/m1122DEnter your associated phone number03

dtxt
3m44551647XXXXXXX-67
6l
8
8r
9:
9n;<
;1

ttxt
<1

rslt
:o0phonenumberphoneNumber7=>
=l?@?GAdisplay dialog "Enter your full name" default answer "First Last"@AAdisplay dialog "Enter your full name" default answer "First Last">BC
BlDED-'set fullName to text returned of resultEFFNset fullName to text returned of resultCGH
GlHIJ
IlKLK Run rendify.jsxLMM  Run rendify.jsxJNO
NlOPQ
PlR
ROST
SlUVW
UlXYZ
XI[
.miscfilenull****
[m\\]]/Applications/Adobe After Effects CC 2015.3/Scripts/AErendify.jsxY5/ Change depending on path of rendify.jsx scriptZ^^^ Change depending on path of rendify.jsx scriptV3- Change depending on version of After EffectsW__Z Change depending on version of After Effects
Tm``RFXTCalisMacintosh HDH+Adobe After Effects CC 2015.appӠ@	 Adobe After Effects CC 2015.31RӠxOIYMacintosh HD:Applications:Adobe After Effects CC 2015.3:Adobe After Effects CC 2015.app@Adobe After Effects CC 2015.appMacintosh HDJApplications/Adobe After Effects CC 2015.3/Adobe After Effects CC 2015.app/Qab
albcd
clefe&  Read string from jsx error filefgg@ Read string from jsx error filedhi
hlijk
jll
lrmn
mmooppX/Users/axelvillamil/Desktop/rendifyError.txt
no
0myfilekqr
ql$s
sr$tu
tI"v
.rdwrread********
vo
0myfile
uo0aenumberAEnumberrwx
wlxyz
yl%({
{r%(|}
|m%&~~\Your After Effects render queue is complete =
}o0smessagesMessagez
l)0
r)0
m),xYour render queue is on it's last item. Start heading home!
o0lmessagelMessage
l+% Checks if jsx render queue is empty J Checks if jsx render queue is empty
l
l1
O1
k7
r7P
67L
47=

icsv
m;<
=@K
1AE

styp
mFJ
stypsims
o0
targetservice
targetService
rQ]
nQY
4TY

pres
oWX0phonenumberphoneNumber
oQT0
targetservice
targetService
o0targetbuddytargetBuddy
l^^
Z^
E^c
o^_0aenumberAEnumber
m_b1
Ifq
.ichtsendnull****
ofg0smessagesMessage

TO
ojm0targetbuddytargetBuddy
Ety
otu0aenumberAEnumber
mux2
k|
I|
.sysodlogaskrTEXT
m|Please add items to your render queue.
 Click 'Ready' once your queue is filled

btns
J
mCancel
m
Ready

dflt
m
r
n
1

bhit
1

rslt
o0x
Z
=
o0x
mCancel
I
.sysodlogaskrTEXT
m:You have canceled the program
=
o0x
m
Ready
I
.sysodsct****scpt
4

file
m~Applications:Adobe After Effects CC 2015.3:Scripts:rendify.scpt
E
o0aenumberAEnumber
m3
I
.ichtsendnull****
o0lmessagelMessage

TO
o0targetbuddytargetBuddy
m14fez!alisVMacintosh HDH+OIMessages.appOʹ	 Applications1R?OI'Macintosh HD:Applications:Messages.appMessages.appMacintosh HDApplications/Messages.app/
l
l
.aevtoappnull****
.aevtoappnull****
k,6Pjqy-1~4}|{z`\yoxwv~utsrqponmlkjihgfe
~
dtxt
}.sysodlogaskrTEXT
|
rslt
{
ttxtz0phonenumberphoneNumber
y.miscfilenull****x
0myfile
w.rdwrread********v0aenumberAEnumberu0smessagesMessaget0lmessagelMessage
s
icsv
r
styp
qstypsimsp0
targetservice
targetService
o
presn0targetbuddytargetBuddy
m
TO
l.ichtsendnull****
k
btns
j
dflti
h
bhitg0x
f
file
e.sysodsct****scptlO,EOj	UOEOjEOEOaE`Oa*ak/a[a,\Za81E`O_a/E`Oaa_lYwaVaaa a!lva"la#Oa$,E`%O_%a&a'jY_%a(*a)a*/j+YhYa,_a_lYhUascr
ޭ


update from darwin11

update from darwin11

-- app to be excepted
set expApp to {"thunderbird-bin", "XRG", "Skype"}

-- app to be half size, in left monitor (0.7 times full)
set halfSizeApp_L to {}

-- app to be half size, in right monitor
set halfSizeApp_R to {"AdobeReader"}

-- app only to be moved, in left monitor
set noResizeApp_L to {}

-- app only to be moved, in right monitor
set noResizeApp_R to {"Finder", "Skype", "Microsoft Word", "Microsoft Excel", "Microsoft PowerPoint"}

-- app to be moved left
set app_L to {"firefox", "Evernote", "thunderbird", "thunderbird-bin", "Mail"}

-- app to be moved right
set app_R to {"iTerm"}

-- get screen size
tell application "Finder"
	set scriptPath to (path to me)'s folder as text
end tell
set windowSizeScpt to scriptPath & "windowSize.scpt"
set windowSize to load script file windowSizeScpt

-- main screen
set svs to windowSize's getVisibleFrame(100, 100)
set dPosX to item 1 of svs
set dPosY to item 2 of svs
set dWidth to item 3 of svs
set dHeight to item 4 of svs

-- try to get left screen
set dPosX_L to dPosX
set dPosY_L to dPosY
try
	set svsL to windowSize's getVisibleFrame(-100, 100)
	set dPosX_L to item 1 of svsL
	set dPosY_L to item 2 of svsL
end try

-- try to get right screen
set dPosX_R to dPosX
set dPosY_R to dPosY
try
	set svsR to windowSize's getVisibleFrame(dPosX + dWidth + 100, 100)
	set dPosX_R to item 1 of svsR
	set dPosY_R to item 2 of svsR
end try

-- get application name
tell application "System Events"
	set appList to (get name of every application process whose visible is true)
end tell

-- repeat for all app
repeat with appName in appList
	if appName is not in expApp then
		tell application "System Events"
			try
				tell process appName
					set nW to number of windows
					display dialog appName & " " & nW

					repeat with i from 1 to nW
						log appName & i
						if appName is in halfSizeApp_L then
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, xsize:0.7, ysize:0.7})
						else if appName is in halfSizeApp_R then
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, xsize:0.7, ysize:0.7})
						else if appName is in noResizeApp_L then
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, resize:0})
						else if appName is in noResizeApp_R then
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, resize:0})
						else if appName is in app_L then
							log "app_L" & appName
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L})
						else if appName is in app_R then
							log "app_R" & appName
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R})
						end if
					end repeat
				end tell
			end try
		end tell
	end if
end repeat

-- app to be excepted
set expApp to {"thunderbird-bin", "XRG", "Skype"}

-- app to be half size, in left monitor (0.7 times full)
set halfSizeApp_L to {}

-- app to be half size, in right monitor
set halfSizeApp_R to {"AdobeReader"}

-- app only to be moved, in left monitor
set noResizeApp_L to {}

-- app only to be moved, in right monitor
set noResizeApp_R to {"Finder", "Skype", "Microsoft Word", "Microsoft Excel", "Microsoft PowerPoint"}

-- app to be moved left
set app_L to {"firefox", "Evernote", "thunderbird", "thunderbird-bin", "Mail"}

-- app to be moved right
set app_R to {"iTerm"}

-- get screen size
tell application "Finder"
	set scriptPath to (path to me)'s folder as text
end tell
set windowSizeScpt to scriptPath & "windowSize.scpt"
set windowSize to load script file windowSizeScpt

-- main screen
set svs to windowSize's getVisibleFrame(100, 100)
set dPosX to item 1 of svs
set dPosY to item 2 of svs
set dWidth to item 3 of svs
set dHeight to item 4 of svs

-- try to get left screen
set dPosX_L to dPosX
set dPosY_L to dPosY
try
	set svsL to windowSize's getVisibleFrame(-100, 100)
	set dPosX_L to item 1 of svsL
	set dPosY_L to item 2 of svsL
end try

-- try to get right screen
set dPosX_R to dPosX
set dPosY_R to dPosY
try
	set svsR to windowSize's getVisibleFrame(dPosX + dWidth + 100, 100)
	set dPosX_R to item 1 of svsR
	set dPosY_R to item 2 of svsR
end try

-- get application name
tell application "System Events"
	set appList to (get name of every application process whose visible is true)
end tell

-- repeat for all app
repeat with appName in appList
	if appName is not in expApp then
		tell application "System Events"
			try
				tell process appName
					set nW to number of windows
					repeat with i from 1 to nW
						log appName & i
						if appName is in halfSizeApp_L then
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, xsize:0.7, ysize:0.7})
						else if appName is in halfSizeApp_R then
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, xsize:0.7, ysize:0.7})
						else if appName is in noResizeApp_L then
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, resize:0})
						else if appName is in noResizeApp_R then
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, resize:0})
						else if appName is in app_L then
							log "app_L" & appName
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L})
						else if appName is in app_R then
							log "app_R" & appName
							windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R})
						end if
					end repeat
				end tell
			end try
		end tell
	end if
end repeat


Removes starred property

Removes starred property

on escape_quotes(string_to_escape)
  set AppleScript's text item delimiters to the "\""
  set the item_list to every text item of string_to_escape
  set AppleScript's text item delimiters to the "\\\""
  set string_to_escape to the item_list as string
  set AppleScript's text item delimiters to ""
  return string_to_escape
end escape_quotes

tell application "Spotify"
  set ctrack to "{"
  set ctrack to ctrack & "\"artist\": \"" & my escape_quotes(current track's artist) & "\""
  set ctrack to ctrack & ",\"album\": \"" & my escape_quotes(current track's album) & "\""
  set ctrack to ctrack & ",\"disc_number\": " & current track's disc number
  set ctrack to ctrack & ",\"duration\": " & current track's duration
  set ctrack to ctrack & ",\"played_count\": " & current track's played count
  set ctrack to ctrack & ",\"track_number\": " & current track's track number
  set ctrack to ctrack & ",\"popularity\": " & current track's popularity
  set ctrack to ctrack & ",\"id\": \"" & current track's id & "\""
  set ctrack to ctrack & ",\"name\": \"" & my escape_quotes(current track's name) & "\""
  set ctrack to ctrack & ",\"album_artist\": \"" & my escape_quotes(current track's album artist) & "\""
  set ctrack to ctrack & ",\"spotify_url\": \"" & current track's spotify url & "\""
  set ctrack to ctrack & "}"
end tell

on escape_quotes(string_to_escape)
  set AppleScript's text item delimiters to the "\""
  set the item_list to every text item of string_to_escape
  set AppleScript's text item delimiters to the "\\\""
  set string_to_escape to the item_list as string
  set AppleScript's text item delimiters to ""
  return string_to_escape
end escape_quotes

tell application "Spotify"
  set ctrack to "{"
  set ctrack to ctrack & "\"artist\": \"" & my escape_quotes(current track's artist) & "\""
  set ctrack to ctrack & ",\"album\": \"" & my escape_quotes(current track's album) & "\""
  set ctrack to ctrack & ",\"disc_number\": " & current track's disc number
  set ctrack to ctrack & ",\"duration\": " & current track's duration
  set ctrack to ctrack & ",\"played_count\": " & current track's played count
  set ctrack to ctrack & ",\"track_number\": " & current track's track number
  set ctrack to ctrack & ",\"starred\": " & current track's starred
  set ctrack to ctrack & ",\"popularity\": " & current track's popularity
  set ctrack to ctrack & ",\"id\": \"" & current track's id & "\""
  set ctrack to ctrack & ",\"name\": \"" & my escape_quotes(current track's name) & "\""
  set ctrack to ctrack & ",\"album_artist\": \"" & my escape_quotes(current track's album artist) & "\""
  set ctrack to ctrack & ",\"spotify_url\": \"" & current track's spotify url & "\""
  set ctrack to ctrack & "}"
end tell


Remove delay

Remove delay

#!/usr/bin/env osascript

-- Fist: Click Install Button
set timeoutSeconds to 2.0
set uiScript to "click UI Element 4 of window 1 of application process \"Install Command Line Developer Tools\""
my doWithTimeout(uiScript, timeoutSeconds)

on doWithTimeout(uiScript, timeoutSeconds)
  set endDate to (current date) + timeoutSeconds
  repeat
    try
      run script "tell application \"System Events\"
" & uiScript & "
end tell"
      exit repeat
    on error errorMessage
      if ((current date) > endDate) then
        error "Can not " & uiScript
      end if
    end try
  end repeat
end doWithTimeout

#!/usr/bin/env osascript

-- Fist: Click Install Button
delay 2.0

set timeoutSeconds to 2.0
set uiScript to "click UI Element 4 of window 1 of application process \"Install Command Line Developer Tools\""
my doWithTimeout(uiScript, timeoutSeconds)

on doWithTimeout(uiScript, timeoutSeconds)
  set endDate to (current date) + timeoutSeconds
  repeat
    try
      run script "tell application \"System Events\"
" & uiScript & "
end tell"
      exit repeat
    on error errorMessage
      if ((current date) > endDate) then
        error "Can not " & uiScript
      end if
    end try
  end repeat
end doWithTimeout


moveForMon.applescript, from darwin13

moveForMon.applescript, from darwin13

property DEF_ALL : false
property DEF_DEBUG_LEVEL : 1

on moveForMon(pars)

	set {all, debug_level} to {DEF_ALL, DEF_DEBUG_LEVEL}
	try
		set all to all of pars
	end try
	try
		set debug_level to debug_level of pars
	end try

	-- debug mode
	if debug_level > 0 then
		log "debug mode = " & debug_level
		if debug_level > 1 then
			display dialog "debug mode = " & debug_level
		end if
	end if

	-- set monitoring tools' positions
	-- SimpleFloatingClock
	set w_sfcCEST to 1
	set w_sfcJST to 2

	-- XRG
	set w_XRG to 1

	-- set monitoring tool's name
	-- GeekTool
	set s_gtCal to "gcalCal"
	set s_gtGcal to "gcalList"
	set s_gtTask to "gtasklist"
	set s_gtPs to "myps"

	-- x posiiotn for monitoring
	set ledge to -160
	set ledgeSFCoffset to 20

	-- y positions
	set y_sfcCEST to 30
	set y_sfcJST to y_sfcCEST + 100
	set y_gtCal to y_sfcJST + 105
	set y_gtGcal to y_gtCal + 115
	set y_gtTask to y_gtGcal + 175
	set y_gtPs to y_gtTask + 85
	set y_XRG to y_gtPs + 75

	-- app to be excepted
	set expApp to {"XRG"}

	-- app to be half size, in left monitor (0.7 times full)
	set halfSizeApp_L to {}

	-- app to be half size, in right monitor (0.7 times full)
	set halfSizeApp_R to {"AdobeReader"}

	-- app only to be moved, in left monitor
	set noResizeApp_L to {}

	-- app only to be moved, in right monitor
	set noResizeApp_R to {"Finder", "Skype", "Microsoft Word", "Microsoft Excel", "Microsoft PowerPoint"}

	-- app to be moved left
	set app_L to {"firefox", "Evernote", "thunderbird", "thunderbird-bin", "Mail"}

	-- app to be moved right
	set app_R to {"iTerm"}

	-- get screen size
	tell application "Finder"
		set scriptPath to (path to me)'s folder as text
	end tell
	set windowSizeScpt to scriptPath & "windowSize.scpt"
	set windowSize to load script file windowSizeScpt

	-- main screen
	set svs to windowSize's getVisibleFrame(1, 1) --+1 is used to avoid edge, especially needed for y position
	set dPosX to (item 1 of svs) + 1
	set dPosY to (item 2 of svs) + 1
	set dWidth to item 3 of svs
	set dHeight to item 4 of svs

	-- try to get left screen
	set dPosX_L to dPosX + 1
	set dPosY_L to dPosY + 1
	try
		set svsL to windowSize's getVisibleFrame(-1, 1)
		set dPosX_L to (item 1 of svsL) + 1
		set dPosY_L to (item 2 of svsL) + 1
	end try

	-- try to get right screen
	set dPosX_R to dPosX + 1
	set dPosY_R to dPosY + 1
	try
		set svsR to windowSize's getVisibleFrame(dPosX + dWidth + 1, 1)
		set dPosX_R to (item 1 of svsR) + 1
		set dPosY_R to (item 2 of svsR) + 1
	end try

	-- move monitoring tools
	if dPosX_L < 0 then
		if debug_level > 0 then
			log "ledge to ledgeDual"
		end if
	else
		set ledge to dWidth + ledge
		if debug_level > 0 then
			log "ledge to ledgeSingle"
		end if
	end if

	tell application "System Events"
		-- SimpleFloatingClock
		try
			set appName to "SimpleFloatingClock"
			tell process appName
				tell window w_sfcCEST
					set size to {1000, 1000}
					set position to {ledge + ledgeSFCoffset, y_sfcCEST}
				end tell
				tell window w_sfcJST
					set size to {1000, 1000}
					set position to {ledge + ledgeSFCoffset, y_sfcJST}
				end tell
			end tell
		end try

		---- GeekTool
		--try
		--	--set appName to "GeekTool"
		--	set appName to "GeekTool Helper" -- for GeekTool 3
		--
		--	tell process appName
		--		set nW to number of windows
		--		--display dialog appName & " in process, nWindows=" & nW
		--		tell window w_gtCal
		--		end tell
		--		tell window w_gtGcal
		--			-- set size to {1000, 1000}
		--			set position to {ledge, y_gtGcal}
		--		end tell
		--		tell window w_gtTask
		--			-- set size to {1000, 1000}
		--			set position to {ledge, y_gtTask}
		--		end tell
		--		tell window w_gtPs
		--			-- set size to {1000, 1000}
		--			set position to {ledge, y_gtPs}
		--		end tell
		--	end tell
		--	--on error errMsg
		--	--	display dialog "ERROR: " & errMsg
		--end try

		-- XRG
		try
			set appName to "XRG"
			tell process appName
				tell window w_XRG
					set size to {1000, 2000}
					set position to {ledge, y_XRG}
				end tell
			end tell
		end try
	end tell

	-- GeekTool (should be outside of application "System Events", and use application "GeekTool Helper" ?)
	-- can't use position to geeklets
	tell application "GeekTool Helper" -- can not use appName (variable), which shows error at id?
		--geeklets
		repeat with g in every «class gLet»
			tell g
				name
				if name is s_gtCal then
					set «class xpos» to ledge
					set «class ypos» to y_gtCal
				else if name is s_gtGcal then
					set «class xpos» to ledge
					set «class ypos» to y_gtGcal
				else if name is s_gtTask then
					set «class xpos» to ledge
					set «class ypos» to y_gtTask
				else if name is s_gtPs then
					set «class xpos» to ledge
					set «class ypos» to y_gtPs
				end if
			end tell
		end repeat
	end tell

	-- Move/Resize other windows
	if all then
		-- get application name
		tell application "System Events"
			set appList to (get name of every application process whose visible is true)
		end tell

		-- repeat for all app
		repeat with appName in appList
			if appName is not in expApp then
				tell application "System Events"
					try
						tell process appName
							set nW to number of windows
							repeat with i from 1 to nW
								if debug_level > 0 then
									log appName & " " & i
									if debug_level > 1 then
										display dialog appName & " " & i
									end if
								end if
								if appName is in halfSizeApp_L then
									if debug_level > 0 then
										log "half size left"
										if debug_level > 1 then
											display dialog "half size left"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, xsize:0.7, ysize:0.7, moveForMon:false, debug_level:debug_level})
								else if appName is in halfSizeApp_R then
									if debug_level > 0 then
										log "half size right"
										if debug_level > 1 then
											display dialog "half size right"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, xsize:0.7, ysize:0.7, moveForMon:false, debug_level:debug_level})
								else if appName is in noResizeApp_L then
									if debug_level > 0 then
										log "half size left"
										if debug_level > 1 then
											display dialog "half size left"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, resize:0, moveForMon:false, debug_level:debug_level})
								else if appName is in noResizeApp_R then
									if debug_level > 0 then
										log "move right"
										if debug_level > 1 then
											display dialog "move right"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, resize:0, moveForMon:false, debug_level:debug_level})
								else if appName is in app_L then
									if debug_level > 0 then
										log "move left full size"
										if debug_level > 1 then
											display dialog "move left full size"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, moveForMon:false, debug_level:debug_level})
								else if appName is in app_R then
									if debug_level > 0 then
										log "move right full size"
										if debug_level > 1 then
											display dialog "move right full size"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, moveForMon:false, debug_level:debug_level})
								end if
							end repeat
						end tell
					end try
				end tell
			end if
		end repeat
	end if
end moveForMon

on run
	moveForMon({})
end run

property DEF_ALL : false
property DEF_DEBUG_LEVEL : 1

on moveForMon(pars)

	set {all, debug_level} to {DEF_ALL, DEF_DEBUG_LEVEL}
	try
		set all to all of pars
	end try
	try
		set debug_level to debug_level of pars
	end try

	-- debug mode
	if debug_level > 0 then
		log "debug mode = " & debug_level
		if debug_level > 1 then
			display dialog "debug mode = " & debug_level
		end if
	end if

	-- set monitoring tools' positions
	-- SimpleFloatingClock
	set w_sfcCEST to 1
	set w_sfcJST to 2

	-- XRG
	set w_XRG to 1

	-- set monitoring tool's name
	-- GeekTool
	set s_gtCal to "gcalCal"
	set s_gtGcal to "gcalList"
	set s_gtTask to "gtasklist"
	set s_gtPs to "myps"

	-- x posiiotn for monitoring
	set ledge to -160
	set ledgeSFCoffset to 20

	-- y positions
	set y_sfcCEST to 30
	set y_sfcJST to y_sfcCEST + 100
	set y_gtCal to y_sfcJST + 105
	set y_gtGcal to y_gtCal + 115
	set y_gtTask to y_gtGcal + 175
	set y_gtPs to y_gtTask + 85
	set y_XRG to y_gtPs + 75

	-- app to be excepted
	set expApp to {"XRG"}

	-- app to be half size, in left monitor (0.7 times full)
	set halfSizeApp_L to {}

	-- app to be half size, in right monitor (0.7 times full)
	set halfSizeApp_R to {"AdobeReader"}

	-- app only to be moved, in left monitor
	set noResizeApp_L to {}

	-- app only to be moved, in right monitor
	set noResizeApp_R to {"Finder", "Skype", "Microsoft Word", "Microsoft Excel", "Microsoft PowerPoint"}

	-- app to be moved left
	set app_L to {"firefox", "Evernote", "thunderbird", "thunderbird-bin", "Mail"}

	-- app to be moved right
	set app_R to {"iTerm"}

	-- get screen size
	tell application "Finder"
		set scriptPath to (path to me)'s folder as text
	end tell
	set windowSizeScpt to scriptPath & "windowSize.scpt"
	set windowSize to load script file windowSizeScpt

	-- main screen
	set svs to windowSize's getVisibleFrame(1, 1) --+1 is used to avoid edge, especially needed for y position
	set dPosX to (item 1 of svs) + 1
	set dPosY to (item 2 of svs) + 1
	set dWidth to item 3 of svs
	set dHeight to item 4 of svs

	-- try to get left screen
	set dPosX_L to dPosX + 1
	set dPosY_L to dPosY + 1
	try
		set svsL to windowSize's getVisibleFrame(-1, 1)
		set dPosX_L to (item 1 of svsL) + 1
		set dPosY_L to (item 2 of svsL) + 1
	end try

	-- try to get right screen
	set dPosX_R to dPosX + 1
	set dPosY_R to dPosY + 1
	try
		set svsR to windowSize's getVisibleFrame(dPosX + dWidth + 1, 1)
		set dPosX_R to (item 1 of svsR) + 1
		set dPosY_R to (item 2 of svsR) + 1
	end try

	-- move monitoring tools
	if dPosX_L < 0 then
		if debug_level > 0 then
			log "ledge to ledgeDual"
		end if
	else
		set ledge to dWidth + ledge
		if debug_level > 0 then
			log "ledge to ledgeSingle"
		end if
	end if

	tell application "System Events"
		-- SimpleFloatingClock
		try
			set appName to "SimpleFloatingClock"
			tell process appName
				tell window w_sfcCEST
					set size to {1000, 1000}
					set position to {ledge + ledgeSFCoffset, y_sfcCEST}
				end tell
				tell window w_sfcJST
					set size to {1000, 1000}
					set position to {ledge + ledgeSFCoffset, y_sfcJST}
				end tell
			end tell
		end try

		---- GeekTool
		--try
		--	--set appName to "GeekTool"
		--	set appName to "GeekTool Helper" -- for GeekTool 3
		--
		--	tell process appName
		--		set nW to number of windows
		--		--display dialog appName & " in process, nWindows=" & nW
		--		tell window w_gtCal
		--		end tell
		--		tell window w_gtGcal
		--			-- set size to {1000, 1000}
		--			set position to {ledge, y_gtGcal}
		--		end tell
		--		tell window w_gtTask
		--			-- set size to {1000, 1000}
		--			set position to {ledge, y_gtTask}
		--		end tell
		--		tell window w_gtPs
		--			-- set size to {1000, 1000}
		--			set position to {ledge, y_gtPs}
		--		end tell
		--	end tell
		--	--on error errMsg
		--	--	display dialog "ERROR: " & errMsg
		--end try

		-- XRG
		try
			set appName to "XRG"
			tell process appName
				tell window w_XRG
					set size to {1000, 2000}
					set position to {ledge, y_XRG}
				end tell
			end tell
		end try
	end tell

	-- GeekTool (should be outside of application "System Events", and use application "GeekTool Helper" ?)
	-- can't use position to geeklets
	tell application "GeekTool Helper" -- can not use appName (variable), which shows error at id?
		--geeklets
		repeat with g in geeklets
			tell g
				name
				if name is s_gtCal then
					set x position to ledge
					set y position to y_gtCal
				else if name is s_gtGcal then
					set x position to ledge
					set y position to y_gtGcal
				else if name is s_gtTask then
					set x position to ledge
					set y position to y_gtTask
				else if name is s_gtPs then
					set x position to ledge
					set y position to y_gtPs
				end if
			end tell
		end repeat
	end tell

	-- Move/Resize other windows
	if all then
		-- get application name
		tell application "System Events"
			set appList to (get name of every application process whose visible is true)
		end tell

		-- repeat for all app
		repeat with appName in appList
			if appName is not in expApp then
				tell application "System Events"
					try
						tell process appName
							set nW to number of windows
							repeat with i from 1 to nW
								if debug_level > 0 then
									log appName & " " & i
									if debug_level > 1 then
										display dialog appName & " " & i
									end if
								end if
								if appName is in halfSizeApp_L then
									if debug_level > 0 then
										log "half size left"
										if debug_level > 1 then
											display dialog "half size left"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, xsize:0.7, ysize:0.7, moveForMon:false, debug_level:debug_level})
								else if appName is in halfSizeApp_R then
									if debug_level > 0 then
										log "half size right"
										if debug_level > 1 then
											display dialog "half size right"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, xsize:0.7, ysize:0.7, moveForMon:false, debug_level:debug_level})
								else if appName is in noResizeApp_L then
									if debug_level > 0 then
										log "half size left"
										if debug_level > 1 then
											display dialog "half size left"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, resize:0, moveForMon:false, debug_level:debug_level})
								else if appName is in noResizeApp_R then
									if debug_level > 0 then
										log "move right"
										if debug_level > 1 then
											display dialog "move right"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, resize:0, moveForMon:false, debug_level:debug_level})
								else if appName is in app_L then
									if debug_level > 0 then
										log "move left full size"
										if debug_level > 1 then
											display dialog "move left full size"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_L, monPosY:dPosY_L, moveForMon:false, debug_level:debug_level})
								else if appName is in app_R then
									if debug_level > 0 then
										log "move right full size"
										if debug_level > 1 then
											display dialog "move right full size"
										end if
									end if
									windowSize's windowSize({appName:appName, windowNumber:i, monPosX:dPosX_R, monPosY:dPosY_R, moveForMon:false, debug_level:debug_level})
								end if
							end repeat
						end tell
					end try
				end tell
			end if
		end repeat
	end if
end moveForMon

on run
	moveForMon({})
end run


Set reproducibility back to "Always"

Set reproducibility back to "Always"

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@56891 91177308-0d34-0410-b5e6-96231b3b80d8

FasdUAS 1.101.10
k
i
I
.aevtoappnull****
	o0argv
k

r

n
1

leng
o0argv
o0nN
r
m
o0res
Z

A

o
0nN
m
R
.ascrerr ********
mUsage: FileRadar component componentVersion classification personID problemTitle description diag config {files}* !
 r"#
"n$%
$4&

cobj
&m
%o0argv
#o"0mycomponentnamemyComponentName!'(
'r &)*
)n $+,
+4!$-

cobj
-m"#
,o !0argv
*o(0mycomponentversionmyComponentVersion(./
.r'-01
0n'+23
24(+4

cobj
4m)*
3o'(0argv
1o,0myclassificationcodemyClassificationCode/56
5r.478
7n.29:
94/2;

cobj
;m01
:o./0argv
8o0
mypersonid
myPersonID6<=
<r5;>?
>n59@A
@469B

cobj
Bm78
Ao560argv
?o 0myproblemtitlemyProblemTitle=CD
Cr<BEF
En<@GH
G4=@I

cobj
Im>?
Ho<=0argv
Fo0
mydescription
myDescriptionDJK
JrCMLM
LnCINO
N4DIP

cobj
PmEH
OoCD0argv
Mo0mydiagmyDiagKQR
QrNVST
SnNRUV
U4ORW

cobj
WmPQ
VoNO0argv
To0myconfigmyConfigRXY
XZWwZ[\
Z?WZ]^
]oWX0nN
^mXY
[r]n_`
_n]jab
a7^jcd

cobj
cmbf
dogi0nN
bo]^0argv
`o0myfilesmyFiles
\rqwef
eJqs
fo0myfilesmyFilesYgh
grxij
iIxk0submitreportsubmitReportklm
loyz"0mycomponentnamemyComponentNamemno
noz{(0mycomponentversionmyComponentVersionopq
po{|,0myclassificationcodemyClassificationCodeqrs
ro|}0
mypersonid
myPersonIDstu
to}~ 0myproblemtitlemyProblemTitleuvw
vo~0
mydescription
myDescriptionwxy
xo0mydiagmyDiagyz{
zo0myconfigmyConfig{|
|o0myfilesmyFiles
jo0resh}
}L~
~o0res
l
l
i
I0submitreportsubmitReport
o"0mycomponentnamemyComponentName
o(0mycomponentversionmyComponentVersion
o,0myclassificationcodemyClassificationCode
o0
mypersonid
myPersonID
o 0myproblemtitlemyProblemTitle
o0
mydescription
myDescription
o0mydiagmyDiag
o0myconfigmyConfig
o0myfilesmyFiles
k
O

I
.miscactvnullnull
mRADRalisHLeopard 9C31ᚄH+	Radar.app3	 Applications$#Leopard 9C31:Applications:Radar.app	Radar.appLeopard 9C31Applications/Radar.app/
l
O
k
l set myClassificationCode to 4 -- 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task;8 set myClassificationCode to 4 -- 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task;
r
m
o.0myreproducibilitycodemyReproducibilityCode
l
r
m
boovfals
o0savenewprobsaveNewProb true or false true or false
l
lhb- formType & severityCode are no longer used in Radar 6.3 and later. If passed, they are ignored.:- formType & severityCode are no longer used in Radar 6.3 and later. If passed, they are ignored.:
le_ set myFormType to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored. set myFormType to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored.
lic set mySeverityCode to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored. set mySeverityCode to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored.
l--
l
r
m
o0bugidintbugIDInt
r
m
o0res
Z
m
boovfals
k#
r#,
b#*
b#(
b#&
o#$0res
m$%Component:
o&'"0mycomponentnamemyComponentName
m()

o0res
r-6
b-4
b-2
b-0
o-.0res
m./&Component Version:
o01(0mycomponentversionmyComponentVersion
m23

o0res
r7@
b7>
b7<
b7:
o780res
m89Person ID:
o:;0
mypersonid
myPersonID
m<=

o0res
rAF

bAD

oAB0res

mBC--

o0res
rGP
bGN
bGL
bGJ
oGH0res
mHITitle:
oJK 0myproblemtitlemyProblemTitle
mLM

o~~0res
rQZ !
 bQX"#
"bQV$%
$bQT&'
&oQR}}0res
'mRS(())Description:
%oTU||0
mydescription
myDescription
#mVW**++

!o{{0res,-
,r[d./
.b[b01
0b[`23
2b[^45
4o[\zz0res
5m\]6677Diagnosis:
3o^_yy0mydiagmyDiag
1m`a8899

/oxx0res-:;
:rer<=
<bep>?
>bel@A
@bejBC
Boefww0res
CmfiDDEEConfig:
Aojkvv0myconfigmyConfig
?mloFFGG

=ouu0res;HI
HrsJK
Jbs~LM
LbszNO
NbsxPQ
Posttt0res
QmtwRRSS*Classification Code:
Ooxyss,0myclassificationcodemyClassificationCode
Mmz}TTUU

Korr0resIVW
VrXY
XbZ[
Zb\]
\b^_
^oqq0res
_m``aa,Reproducibility Code:
]opp.0myreproducibilitycodemyReproducibilityCode
[mbbcc

Yooo0resWdn
dYemfgl
erhi
hbjk
jblm
lbno
nbpq
pbrs
rokk0res
smttuu
File
qojj0i
omvvww:
mnxy
x4iz
i
cobj
zohh0i
yogg0myfilesmyFiles
km{{||

ioff0resm0i
fmee
gl}dc
}n~
~1b
b
leng
oaa0myfilesmyFilesdcln
k
r
I`_
`.rdrlnprb****obj _^
^
desc
l
]\
o[[0
mydescription
myDescription]\Z
Z
diag
l
YX
oWW0mydiagmyDiagYXV
V
cmvr
l
UT
oSS(0mycomponentversionmyComponentVersionUTR
R
cmnm
l
QP
oOO"0mycomponentnamemyComponentNameQPN
N
rcod
l
ML
oKK.0myreproducibilitycodemyReproducibilityCodeMLJ
J
orig
l
IH
oGG0
mypersonid
myPersonIDIHF
F
pbti
l
ED
oCC 0myproblemtitlemyProblemTitleEDB
B
conf
l
A@
o??0myconfigmyConfigA@>
>
clcd
l
=<
o;;,0myclassificationcodemyClassificationCode=<:9
:
dsav
o880savenewprobsaveNewProb9
o770bugidbugID
l654654
l3393 On failure this will have random garbage appended.f On failure this will have random garbage appended.
Q"
r
c
o220bugidbugID
m1
1
long
o000bugidintbugIDInt
R/.-
/.ascrerr ********.-
k"
r
n
7,
,
ctxt
m	++
m**
o))0bugidbugID
o((0errormessageerrorMessage'
L"
b!
b
b
b
m(
o&&0bugidintbugIDInt
m
, """
o%%0errormessageerrorMessage
m """)'
l##$#"$#"
r#0
b#.
b#*
b#(
o#$!!0res
m$'Filed:
o()  0bugidbugID
m*-

o0res
l11
Y1
k@{
r@R
b@P
b@L
b@E
o@A0res
mADAttached:
lEK
nEK
4FK

cobj
oIJ0i
oEF0myfilesmyFiles
mLO

o0res
rSk
ISg
.rdrladdfutxtobj

mr11
lW]
nW]
4X]

cobj
o[\0i
oWX0myfilesmyFiles

pbid
o`a0bugidbugID
o0ok
rl{
bly
blu
blq
olm0res
	mmp

  Result:
oqt0ok
mux

o0res0i
m45
l5;
n5;
16:

leng
o560myfilesmyFiles
l
r
b
b
o0res
m6Added keyword: LLVM_CHECKER
m

o0res
I
.rdrladkilongobj  !"

pbid
!o0bugidbugID"#

keyi
#m$%
$l%&
&L'
'b()
(b*+
*b,-
,b./
.m0011(
/o0bugidintbugIDInt
-m2233
, """
+o0res
)m4455""")
m66RADRalisHLeopard 9C31ᚄH+	Radar.app3	 Applications$#Leopard 9C31:Applications:Radar.app	Radar.appLeopard 9C31Applications/Radar.app/7
7l89:8
.aevtoappnull****0submitreportsubmitReport9;<
.aevtoappnull****0argv;0argv<

leng0nN0res

cobj"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig	0myfilesmyFiles0submitreportsubmitReport,EOEO	)jYhOk/EOl/EOm/EO/EO/EO/EOa/E`O/E`O[\[Za\Z2E`YjvE`O*___a+EO:=>0submitreportsubmitReport?	?	"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles="0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles.0myreproducibilitycodemyReproducibilityCode0savenewprobsaveNewProb0bugidintbugIDInt0res0i0bugidbugID0errormessageerrorMessage0ok>@(*68DFRT`btv{
024
.miscactvnullnull

leng

cobj

desc

diag

cmvr

cmnm

rcod

orig

pbti

conf

clcd

dsav
.rdrlnprb****obj

long

ctxt

mr11

pbid
.rdrladdfutxtobj

keyi
.rdrladkilongobj *jUOkEOfEOjEOEOf%%%EO%%%EO%%%EO%EO%%%EO%%%EO%%%EOa%%a%EOa%%a%EOa%%a%EO+ka,Ekh
a%%a%a/%a%E[OYY*aaaaaa a!a"a#a$a%&EOa'&EW'X()[a*\[Zm\Zi2EOa+%a,%%a-%Oa.%%a/%EONka,Ekh
a0%a/%a1%EO*a2a/a3a45E^Oa6%]%a7%E[OYOa8%a9%EO*a3a:a;a4<Oa=%a>%%a?%Uascr
ޭ

FasdUAS 1.101.10
k
i
I
.aevtoappnull****
	o0argv
k

r

n
1

leng
o0argv
o0nN
r
m
o0res
Z

A

o
0nN
m
R
.ascrerr ********
mUsage: FileRadar component componentVersion classification personID problemTitle description diag config {files}* !
 r"#
"n$%
$4&

cobj
&m
%o0argv
#o"0mycomponentnamemyComponentName!'(
'r &)*
)n $+,
+4!$-

cobj
-m"#
,o !0argv
*o(0mycomponentversionmyComponentVersion(./
.r'-01
0n'+23
24(+4

cobj
4m)*
3o'(0argv
1o,0myclassificationcodemyClassificationCode/56
5r.478
7n.29:
94/2;

cobj
;m01
:o./0argv
8o0
mypersonid
myPersonID6<=
<r5;>?
>n59@A
@469B

cobj
Bm78
Ao560argv
?o 0myproblemtitlemyProblemTitle=CD
Cr<BEF
En<@GH
G4=@I

cobj
Im>?
Ho<=0argv
Fo0
mydescription
myDescriptionDJK
JrCMLM
LnCINO
N4DIP

cobj
PmEH
OoCD0argv
Mo0mydiagmyDiagKQR
QrNVST
SnNRUV
U4ORW

cobj
WmPQ
VoNO0argv
To0myconfigmyConfigRXY
XZWwZ[\
Z?WZ]^
]oWX0nN
^mXY
[r]n_`
_n]jab
a7^jcd

cobj
cmbf
dogi0nN
bo]^0argv
`o0myfilesmyFiles
\rqwef
eJqs
fo0myfilesmyFilesYgh
grxij
iIxk0submitreportsubmitReportklm
loyz"0mycomponentnamemyComponentNamemno
noz{(0mycomponentversionmyComponentVersionopq
po{|,0myclassificationcodemyClassificationCodeqrs
ro|}0
mypersonid
myPersonIDstu
to}~ 0myproblemtitlemyProblemTitleuvw
vo~0
mydescription
myDescriptionwxy
xo0mydiagmyDiagyz{
zo0myconfigmyConfig{|
|o0myfilesmyFiles
jo0resh}
}L~
~o0res
l
l
i
I0submitreportsubmitReport
o"0mycomponentnamemyComponentName
o(0mycomponentversionmyComponentVersion
o,0myclassificationcodemyClassificationCode
o0
mypersonid
myPersonID
o 0myproblemtitlemyProblemTitle
o0
mydescription
myDescription
o0mydiagmyDiag
o0myconfigmyConfig
o0myfilesmyFiles
k
O

I
.miscactvnullnull
mRADRalisHLeopard 9C31ᚄH+	Radar.app3	 Applications$#Leopard 9C31:Applications:Radar.app	Radar.appLeopard 9C31Applications/Radar.app/
l
O
k
l set myClassificationCode to 4 -- 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task;8 set myClassificationCode to 4 -- 1=security; 2=crash/hang/data loss; 3=performance; 4=UI/usability; 6=serious; 7=other; 9=feature; 10=enhancement; 12=task;
r
m
o.0myreproducibilitycodemyReproducibilityCode
l
r
m
boovfals
o0savenewprobsaveNewProb true or false true or false
l
lhb- formType & severityCode are no longer used in Radar 6.3 and later. If passed, they are ignored.:- formType & severityCode are no longer used in Radar 6.3 and later. If passed, they are ignored.:
le_ set myFormType to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored. set myFormType to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored.
lic set mySeverityCode to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored. set mySeverityCode to 99 -- This parameter is no longer used in Radar 6.3 and later, it's ignored.
l--
l
r
m
o0bugidintbugIDInt
r
m
o0res
Z
m
boovfals
k#
r#,
b#*
b#(
b#&
o#$0res
m$%Component:
o&'"0mycomponentnamemyComponentName
m()

o0res
r-6
b-4
b-2
b-0
o-.0res
m./&Component Version:
o01(0mycomponentversionmyComponentVersion
m23

o0res
r7@
b7>
b7<
b7:
o780res
m89Person ID:
o:;0
mypersonid
myPersonID
m<=

o0res
rAF

bAD

oAB0res

mBC--

o0res
rGP
bGN
bGL
bGJ
oGH0res
mHITitle:
oJK 0myproblemtitlemyProblemTitle
mLM

o~~0res
rQZ !
 bQX"#
"bQV$%
$bQT&'
&oQR}}0res
'mRS(())Description:
%oTU||0
mydescription
myDescription
#mVW**++

!o{{0res,-
,r[f./
.b[d01
0b[`23
2b[^45
4o[\zz0res
5m\]6677Diagnosis:
3o^_yy0mydiagmyDiag
1m`c8899

/oxx0res-:;
:rgt<=
<bgr>?
>bgn@A
@bglBC
Boghww0res
CmhkDDEEConfig:
Aolmvv0myconfigmyConfig
?mnqFFGG

=ouu0res;HI
HruJK
JbuLM
Lbu|NO
NbuzPQ
Pouvtt0res
QmvyRRSS*Classification Code:
Ooz{ss,0myclassificationcodemyClassificationCode
Mm|TTUU

Korr0resIVW
VrXY
XbZ[
Zb\]
\b^_
^oqq0res
_m``aa,Reproducibility Code:
]opp.0myreproducibilitycodemyReproducibilityCode
[mbbcc

Yooo0resWdn
dYemfgl
erhi
hbjk
jblm
lbno
nbpq
pbrs
rokk0res
smttuu
File
qojj0i
omvvww:
mnxy
x4iz
i
cobj
zohh0i
yogg0myfilesmyFiles
km{{||

ioff0resm0i
fmee
gl}dc
}n~
~1b
b
leng
oaa0myfilesmyFilesdcln
k
r
I`_
`.rdrlnprb****obj _^
^
desc
l
]\
o[[0
mydescription
myDescription]\Z
Z
diag
l
YX
oWW0mydiagmyDiagYXV
V
cmvr
l
UT
oSS(0mycomponentversionmyComponentVersionUTR
R
cmnm
l
QP
oOO"0mycomponentnamemyComponentNameQPN
N
rcod
l
ML
oKK.0myreproducibilitycodemyReproducibilityCodeMLJ
J
orig
l
IH
oGG0
mypersonid
myPersonIDIHF
F
pbti
l
ED
oCC 0myproblemtitlemyProblemTitleEDB
B
conf
l
A@
o??0myconfigmyConfigA@>
>
clcd
l
=<
o;;,0myclassificationcodemyClassificationCode=<:9
:
dsav
o880savenewprobsaveNewProb9
o770bugidbugID
l654654
l3393 On failure this will have random garbage appended.f On failure this will have random garbage appended.
Q$
r
c
o220bugidbugID
m1
1
long
o000bugidintbugIDInt
R/.-
/.ascrerr ********.-
k$
r
n
7,
,
ctxt
m
++
m**
o))0bugidbugID
o((0errormessageerrorMessage'
L$
b#
b
b
b
m(
o&&0bugidintbugIDInt
m
, """
o%%0errormessageerrorMessage
m"""")'
l%%$#"$#"
r%2
b%0
b%,
b%*
o%&!!0res
m&)Filed:
o*+  0bugidbugID
m,/

o0res
l33
Y3
kB}
rBT
bBR
bBN
bBG
oBC0res
mCFAttached:
lGM
nGM
4HM

cobj
oKL0i
oGH0myfilesmyFiles
mNQ

o0res
rUm
IUi
.rdrladdfutxtobj

mr11
lY_
nY_
4Z_

cobj
o]^0i
oYZ0myfilesmyFiles

pbid
obc0bugidbugID
o0ok
rn}
bn{
bnw
bns
ono0res
	mor

  Result:
osv0ok
mwz

o0res0i
m67
l7=
n7=
18<

leng
o780myfilesmyFiles
l
r
b
b
o0res
m6Added keyword: LLVM_CHECKER
m

o0res
I
.rdrladkilongobj  !"

pbid
!o0bugidbugID"#

keyi
#m$%
$l%&
&L'
'b()
(b*+
*b,-
,b./
.m0011(
/o0bugidintbugIDInt
-m2233
, """
+o0res
)m4455""")
m66RADRalisHLeopard 9C31ᚄH+	Radar.app3	 Applications$#Leopard 9C31:Applications:Radar.app	Radar.appLeopard 9C31Applications/Radar.app/7
7l89:;<=>?@ABCD8
.aevtoappnull****0submitreportsubmitReport0nN0res"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles9EF
.aevtoappnull****0argvE0argvF

leng0nN0res

cobj"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig	0myfilesmyFiles0submitreportsubmitReport,EOEO	)jYhOk/EOl/EOm/EO/EO/EO/EOa/E`O/E`O[\[Za\Z2E`YjvE`O*___a+EO:GH0submitreportsubmitReportI	I	"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFilesG"0mycomponentnamemyComponentName(0mycomponentversionmyComponentVersion,0myclassificationcodemyClassificationCode0
mypersonid
myPersonID 0myproblemtitlemyProblemTitle0
mydescription
myDescription0mydiagmyDiag0myconfigmyConfig0myfilesmyFiles.0myreproducibilitycodemyReproducibilityCode0savenewprobsaveNewProb0bugidintbugIDInt0res0i0bugidbugID0errormessageerrorMessage0okHA(*68DFRT`btv{
024
.miscactvnullnull

leng

cobj

desc

diag

cmvr

cmnm

rcod

orig

pbti

conf

clcd

dsav
.rdrlnprb****obj

long

ctxt

mr11

pbid
.rdrladdfutxtobj

keyi
.rdrladkilongobj *jUOEOfEOjEOEOf%%%EO%%%EO%%%EO%EO%%%EO%%%EO%%a%EOa%%a%EOa%%a%EOa%%a%EO+ka,Ekh
a%%a%a/%a%E[OYY*aaaaa a!a"a#a$a%a&'EOa(&EW'X)*[a+\[Zm\Zi2EOa,%a-%%a.%Oa/%%a0%EONka,Ekh
a1%a/%a2%EO*a3a/a4a56E^Oa7%]%a8%E[OYOa9%a:%EO*a4a;a<a5=Oa>%a?%%a@%U	;JJ(6257428, """Filed: 6257428
Attached: /tmp/scan-build-2008-09-30-34/report-IiREds.html
  Result: 1

Added keyword: LLVM_CHECKER
""")<KK8Bugs found by Clang Analyzer=LLX>MM3?NN@OOleakAPP4Bug reported by the clang static analyzer.

Description: leak

File: /Volumes/Data/Users/kremenek/llvm/tools/clang/test/Analysis/CFDate.m

Line: 120

BQQCRRD~S~STTUU`/tmp/scan-build-2008-09-30-34/report-IiREds.htmlascr
ޭ


make popup menu selecting work

make popup menu selecting work

-- fmGUI_Popup_SelectByCommand({objRef:"", objValue:"", calcValue:null, selectCommand:"", clickIfAlreadySet:""})
-- Daniel A. Shockley, NYHTC
-- Selects a choice from a popup menu

(*
REQUIRES:
	clickObjectByCoords
	fmGUI_SpecifyCalcWindowSet

HISTORY:
	2020-05-21 ( dshockley ): Try a 2nd time to click-and-wait for the menu to appear. And, don't try a 2nd "exists" command, since that seems to fail. Instead, save the result of that in a variable "isMenuOpen".
	1.4.1 - 2018-04-30 ( eshagdar ): tell FM to click on the value since it might not be visible ( and unclickable by CLI ).
	1.4 - 2017-09-22 ( eshagdar ): set calc using handler.
	1.3 - 2017-09-06 ( eshagdar ): added calcValue param that sets a calc in the 'Specify Calculation' that comes up.
	1.2 - 2017-09-05 ( eshagdar ): clicking done by handler
	1.1 - 2017-06-29 ( eshagdar ): prefs must be a record. incoming param may be a string, so ensure that it's an object reference.
	1.0 - created
*)

on run
	tell application "System Events"
		tell application process "FileMaker Pro Advanced"
			set frontmost to true
			delay 1
			--set popUpButtonRef to pop up button "Available menu commands:" of window 1
			set popUpButtonRef to pop up button "View" of window 1
		end tell
	end tell

	fmGUI_Popup_SelectByCommand({objRef:popUpButtonRef, objValue:"limited...", calcValue:"If ( True; True; GetAsNumber ( \"1\" ) )", clickIfAlreadySet:true})

end run

--------------------
-- START OF CODE
--------------------

on fmGUI_Popup_SelectByCommand(prefs)
	-- version 2020-05-21-1321

	set defaultPrefs to {objRef:null, objValue:null, calcValue:null, selectCommand:"is", clickIfAlreadySet:false}
	set prefs to prefs & defaultPrefs

	set objRef to ensureObjectRef(objRef of prefs)
	set selectCommand to selectCommand of prefs
	set objValue to objValue of prefs
	set clickIfAlreadySet to clickIfAlreadySet of prefs -- re-select even if popup is the requested value.

	try
		tell application "System Events"
			if not (exists objRef) then error "The specified objRef does not exist." number 1024

			-- the objRef DOES exist
			set mustPick to false
			if not (exists value of objRef) then
				-- first check if the value of the objRef exists - if it doesn't, then we can't test it directly
				set mustPick to true

			else -- we can see the value without 'picking' the menu, so test it:
				-- note that our selection might be one of several 'matching' commands:
				if clickIfAlreadySet then
					-- RE-SELECT even if popup already is the requested value.
					set mustPick to true

				else if selectCommand is equal to "is" then
					if value of objRef is not objValue then
						set mustPick to true
					end if

				else if selectCommand is equal to "contains" then
					if value of objRef does not contain objValue then
						set mustPick to true
					end if

				else if selectCommand is equal to "startsWith" then
					if value of objRef does not start with objValue then
						set mustPick to true
					end if

				else if selectCommand is equal to "beginsWith" then
					if value of objRef does not start with objValue then
						set mustPick to true
					end if

				else if selectCommand is equal to "endsWith" then
					if value of objRef does not end with objValue then
						set mustPick to true
					end if

				end if
			end if
		end tell

		if mustPick then
			if objValue is not null then

				set isMenuOpen to false (* INITIALIZE *)

				-- click pop up button so the menu becomes available
				delay 0.3 -- short delay to make sure click can happen:
				clickObjectByCoords(objRef)

				-- wait to see if menu becomes available
				repeat 100 times
					try
						tell application "System Events"
							tell application process "FileMaker Pro Advanced"
								if exists (menu 1 of objRef) then
									set isMenuOpen to true
									exit repeat
								end if
							end tell
						end tell
					on error
						delay 0.5
					end try
				end repeat

				if not isMenuOpen then
					-- SECOND attempt to click-then-wait for menu to be available, but give up sooner:

					-- click pop up button so the menu becomes available
					clickObjectByCoords(objRef)

					--wait until menu is available
					repeat 20 times
						try
							tell application "System Events"
								tell application process "FileMaker Pro Advanced"
									if exists (menu 1 of objRef) then
										set isMenuOpen to true
										exit repeat
									end if
								end tell
							end tell
						on error
							delay 0.5
						end try
					end repeat
				end if

				if not isMenuOpen then
					error "Was not able to get the popup _menu_ to appear (by clicking base object) so an item could be chosen." number 1024
				end if

				-- now pick an item from the pop up
				tell application "System Events"
					objRef
					if selectCommand is equal to "is" then
						set objValue to first menu item of menu 1 of objRef whose name is objValue
					else if selectCommand is equal to "contains" then
						set objValue to first menu item of menu 1 of objRef whose name contains objValue
					else if selectCommand is equal to "beginsWith" then
						set objValue to first menu item of menu 1 of objRef whose name starts with objValue
					else if selectCommand is equal to "endsWith" then
						set objValue to first menu item of menu 1 of objRef whose name ends with objValue
					else
						error "unable to pick objValue because select command is failed" number -1024
					end if

					tell process "FileMaker Pro Advanced"
						click objValue
					end tell
				end tell

				-- must tell FM to click since the value might now be available ( need to scroll )
				--clickObjectByCoords(objValue)
			end if

			-- set calc if there is one
			if calcValue of prefs is not null then fmGUI_SpecifyCalcWindowSet({calcValue:calcValue of prefs})
		end if

		return true
	on error errMsg number errNum
		error "unable to fmGUI_Popup_SelectByCommand ( value _" & selectCommand & "_ '" & objValue & "' in popup ) - " & errMsg number errNum
	end try
end fmGUI_Popup_SelectByCommand

--------------------
-- END OF CODE
--------------------

on clickObjectByCoords(objRef)
	tell application "htcLib" to clickObjectByCoords(my coerceToString(objRef))
end clickObjectByCoords

on fmGUI_SpecifyCalcWindowSet(prefs)
	tell application "htcLib" to fmGUI_SpecifyCalcWindowSet(prefs)
end fmGUI_SpecifyCalcWindowSet

on coerceToString(incomingObject)
	-- 2017-07-12 ( eshagdar ): bootstrap code to bring a coerceToString into this file for the sample to run ( instead of having a copy of the handler locally ).

	tell application "Finder" to set coercePath to (container of (container of (path to me)) as text) & "text parsing:coerceToString.applescript"
	set codeCoerce to read file coercePath as text
	tell application "htcLib" to set codeCoerce to "script codeCoerce " & return & getTextBetween({sourceText:codeCoerce, beforeText:"-- START OF CODE", afterText:"-- END OF CODE"}) & return & "end script" & return & "return codeCoerce"
	set codeCoerce to run script codeCoerce
	tell codeCoerce to coerceToString(incomingObject)
end coerceToString

on ensureObjectRef(someObjectRef)
	-- 2017-07-12 ( eshagdar ): bootstrap code to bring a ensureObjectRef into this file for the sample to run ( instead of having a copy of the handler locally ).

	tell application "Finder" to set ensureObjPath to (container of (container of (path to me)) as text) & "text parsing:ensureObjectRef.applescript"
	set codeEnsureObj to read file ensureObjPath as text
	tell application "htcLib" to set codeEnsureObj to "script codeEnsureObj " & return & getTextBetween({sourceText:codeEnsureObj, beforeText:"-- START OF CODE", afterText:"-- END OF CODE"}) & return & "end script" & return & "return codeEnsureObj"
	set codeEnsureObj to run script codeEnsureObj
	tell codeEnsureObj to ensureObjectRef(someObjectRef)
end ensureObjectRef

-- fmGUI_Popup_SelectByCommand({objRef:"", objValue:"", calcValue:null, selectCommand:"", clickIfAlreadySet:""})
-- Daniel A. Shockley, NYHTC
-- Selects a choice from a popup menu

(*
REQUIRES:
	clickObjectByCoords
	fmGUI_SpecifyCalcWindowSet

HISTORY:
	2020-05-21 ( dshockley ): Try a 2nd time to click-and-wait for the menu to appear.
	1.4.1 - 2018-04-30 ( eshagdar ): tell FM to click on the value since it might not be visible ( and unclickable by CLI ).
	1.4 - 2017-09-22 ( eshagdar ): set calc using handler.
	1.3 - 2017-09-06 ( eshagdar ): added calcValue param that sets a calc in the 'Specify Calculation' that comes up.
	1.2 - 2017-09-05 ( eshagdar ): clicking done by handler
	1.1 - 2017-06-29 ( eshagdar ): prefs must be a record. incoming param may be a string, so ensure that it's an object reference.
	1.0 - created
*)

on run
	tell application "System Events"
		tell application process "FileMaker Pro Advanced"
			set frontmost to true
			delay 1
			--set popUpButtonRef to pop up button "Available menu commands:" of window 1
			set popUpButtonRef to pop up button "View" of window 1
		end tell
	end tell

	fmGUI_Popup_SelectByCommand({objRef:popUpButtonRef, objValue:"limited...", calcValue:"If ( True; True; GetAsNumber ( \"1\" ) )", clickIfAlreadySet:true})

end run

--------------------
-- START OF CODE
--------------------

on fmGUI_Popup_SelectByCommand(prefs)
	-- version 2020-05-21-1231

	set defaultPrefs to {objRef:null, objValue:null, calcValue:null, selectCommand:"is", clickIfAlreadySet:false}
	set prefs to prefs & defaultPrefs

	set objRef to ensureObjectRef(objRef of prefs)
	set selectCommand to selectCommand of prefs
	set objValue to objValue of prefs
	set clickIfAlreadySet to clickIfAlreadySet of prefs -- re-select even if popup is the requested value.

	try
		tell application "System Events"
			if not (exists objRef) then error "The specified objRef does not exist." number 1024

			-- the objRef DOES exist
			set mustPick to false
			if not (exists value of objRef) then
				-- first check if the value of the objRef exists - if it doesn't, then we can't test it directly
				set mustPick to true

			else -- we can see the value without 'picking' the menu, so test it:
				-- note that our selection might be one of several 'matching' commands:
				if clickIfAlreadySet then
					-- RE-SELECT even if popup already is the requested value.
					set mustPick to true

				else if selectCommand is equal to "is" then
					if value of objRef is not objValue then
						set mustPick to true
					end if

				else if selectCommand is equal to "contains" then
					if value of objRef does not contain objValue then
						set mustPick to true
					end if

				else if selectCommand is equal to "startsWith" then
					if value of objRef does not start with objValue then
						set mustPick to true
					end if

				else if selectCommand is equal to "beginsWith" then
					if value of objRef does not start with objValue then
						set mustPick to true
					end if

				else if selectCommand is equal to "endsWith" then
					if value of objRef does not end with objValue then
						set mustPick to true
					end if

				end if
			end if
		end tell

		if mustPick then
			if objValue is not null then
				-- click pop up button so the menu becomes available
				delay 0.3 -- short delay to make sure click can happen:
				clickObjectByCoords(objRef)

				-- wait to see if menu becomes available
				repeat 100 times
					try
						tell application "System Events"
							tell application process "FileMaker Pro Advanced"
								if exists (menu 1 of objRef) then exit repeat
							end tell
						end tell
					on error
						delay 0.5
					end try
				end repeat

				if not (exists (menu 1 of objRef)) then
					-- SECOND attempt to click-then-wait for menu to be available, but give up sooner:

					-- click pop up button so the menu becomes available
					clickObjectByCoords(objRef)

					--wait until menu is available
					repeat 20 times
						try
							tell application "System Events"
								tell application process "FileMaker Pro Advanced"
									if exists (menu 1 of objRef) then exit repeat
								end tell
							end tell
						on error
							delay 0.5
						end try
					end repeat
				end if

				-- now pick an item from the pop up
				tell application "System Events"
					objRef
					if selectCommand is equal to "is" then
						set objValue to first menu item of menu 1 of objRef whose name is objValue
					else if selectCommand is equal to "contains" then
						set objValue to first menu item of menu 1 of objRef whose name contains objValue
					else if selectCommand is equal to "beginsWith" then
						set objValue to first menu item of menu 1 of objRef whose name starts with objValue
					else if selectCommand is equal to "endsWith" then
						set objValue to first menu item of menu 1 of objRef whose name ends with objValue
					else
						error "unable to pick objValue because select command is failed" number -1024
					end if

					tell process "FileMaker Pro Advanced"
						click objValue
					end tell
				end tell

				-- must tell FM to click since the value might now be available ( need to scroll )
				--clickObjectByCoords(objValue)
			end if

			-- set calc if there is one
			if calcValue of prefs is not null then fmGUI_SpecifyCalcWindowSet({calcValue:calcValue of prefs})
		end if

		return true
	on error errMsg number errNum
		error "unable to fmGUI_Popup_SelectByCommand ( value _" & selectCommand & "_ '" & objValue & "' in popup ) - " & errMsg number errNum
	end try
end fmGUI_Popup_SelectByCommand

--------------------
-- END OF CODE
--------------------

on clickObjectByCoords(objRef)
	tell application "htcLib" to clickObjectByCoords(my coerceToString(objRef))
end clickObjectByCoords

on fmGUI_SpecifyCalcWindowSet(prefs)
	tell application "htcLib" to fmGUI_SpecifyCalcWindowSet(prefs)
end fmGUI_SpecifyCalcWindowSet

on coerceToString(incomingObject)
	-- 2017-07-12 ( eshagdar ): bootstrap code to bring a coerceToString into this file for the sample to run ( instead of having a copy of the handler locally ).

	tell application "Finder" to set coercePath to (container of (container of (path to me)) as text) & "text parsing:coerceToString.applescript"
	set codeCoerce to read file coercePath as text
	tell application "htcLib" to set codeCoerce to "script codeCoerce " & return & getTextBetween({sourceText:codeCoerce, beforeText:"-- START OF CODE", afterText:"-- END OF CODE"}) & return & "end script" & return & "return codeCoerce"
	set codeCoerce to run script codeCoerce
	tell codeCoerce to coerceToString(incomingObject)
end coerceToString

on ensureObjectRef(someObjectRef)
	-- 2017-07-12 ( eshagdar ): bootstrap code to bring a ensureObjectRef into this file for the sample to run ( instead of having a copy of the handler locally ).

	tell application "Finder" to set ensureObjPath to (container of (container of (path to me)) as text) & "text parsing:ensureObjectRef.applescript"
	set codeEnsureObj to read file ensureObjPath as text
	tell application "htcLib" to set codeEnsureObj to "script codeEnsureObj " & return & getTextBetween({sourceText:codeEnsureObj, beforeText:"-- START OF CODE", afterText:"-- END OF CODE"}) & return & "end script" & return & "return codeEnsureObj"
	set codeEnsureObj to run script codeEnsureObj
	tell codeEnsureObj to ensureObjectRef(someObjectRef)
end ensureObjectRef