Stack Overflow
Stack Overflow
- Subject: Stack Overflow
- From: Robert Poland <email@hidden>
- Date: Sat, 19 Dec 2015 11:54:27 -0700
- Z-usanet-msgid: XID334TLss3b6352X34
Hi,
What would be causing a “Stack Overflow”? Happens before display dialog line.
As applied to a folder named “untitled folder 3"
tell application "Finder"
activate
delay 0.2
beep
set myName to "" # clear myName
try # Deal with All Conditions Met, Execute Actions with no selection
set myFile to the selection as alias
set myName to the name of myFile
display dialog "myFile = "&myFile&return&"myName = "&myName
end try
end tell
if myName contains "ƒ" then set myName to "" # don't add "ƒ" if it's already there
if length of myName ≠ 0 then # length of name of file selected
set the name of myFile to myName & "ƒ"
end if
delay 0.2
if length of myName = 0 then
tell application "Finder" to activate # re-activate Finder, so Keyboard Maestro macro will respond
delay 0.1
tell application "System Events"
keystroke "a" using {option down, command down} # deselect all
delay 0.2
keystroke "q" using {option down} # activate open finder 2
end tell
end if # length of myName
TIA,
Robert Poland
iMac, Late 2013, 14,2
3.2 GHz Intel Core I5, 27”
16 GB Ram, 1TB Fusion HD
OS X 10.11.2
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden