Bonjour,
voici des macros de firefox (cf http://www.iopus.com/imacros/web-scripting.htm). Je ne connais rien en
Java, mais j'ai l'impression que ca ressemble a du java:

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
 
var macro;
var jsLF = "\n";
var i, retcode, errtext;
var MyDelay;
var MyPosts;
 
/* Send code example */
macro = "CODE:";
macro += "URL GOTO=http://www.iopus.com" + jsLF;
macro += "URL GOTO=http://forum.iopus.com";
iimDisplay("Send Macro via iimPlay");
retcode = iimPlay(macro);
 
if (retcode < 0) {              // an error has occured
    errtext = iimGetLastError();
    alert(errtext);
}
 
 
 
/* How to do looping */
iimDisplay("Loops");
 
for ( i = 1; i <= 2; i++) {
    iimDisplay("loop "+i);
    retcode = iimPlay("CODE:URL GOTO=http://forum.iopus.com/viewtopic.php?t="+i*10);
    if (retcode < 0) {          // an error has occured
        errtext = iimGetLastError();
        alert(errtext);
        break;
    }
 
}
 
 
/* Generate a random wait time */
 
/* Generate a number between 1 and 10 */
MyDelay = Math.round(10*Math.random());
iimDisplay("Random wait t="+MyDelay);
 
macro = "CODE:";
macro += "URL GOTO=http://wiki.imacros.net" + jsLF;
macro += "WAIT SECONDS=" + MyDelay + jsLF;
macro += "URL GOTO=http://wiki.imacros.net/iMacros_for_Firefox";
 
retcode = iimPlay(macro);
if (retcode < 0) {              // an error has occured
    errtext = iimGetLastError();
    alert(errtext);
}
 
 
/*How to use array and iimSet*/
 
MyPosts = new Array();
MyPosts.push("307");
MyPosts.push("2615");
MyPosts.push("1147");
MyPosts.push("3201");
MyPosts.push("3360");
 
iimDisplay("Array/iimSet Demo");
 
for (i = 0; i < MyPosts.length; i++) {
    iimSet("POSTID", MyPosts[i]);
    retcode = iimPlay("CODE:URL GOTO=http://forum.iopus.com/viewtopic.php?f=11&t={{postid}}\n");
    if (retcode < 0) {              // an error has occured
        errtext = iimGetLastError();
        alert(errtext);
        break;
    }
}
 
iimDisplay("Script completed.");

Est-ce bien du java
et si oui, pourriez vous me dire quelle est la ligne de code qui permet d'attendre par exemple 5 secondes.
Un peu comme la fonction Wait dans VBA
merci