Page 1 of 1

allegare thunderbird ( non seleziono elemento )

Posted: Sun Mar 09, 2008 12:57 am
by Kira69
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

Posted: Sun Mar 09, 2008 1:01 am
by Kira69

Posted: Sun Mar 09, 2008 1:39 am
by Kira69
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

Posted: Sat Mar 15, 2008 12:47 pm
by Kira69
nessuno che ha una dritta? :worty: