tell application "Finder"
  
    set cheminsource to choose folder with prompt "Sélectionnez le dossier contenant les fichiers webloc à ouvrir"
    set aa to cheminsource as string
    display dialog aa
  
end tell


on run {input, parameters}
    set chemin to input
    
    tell application "Finder"
        
        repeat with lefichier in chemin
            set extens to lefichier
            set lextension to name extension of extens
            if lextension = "Webloc" then
                open lefichier
            end if
            
        end repeat
    end tell
    
    return input
end runL'action « Exécuter un script
AppleScript » a rencontré une erreur:
C Erreur dans Finder : Il est impossible
d'obtenir alias
"home:test:site.webloc".»
Erreur dans Finder : I| est impossible d'obtenir
alias home:test: site.webloc"

on run {input, parameters}
    set chemin to input
 
    tell application "Finder"
    
        activate
        set aa to chemin as string
        display dialog "les chemins : " & aa
    
        repeat with lefichier in chemin
        
            activate
            set aa to lefichier as string
            display dialog "le fichier : " & aa
        
            set extens to lefichier
            set lextension to name extension of extens
        
            set aa to lextension as string
            display dialog "lextension : " & aa
        
            if lextension = "Webloc" then
            
            
                display dialog "lancement de la commande OPEN "
            
                open lefichier
            end if
        
        end repeat
    end tell
 
 
    return input
end run 
	