ja programovat neviem, a jedine comu rozumiem v tom kode su suradnice, ktore budem potrebovat vymenit a credits
script:
Kód: Vybrať všetko
-- coordinates of left upper corner of area (degrees)
property beginning_lat : 41.764341
property beginning_long : 21.321398 (*41.764341 21.321398*)
-- parameters for GoogleEarth
set myAltitude to 2000
set myTilt to 0
set myAzimuth to 0
-- parameters for file names
property N : 0
property M : 0
-- parameters for end of script (degrees)
property mySouth : 41.72
property myEast : 21.4
property long_step : 0.0062
property lat_step : 0.0025
-- GE screenshot
-- by [email protected]
-- modification by [email protected]
-- use at your own risk
--
-- Start Google Earth first and allow to connect to server before starting the script, set the Terrain feature of GE off
set myLat to beginning_lat
set myLong to beginning_long
repeat while myLat ≥ mySouth -- last row, where script stops
set N to N + 1
repeat while myLong ≤ myEast -- end of row and beginning of next one
set M to M + 1
set picfile to "test-" & N & "-" & M -- & ".jpg" -- filename for screenshot
-- -- the file will be saved in the folder last used for saving
set Overwrite to false -- -whether to overwrite an existing pic.
activate
tell application "Google Earth"
SetViewInfo {latitude:myLat, longitude:myLong, distance:myAltitude, tilt:myTilt, azimuth:myAzimuth}
repeat while (GetStreamingProgress) < 100 -- test for 100% received data
end repeat
end tell
-- mimic the human way to save image
tell application "System Events"
if UI elements enabled then -- test if GUI-scriptimg is enabled
tell process "Google Earth"
set frontmost to true
end tell
-- call dialog for screenshot
keystroke "s" using {command down, option down}
delay 1
-- set the name of the image file
keystroke picfile
delay 1
-- do it
keystroke return
if Overwrite then
delay 1
keystroke return
end if
else -- GUI-scripting is not enabled. Tell user how to enable it
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
end tell
end if
end tell
set myLong to (myLong + long_step) -- long step - it depends on size of screen. There should be 10-15% overlap of images
end repeat
set myLong to beginning_long -- return to beginning of row
set M to 0
set myLat to (myLat - lat_step) -- lat step there should be 10-15% overlap
end repeat