PDA

Visualizza Versione Completa : allegare thunderbird ( non seleziono elemento )



Kira69
09-03-08, 13:57
ciao a tutti, è un po che ci provo ( quando ho tempo) ma so che non è possibile fare click con destro e allegare un file con thunderbird ma usando uno script posso arrivare ad una via di mezzo , ragionando solo sul dekstop... e usando questo script, come faccio nello script a dirgli che il file sul quale clicco il tasto destro è il file selezionato e deve allegarlo nella mail?

fino ad aprire la finestra allega arriva, a questo punto, dargli il percorso e andare sul desktop, non è difficile, ma selezionare l elemento sul quale ho fatto click con destro per lanciare lo script, mi è difficile.... ( se poi capisco come farlo indipendentemente dal percorso.... dandoglielo cioè come input...)

idee??

set this_item to item // ( non credo che questa riga serva ma era un tentativo)
tell application "Thunderbird"
activate
end tell
tell application "System Events"
tell process "Thunderbird"
delay 3
keystroke "n" using command down
delay 1
click the menu item "File..." of menu 1 of menu item "Allega" of the menu "File" of menu bar 1
select item // ( non credo che questa riga serva ma era un tentativo)
click button "Apri" of window "Allega"
end tell
end tell

Kira69
09-03-08, 14:01
è da qui che ci provo .....
http://www.tuttologia.com/macp2p/showthread.php?t=11265

Kira69
09-03-08, 14:39
in attesa di far selezionare il file ho trovato un altro errore, se thunderbird è aperto, mi restituisce un errore, credevo di poter risolvere cosi..... ma non va....
on run {input, parameters}

if application "Thunderbird"
running
tell application "System Events"
tell process "Thunderbird"
delay 2
keystroke "n" using command down
delay 1
click the menu item "File..." of menu 1 of menu item "Allega" of the menu "File" of menu bar 1
click button "Apri" of window "Allega"
end tell
end tell
else
tell application "Thunderbird"
activate
end tell
tell application "System Events"
tell process "Thunderbird"
delay 2
keystroke "n" using command down
delay 1
click the menu item "File..." of menu 1 of menu item "Allega" of the menu "File" of menu bar 1
click button "Apri" of window "Allega"
end tell
end tell
return input
end run

Kira69
16-03-08, 01:47
nessuno che ha una dritta?:worty: