Hi,
I am trying to automate navigating around in Safari and am using the following code to figure out where to click to get to the Tabs options under Safari Preferences (assuming that the Tabs section is not currently selected)
Click (Text"Tabs", TextSize"11", TextPlatform"MacOSX_10.4")
This works fine on my MBP Core 2 Duo. However when I give this code to my colleague to run on his Mac Mini this code does not work. However if he adds a tolerance option then things work fine
Click (Tolerance "60", Text"Tabs", TextSize"11", TextPlatform"MacOSX_10.4")
This seemed wrong to me so I did a ImageLocation for each of our codes and got the following on my machine
Thu, 3/22/07 40319 PM START Running Selection from Untitled.script
040319 Start handler 1 untitled
put ImageLocation (Text"Tabs", TextSize"11", TextPlatform"MacOSX_10.4")
Thu, 3/22/07 40319 PM imagelocation Text Tabs at (246, 330)
(246,330)
040319 End handler 1 untitled (normal exit)
Selection Executed in 00000
…and the following on his machine (without tolerance)…
Thu, 3/22/07 41827 PM START Running Selection from Untitled.script
041827 Start handler 1 untitled
put ImageLocation (Text"Tabs", TextSize"11", TextPlatform"MacOSX_10.4")
Thu, 3/22/07 41828 PM imagelocation Text Tabs at (205, 28)
(205,28)
041828 End handler 1 untitled (normal exit)
Selection Executed in 00000
… and then with tolerance…
Thu, 3/22/07 40534 PM START Running Selection from Untitled.script
040534 Start handler 1 untitled
put ImageLocation (Tolerance “60”,Text"Tabs", TextSize"11", TextPlatform"MacOSX_10.4")
Thu, 3/22/07 40534 PM imagelocation Text Tabs at (246, 330)
(246,330)
040534 End handler 1 untitled (normal exit)
Selection Executed in 00000
So as you can see if I do not put the image tolerance parameter it finds some random location which is the main safari window title bar. Could someone please explain to me what I am doing wrong?