Bonjour,
J'ai fait ce script mais l'exécution pose problème… Le dial n'apparait pas… La partition ne se joue pas automatiquement…

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
on open theSelection
 
	tell application "Finder"
		activate
		open application file "GuitarPro" of folder "Applications" of startup disk
		tell application "GuitarPro"
			activate
			open file (theSelection)
		end tell
	end tell
 
	tell application "System Events"
		activate
		set bbb to the text returned of (display dialog "Bienvenue chez le retardateur métro de JyPass :
 
Combien de battements de retard ?" default answer 4)
		set bpm to the text returned of (display dialog "Combien de battements par minute ?" default answer 80)
 
		set x to bbb
		set pauseBetweenBeeps to (80 / bpm)
		repeat until x < 1
			set x to x - 1
			beep
			delay pauseBetweenBeeps
		end repeat
 
 
		tell process "GuitarPro"
			activate
			tell menu bar 1
				if (exists menu item "Lecture depuis le début (⌘Espace)" of menu "Son") then
					click menu item "Lecture depuis le début (⌘Espace)" of menu "Son"
				end if
			end tell
		end tell
	end tell
 
end open
----------------------------------

Celui-ci, ci-dessous, fonctionne pourtant. Mais pas en dropplet !

---------------------------------

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
set bbb to the text returned of (display dialog "Bienvenue chez le retardateur métro de JyPass :
 
Combien de battements de retard ?" default answer 4)
set bpm to the text returned of (display dialog "Combien de battements par minute ?" default answer 80)
 
if application "GuitarPro" is running then
	tell application "GuitarPro"
		activate
	end tell
end if
tell application "System Events"
	tell process "GuitarPro"
 
		set x to bbb
		set pauseBetweenBeeps to (80 / bpm)
		repeat until x < 1
			set x to x - 1
			beep
			delay pauseBetweenBeeps
		end repeat
 
		tell menu bar 1
			if (exists menu item "Lecture depuis le début (⌘Espace)" of menu "Son") then
				click menu item "Lecture depuis le début (⌘Espace)" of menu "Son"
			end if
		end tell
	end tell
end tell
---------------------------

Merci pour toute aide.