K
kay101011
hi
hab hier mein erstes kleines script geschrieben ... drumm
& habe noch ein kleines problem damit, erstmal das script:
was bewirkt es?? es macht, das man die systemdateien & ordner im finder sieht. so nun mein problem, danach würde ich gerne ein wenig aufräumen, aber da versagt die kunst! ich habe es so versucht:
die dialogs sind nur zum debuggen. mit wenig fenstern funzt es ganz gut aber ab 4 kommen einfach fehlermeldungen die ich nicht verstehe!
hab hier mein erstes kleines script geschrieben ... drumm
& habe noch ein kleines problem damit, erstmal das script:
tell application "Finder"
display dialog "Show system files and folders?" buttons {"Yes", "No"} default button 1 with icon caution
if button returned of result = "Yes" then
tell application "Terminal"
do script "defaults write com.apple.finder AppleShowAllFiles Yes"
end tell
display dialog "Now U can see it!" buttons "Cool!" default button 1
else
tell application "Terminal"
do script "defaults write com.apple.finder AppleShowAllFiles No"
end tell
display dialog "It's magic!" buttons "Wow!!" default button 1
end if
display dialog "You have to restart the Finder-Application to see new settings" buttons {"later", "restart"} default button "restart" with icon caution
if button returned of result = "later" then
display dialog "kay says god bye!" buttons {"Visit palsecam", "bye"} default button "bye" with icon note
if button returned of result = "Visit palsecam" then
tell application "Terminal"
do script "open http://www.palsecam.de"
end tell
end if
else
quit
run
display dialog "kay says god bye!" buttons {"Visit palsecam", "bye"} default button "bye" with icon note
if button returned of result = "Visit palsecam" then
tell application "Terminal"
do script "open http://www.palsecam.de"
end tell
end if
end if
end tell
was bewirkt es?? es macht, das man die systemdateien & ordner im finder sieht. so nun mein problem, danach würde ich gerne ein wenig aufräumen, aber da versagt die kunst! ich habe es so versucht:
tell application "Terminal"
run
count windows
repeat with i from 1 to result
display dialog i buttons {"OK"} default button 1
if busy of window i = false then
display dialog "This window is inactive! Close??" buttons {"No", "Yes"} default button 2
if the button returned of the result is "Yes" then
close window i
end if
else
display dialog "This window is active!" buttons {"OK"} default button 1
end if
end repeat
count windows
if result = 0 then
quit
end if
end tell
die dialogs sind nur zum debuggen. mit wenig fenstern funzt es ganz gut aber ab 4 kommen einfach fehlermeldungen die ich nicht verstehe!