S93 Mode programming

April 14, 2009

Karya terbaru dalam programming mode, kepada yang bermiant. Saya akan kembali ke blogging mode, insyallah Ramadhan nanti.

Sub GES()
t = Timer: x = Range(“A1″): If x “” Then Application.ScreenUpdating = False
Application.CutCopyMode = False
aa = ActiveSheet.Name: sr = Selection.Rows.Count: sc = Selection.Columns.Count
n = “SHA!”: w = ActiveCell: C = ActiveCell.Column: r = ActiveCell.Row
Range(n & “A6:F6″).Insert xlDown: Range(n & “A6″) = ActiveSheet.Name()
Range(n & “B6″) = sc & ” ” & sr & ” ” & C & ” ” & r & ” ” & w: Range(n & “C6″) = Now()
Range(n & “E6″) = Range(“A2″): Range(n & “F6″) = Range(“A3″)
‘If Range(n & “A3″) / 10 – Int(Range(n & “A3″) / 10) = 0 Then Workbooks(“Sha.xls”).Save
‘If sc > 1 Then Application.Run (“Sha.Xls!GEN.GEN”): GoTo SHE
‘EOI ——————————————————————————-EOI
If C = 3 And r = 3 Then GoTo SHA ‘
If C = 3 And r = 4 Then GoTo SHB ‘
If aa = “WEB” Then GoTo SHL ‘
If C = 5 And r = 3 Then GoTo SHM ‘
If C = 7 And r = 2 Then GoTo SHO ‘
If C = 7 And r = 3 Then GoTo SHP ‘
If C = 7 And r = 4 And aa = “NAM” Then GoTo SHQ ‘
If C = 6 And r = 3 Then GoTo SHN ‘
If C = 5 And r = 4 Then GoTo SHJ ‘
If C = 5 And r = 5 Then GoTo SHK ‘
If C = 4 And r = 3 Or r = 4 Then GoTo SHC ‘
If C = 4 And r = 2 Then GoTo SHD ‘
If C = 4 And r = 5 Or r = 6 Then GoTo SHI ‘
If C = 3 And aa = “NAM” Then GoTo SHG ‘
If (C = 1 Or C = 3 Or C = 8 Or C = 9) And aa = “HJ3″ Then GoTo SHF ‘
If C = 2 And aa = “NAM” Then GoTo SHH ‘
MsgBox “Not used”: GoTo SHE
‘EOI ——————————————————————————-EOI
SHA: If sr = 3 Then Stop
ctr = 14: Range(“C15:C65000″).clear: Range(“T2:BJ65000″).clear: Range(“C3″) = 14
For i = 0 To Range(“E7″): For j = 0 To Range(“E8″) Step -1: ctr = ctr + 1
x = Str(Range(“D7″) + i * Range(“C7″)): w = Str(Range(“D8″) + j * Range(“C8″)) ‘x=long w=lati
w1 = w & “,” & x: Range(“C” & ctr) = w1: Cells(2 – j, 20 + i) = w1
Next j: Next i
‘GoTo SHE
‘Application.Run “GES.Auu”
For k = 0 To Range(“G4″) ’2 mean 3 hours
For j = 0 To Range(“G5″) ’59 ‘Range(“B4″)
For i = 0 To 59 Step Range(“B8″)
Range(“B2″) = j: Application.OnTime Now + TimeValue(k & “:” & j & “:” & i), “GES.Auu”
Next i: Next j: Next k
GoTo SHE
‘EOI ——————————————————————————-EOI
SHB: If sr = 3 Then Stop
For i = 0 To Range(“E7″)
For j = 0 To Range(“E8″) Step -1
x = Range(“D7″) + i * Range(“C7″): w = Range(“D8″) + j * Range(“C8″) ‘x=long w=lati
AppActivate “Google Earth”: Application.Wait (Now + TimeValue(“0:0:1″))
SendKeys “{backspace 20}”: SendKeys (w & “,” & x & “~”): Range(“C3″) = w & “,” & x
Cells(2 – j, 20 + i) = w & “,” & x
Application.Wait (Now + TimeValue(“0:0:” & Range(“B8″))): Next j
Application.Wait (Now + TimeValue(“0:0:” & Range(“B8″))): Next i
GoTo SHE
‘EOI ——————————————————————————-EOI
SHC: If sr = 3 Then Stop
If r = 4 Then GoTo chs
AppActivate “Norton Personal Firewall”: AppActivate “Log Viewer”: AppActivate “Microsoft Excel – GES”
Range(“WHD!D3″).FormulaR1C1 = “=RIGHT(YEAR(NOW()),1)&MONTH(NOW())&day(NOW())&HOUR(NOW())&MINUTE(NOW())”
AppActivate “Norton Personal Firewall”: Application.Wait (Now + TimeValue(“0:0:2″))
SendKeys “%”: SendKeys “fs” & Range(“WHD!D3″) & ” stt~”
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “%”: SendKeys “vry”: ‘GoTo SHE
‘AppActivate “Log Viewer”, True: Application.Wait (Now + TimeValue(“0:0:2″)):
Application.Wait (Now + TimeValue(“0:0:1″))
AppActivate “Log Viewer”: Application.Wait (Now + TimeValue(“0:0:3″))
SendKeys “%”: SendKeys “lr”: Application.Wait (Now + TimeValue(“0:0:3″))
SendKeys “%”: SendKeys “lx” & Range(“WHD!D3″) & ” ” & Range(“NAM!C6″) & “~”
‘Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “^c”

GoTo SHE ‘SendKeys “+(%y)”
chs:
AppActivate “Microsoft Excel – GES”
Range(“WHD!A11:Z65536″).ClearContents: Range(“WHE!A11:Z65536″).ClearContents
Workbooks.OpenText Filename:= _
“C:\Documents and Settings\Sha\My Documents\Web History.txt”, Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1)), TrailingMinusNumbers _
:=True
r1 = Range(“A3″).End(xlDown).Row: Range(“B3:B” & r1).FormulaR1C1 = “=IF(RC[-1]=R[-1]C[-1],1,0)”
Range(“B3:B” & r1).Copy: Range(“B3″).PasteSpecial Paste:=xlPasteValues
Range(“B3″).Sort Key1:=Range(“B3″), Order1:=xlAscending, Header:=xlGuess
r2 = Range(“B3:B” & r1).Find(1).Row: Range(“A” & r2 & “:B” & r1).clear
Range(“B3:B” & r2).clear
Range(“A3:A” & r2).TextToColumns Destination:=Range(“A3″), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), TrailingMinusNumbers:=True

Range(“A3:B” & r2).Copy Range(“‘[GES.xls]WHD’!A11″): ActiveWorkbook.Close 0
Range(“B8″) = r1: r3 = r2 + 8
Range(“B11:B” & r3).TextToColumns Destination:=Range(“B11″), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=True, OtherChar:= _
“?”, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), TrailingMinusNumbers:=True
Range(“C11:C” & r3).TextToColumns Destination:=Range(“C11″), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=True, OtherChar:= _
“f”, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), TrailingMinusNumbers:=True

Range(“C11″).Sort Key1:=Range(“C11″), Order1:=xlAscending, Header:=xlGuess
r4 = Range(“WHE!A65536″).End(xlUp).Row + 1: Range(“C11:C” & r3).Copy Range(“WHE!A” & r4)
Range(“D11″).Sort Key1:=Range(“D11″), Order1:=xlAscending, Header:=xlGuess
r4 = Range(“WHE!A65536″).End(xlUp).Row + 1: Range(“D11:D” & r3).Copy Range(“WHE!A” & r4)
Range(“E11″).Sort Key1:=Range(“E11″), Order1:=xlAscending, Header:=xlGuess
r4 = Range(“WHE!A65536″).End(xlUp).Row + 1: Range(“E11:E” & r3).Copy Range(“WHE!A” & r4)
Range(“F11″).Sort Key1:=Range(“F11″), Order1:=xlAscending, Header:=xlGuess
r4 = Range(“WHE!A65536″).End(xlUp).Row + 1: Range(“F11:F” & r3).Copy Range(“WHE!A” & r4)

Sheets(“WHE”).Select: Range(“A11″).Sort Key1:=Range(“A11″), Order1:=xlAscending, Header:=xlGuess
r5 = Range(“A65536″).End(xlUp).Row
Range(“B11:B” & r5).FormulaR1C1 = _
“=MID(RC[-1],FIND(“”-”",RC[-1])+1,FIND(“”-”",RC[-1],4)-FIND(“”-”",RC[-1])-1)”

‘Sheets(“Web History”).Move Before:=Workbooks(“GES.xls”).Sheets(1)

GoTo SHE
‘EOI ——————————————————————————-EOI
SHD: If sr = 3 Then Stop
Range(“D3″).Select: Application.Run “GES.GES”
For k = 0 To 9 ’2 mean 3 hours
For j = 1 To 59 Step 10 ‘Range(“B4″)
Range(“B4″) = 1: Application.OnTime Now + TimeValue(k & “:” & j & “:00″), “GES.Auv”
Next j: Next k

GoTo SHE
‘EOI ——————————————————————————-EOI
SHF: If sr = 3 Then Stop
If C = 8 Then GoTo FHU
If C = 9 Then GoTo FHV
On Error GoTo FHT
r1 = Range(“C” & r).End(xlDown).Row: If C = 3 Then beg = r: fin = r1: stp = 1: GoTo FHS
stp = -1: If r > 10 Then beg = r: fin = r Else beg = Range(“HJ3!A11″).End(xlDown).Row: fin = 11
FHS:
For i = beg To fin Step stp
w = Range(“HJ3!A” & i): AppActivate “Google Earth”:
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “{up}+(^/)”
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “{backspace 100}” & w & “~”: Range(“A8″) = i & ” ” & w
Application.Wait (Now + TimeValue(“0:0:2″)): If Range(“B8″) = 0 Then SendKeys “+(^p)” & w & “~” _
Else: SendKeys “+(^p)” & w & “{tab 4}{right 2}{down 2}{tab 4}” & Range(“B8″) & “m~”
Application.Wait (Now + TimeValue(“0:0:4″)): ‘SendKeys “{tab 15}”
‘Application.Wait (Now + TimeValue(“0:0:3″)): SendKeys “+(^t)” & w ‘old method of drawing lines
Next i
GoTo SHE
FHT:
Range(“D5″).Select: Application.Run “GES.GES”
Range(“A” & r).Select: Application.Wait (Now + TimeValue(“0:0:10″)): AppActivate “Microsoft Excel – GES”
GoTo SHE
FHU: If sr = 3 Then Stop
Range(“CRD!A47″) = Range(“A” & r): Range(“CRD!A48″) = Range(“F” & r): Range(“CRD!A49″) = Range(“G” & r)
Range(“CRD!A54″) = Range(“H” & r): Sheets(“CRD”).Select: Range(“E4″).Select: Application.Run “GES.GES”
GoTo SHE
FHV:
‘For i = r To Range(“HJ3!I” & r).End(xlDown).Row
w1 = Range(“HJ3!A” & r): w = “GoogleEarth ” & w1: Sheets(“NAM”).Select: r1 = Range(“C10″).End(xlDown).Row + 1
Range(“C” & r1) = w: r2 = Range(“C11:C” & r1).Find(w).Row:
If r2 < r1 Then Range(“C” & r1).clear: GoTo FHW
fol = “C:\Documents and Settings\Sha\Local Settings\Application Data\Google\”
fi1 = “Ccccc\Ccc.txt”: fi2 = w1: MkDir fol & w:

FHW: ‘Next i

GoTo SHE
‘EOI ——————————————————————————-EOI
SHG: If sr = 3 Then Stop
no = “C:\Documents and Settings\Sha\Local Settings\Application Data\Google\”: ‘ChDir no
If sr = 2 Then GoTo GHS ‘open directory
On Error GoTo GHT: AppActivate “Google Earth”: Range(“D6″).Select: Application.Run “GES.GES”
GHU:
If Left(w, 12) “GoogleEarth ” Then GoTo SHE Else Range(“A101:Z999″).ClearContents: aa = “NAM”: r1 = 100
Set fs1 = CreateObject(“Scripting.FileSystemObject”).GetFolder(no).subfolders
For Each f In fs1: r1 = r1 + 1
Range(“B” & r1) = f: Range(“C” & r1) = f.Name
Range(“I” & r1) = f.Datelastmodified: Range(“G” & r1) = f.Size
Next
Range(“G2″).Select: Application.Run “GES.GES”
Range(“G10″).Sort Key1:=Range(“G10″), Order1:=xlAscending, Header:=xlGuess
If Right(Range(“C11″), 4) “.txt” Then GoTo SHE
Range(“C5″) = Range(“D11″): Range(“C6″) = Right(w, Len(w) – 12)

Dim OldName, NewName
OldName = no & “GoogleEarth”: NewName = no & “GoogleEarth ” & Range(“D11″)
Range(“C2″) = Range(“D11″): Name OldName As NewName
NewName = no & “GoogleEarth”: OldName = no & “GoogleEarth ” & Range(“C6″)
Range(“C3″) = Range(“C6″): Name OldName As NewName
aa = “NAM”: r1 = 100
Set fs1 = CreateObject(“Scripting.FileSystemObject”).GetFolder(no).subfolders
For Each f In fs1: r1 = r1 + 1
Range(“B” & r1) = f: Range(“C” & r1) = f.Name
Range(“I” & r1) = f.Datelastmodified: Range(“G” & r1) = f.Size
Next
cts = 100: Range(“C101:C999″).ClearContents
With Application.FileSearch: .NewSearch: .LookIn = no & “GoogleEarth\”
.FileType = msoFileTypeAllFiles: .SearchSubFolders = False: .Execute
For z = 1 To .FoundFiles.Count: cts = cts + 1
Range(aa & “!B” & cts) = .FoundFiles(z)
Set f = CreateObject(“Scripting.FileSystemObject”).GetFile(.FoundFiles(z))
Range(aa & “!C” & cts) = f.Name: Range(aa & “!G” & cts) = f.Size
Range(aa & “!H” & cts) = f.DateCreated: Range(aa & “!I” & cts) = f.Datelastmodified
Next z: End With

Range(“G10″).Sort Key1:=Range(“G10″), Order1:=xlAscending, Header:=xlGuess
If Right(Range(“C11″), 4) = “.txt” Then: ActiveWorkbook.Save: GoTo SHE
ActiveWorkbook.FollowHyperlink Address:= _
“C:\Documents and Settings\Sha\Local Settings\Application Data\Google\GoogleEarth”, _
NewWindow:=True
GoTo SHE

GHS:
cts = 1000: Range(“C1001:C3000″).ClearContents
With Application.FileSearch: .NewSearch: .LookIn = no
.FileType = msoFileTypeAllFiles: .SearchSubFolders = True: .Execute
For z = 1 To .FoundFiles.Count: cts = cts + 1
Range(aa & “!B” & cts) = .FoundFiles(z)
Set f = CreateObject(“Scripting.FileSystemObject”).GetFile(.FoundFiles(z))
Range(aa & “!C” & cts) = f.Name: Range(aa & “!G” & cts) = f.Size
Range(aa & “!H” & cts) = f.DateCreated: Range(aa & “!I” & cts) = f.Datelastmodified
Next z: End With
GoTo SHE
GHT: GoTo GHU

GoTo SHE
‘EOI ——————————————————————————-EOI
SHH: If sr = 3 Then Stop
ActiveWorkbook.FollowHyperlink Address:=w, NewWindow:=True
GoTo SHE
‘EOI ——————————————————————————-EOI
SHI: If sr = 3 Then Stop
If r = 6 Then GoTo ISH
Range(“A1″) = “C:\Program Files\Google\Google Earth\googleearth.exe”
ActiveSheet.Hyperlinks.Add Range(“A1″), Range(“A1″)
SendKeys (“{left}~”): Range(“A1″).Hyperlinks(1).Follow False, False
GoTo SHE
ISH:
On Error Resume Next: SendKeys (“~”): Sheets(“MYQ”).Delete
AppActivate “Google Earth”: Application.Wait (Now + TimeValue(“0:0:1″))
SendKeys “%”: Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “f{up}~n”
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “{esc}”
‘Workbooks.Open Filename:= _
“C:\Documents and Settings\Sha\Application Data\Google\GoogleEarth\myplaces.kml”
‘Application.Wait (Now + TimeValue(“0:0:1″))
‘Sheets(“myplaces”).Move Before:=Workbooks(“GES.xls”).Sheets(1)
‘Sheets(“myplaces”).Select
‘Sheets(“myplaces”).Name = “MYQ”
GoTo SHE
‘EOI ——————————————————————————-EOI
SHJ: If sr = 3 Then Stop
Range(“A1″) = “C:\Documents and Settings\Sha\My Documents\KML\kml.txt”
ActiveSheet.Hyperlinks.Add Range(“A1″), Range(“A1″)
Range(“A1″).Hyperlinks(1).Follow False, False
Range(“J45″).FormulaR1C1 = _
“=”"”"&R[-27]C[-7]&”"-”"&R[-27]C[-8]&”"1″”&CHAR(10)&R[-1]C&”",”"&RC[-4]&”",0″”&CHAR(10)&”"”"&char(10)”
Range(“J45:J47″).Copy: Range(“J48″).PasteSpecial xlValues: Range(“J51″).Select
Range(“J50″).Copy: Sheets(“HJ3″).Select
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “{down 30}”
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “+(^v){backspace 2}+(^{home}){down 24}{delete}”
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “%faKMM.kml~”
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “+(%y)”
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “%fx”
Application.Wait (Now + TimeValue(“0:0:2″))
Range(“A1″) = “C:\Documents and Settings\Sha\My Documents\KML\KMM.kml”
ActiveSheet.Hyperlinks.Add Range(“A1″), Range(“A1″)
SendKeys (“{left}~”): Range(“A1″).Hyperlinks(1).Follow False, False
GoTo SHE
‘EOI ——————————————————————————-EOI
SHK: If sr = 3 Then Stop
AppActivate “Microsoft FrontPage – C:\Documents and Settings\Sha\Application Data\Google\GoogleEarth\Backup\GC6.kml”
GoTo SHE
‘EOI ——————————————————————————-EOI
SHL: If sr = 3 Then Stop
If C = 2 And r = 10 Then GoTo LHT
If C = 2 And r > 10 Then GoTo LHS
‘Range(“A11:Z30000″).ClearContents
‘r1 = 10: Set fs1 = CreateObject(“Scripting.FileSystemObject”).GetFolder(Range(“I1″)).subfolders
‘For Each f In fs1: r1 = r1 + 1: Range(“T” & r1) = f: Next: ‘GoTo SHE
‘For i = 11 To Range(“T10″).End(xlDown).Row
If Range(“B11″) = “” Then cts = 10 Else cts = Range(“B10″).End(xlDown).Row
With Application.FileSearch: .NewSearch: .LookIn = Range(“T11″)
.FileType = msoFileTypeAllFiles: .SearchSubFolders = True: .Execute
‘With Application.FileSearch: .NewSearch: .LookIn = Range(“O” & i)
‘.FileType = msoFileTypeAllFiles: .SearchSubFolders = False: .Execute
‘Range(“U” & i) = .FoundFiles.Count
For z = 1 To .FoundFiles.Count: cts = cts + 1
Range(aa & “!B” & cts) = .FoundFiles(z)
Set f = CreateObject(“Scripting.FileSystemObject”).GetFile(.FoundFiles(z))
Range(aa & “!C” & cts) = f.Name: Range(aa & “!G” & cts) = f.Size
Range(aa & “!H” & cts) = f.DateCreated: Range(aa & “!I” & cts) = f.Datelastmodified
Next z: End With
‘Next i
GoTo SHE
LHS:
SendKeys (“{left}~”): ActiveWorkbook.FollowHyperlink Address:=w, NewWindow:=True
GoTo SHE
LHT:
FileSystemObject.CopyFolder “E:\Temporary Internet Files\Content.IE5\*”, “E:\vpc\TIF\Content.IE5\”, 1
GoTo SHE
‘EOI ——————————————————————————-EOI
SHM: If sr = 3 Then Stop
Range(“WEB!F2″) = 1: AppActivate “Where Is It?”
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “+(%coo)”
Application.Wait (Now + TimeValue(“0:0:5″)): SendKeys “{tab}+(^r)” ‘gen report
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab 2}~” & “WII1″ & Range(“WHD!D3″) & “~” ‘exp to exl

Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab 2}~”
Application.Wait (Now + TimeValue(“0:0:3″)): SendKeys “{down}”: ‘ GoTo SHE
Application.Wait (Now + TimeValue(“0:0:3″)): SendKeys “{tab}+(^r)” ‘: GoTo SHE ‘gen report
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “{tab 2}~” & “WII2″ & Range(“WHD!D3″) & “~” ‘exp to exl

Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab 2}~”
Application.Wait (Now + TimeValue(“0:0:3″)): SendKeys “{left}{down}” ‘: GoTo SHE
Application.Wait (Now + TimeValue(“0:0:3″)): SendKeys “{tab}+(^r)” ‘gen report
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “{tab 2}~” & “WII3″ & Range(“WHD!D3″) & “~” ‘exp to exl

Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab 2}~”
Application.Wait (Now + TimeValue(“0:0:3″)): SendKeys “{left}{down}”
Application.Wait (Now + TimeValue(“0:0:3″)): SendKeys “{tab}+(^r)” ‘gen report
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “{tab 2}~” & “WII4″ & Range(“WHD!D3″) & “~” ‘exp to exl
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab 2}~”
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab 3}~”

‘Application.OnTime Now + TimeValue(“0:0:3″), “GES.Auw”
GoTo SHE
‘EOI ——————————————————————————-EOI
SHN: If sr = 3 Then Stop
‘Workbooks(“GES”).Activate:
‘Application.Wait (Now + TimeValue(“0:0:1″)): AppActivate “Where Is It?”
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab 2}~”
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab 2}~{down}”
Application.Wait (Now + TimeValue(“0:0:2″)): SendKeys “{tab}+(^r)” ‘gen report
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “{tab 2}~” & “WII” & Range(“WEB!F2″) & “~y” ‘exp to exl
If Range(“WEB!F2″) < 3 Then Application.OnTime Now + TimeValue(“0:0:3″), “GES.Auw”
GoTo SHE
‘EOI ——————————————————————————-EOI
SHO: If sr = 3 Then Stop
no = “C:\Documents and Settings\Sha\Local Settings\Application Data\Google\”
np = no & “GoogleEarth\” & Range(“C6″) & “\”: nq = “E:\Temporary Internet Files\Content.IE5\”
If Now() – Range(“H2″) < 0.0005 Then GoTo SHE
If Range(“H1″) = 1 Then GoTo OHS
If Range(“G1″) = 30 Then Range(“E28″) = Now(): Range(“K31:K98″).ClearContents
Range(“G1″) = Range(“G1″) + 1: i = Range(“G1″): If Range(“C” & i) = “” Then GoTo OHV
Range(“E” & i) = 3
With Application.FileSearch: .NewSearch: .LookIn = nq & Range(“C” & i)
.FileType = msoFileTypeAllFiles: .SearchSubFolders = False: .Execute
Range(“F” & i) = .FoundFiles.Count: End With

t2 = Timer: If Range(“L” & i) = 0 Then GoTo OHU
Set fs = CreateObject(“Scripting.FileSystemObject”)
On Error GoTo OHT: Set a = fs.CopyFolder(nq & Range(“C” & i), np & Range(“C” & i), True)
Range(“E” & i) = 0
OHU:
Range(“D” & i) = Timer – t2
Application.OnTime Now + TimeValue(“0:0:0″), “GES.Aux”
GoTo SHE
OHW:
Set fs = CreateObject(“Scripting.FileSystemObject”)
Set a = fs.createFolder(np)
Application.OnTime Now + TimeValue(“0:0:1″), “GES.Aux”
GoTo SHE
OHT:
Range(“E” & i) = 1
With Application.FileSearch: .NewSearch: .LookIn = np & Range(“C” & i)
.FileType = msoFileTypeAllFiles: .SearchSubFolders = False: .Execute
Range(“K” & i) = .FoundFiles.Count: End With
GoTo OHU
GoTo SHE
OHV:
Range(“Y31:Z98″).ClearContents: On Error GoTo OHW
r1 = 30: Set fs1 = CreateObject(“Scripting.FileSystemObject”).GetFolder(np).subfolders
For Each f In fs1: r1 = r1 + 1: Range(“Y” & r1) = f.Name: Range(“Z” & r1) = f.Size: Next

Range(“Y30″).Sort Key1:=Range(“Y30″), Order1:=xlAscending, Header:=xlGuess
Range(“Y31:Y98″).Copy Range(“B31″): Range(“Z31:Z98″).Copy Range(“H31″): Range(“G1″) = 30
‘Set fs = CreateObject(“Scripting.FileSystemObject”)
‘Set a = fs.CreateTextFile(“e:\test.txt”, True)
‘a.WriteLine (“Sharudin1″)
‘a.Close
‘GoTo SHE
OHS:
Sheets(“NAM”).Select
cts = 10: Range(“A11:Z20″).ClearContents: Range(“C31:C58″).ClearContents
With Application.FileSearch: .NewSearch: .LookIn = no & “GoogleEarth\”
.FileType = msoFileTypeAllFiles: .SearchSubFolders = False: .Execute
For z = 1 To .FoundFiles.Count: cts = cts + 1
Range(aa & “!B” & cts) = .FoundFiles(z)
Set f = CreateObject(“Scripting.FileSystemObject”).GetFile(.FoundFiles(z))
Range(aa & “!C” & cts) = f.Name: Range(aa & “!G” & cts) = f.Size
Range(aa & “!H” & cts) = f.DateCreated: Range(aa & “!I” & cts) = f.Datelastmodified
Next z: End With
Range(“G10″).Sort Key1:=Range(“G10″), Order1:=xlAscending, Header:=xlGuess
Range(“D11″) = “=LEFT(RC[-1],FIND(“”.”",RC[-1])-1)”

r1 = 30: Set fs1 = CreateObject(“Scripting.FileSystemObject”).GetFolder(nq).subfolders
For Each f In fs1: r1 = r1 + 1: Range(“C” & r1) = f.Name: Range(“G” & r1) = f.Size: Next
Range(“C30″).Sort Key1:=Range(“C30″), Order1:=xlAscending, Header:=xlGuess

r1 = Range(“HIS!B10″).End(xlDown).Row + 1: Range(“HIS!B” & r1) = Range(“NAM!D11″)
On Error GoTo SHE
Range(“HIS!E” & r1 + 1) = Range(“G” & Range(“C10:C20″).Find(“dbCache.dat”, , , xlWhole).Row)
Range(“HIS!D” & r1 + 1) = Range(“G” & Range(“C10:C20″).Find(“dbCache.dat.index”, , , xlWhole).Row)
Range(“G31:G58″).Copy: Range(“H2″) = Now(): Sheets(“HIS”).Select: Range(“C” & r1) = Now()
Range(“AA” & r1 + 1).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Range(“D” & r1 & “:BJ” & r1).Copy Range(“D” & r1 + 3)
Range(“D” & r1 + 2 & “:BJ” & r1 + 2).FormulaR1C1 = “=R[-1]C-R[-2]C”
Range(“D” & r1 + 2 & “:BJ” & r1 + 2).Copy: Range(“D” & r1).PasteSpecial xlValues
Range(“D” & r1 + 2 & “:BJ” & r1 + 2).ClearContents
Range(“F” & r1) = Round(Application.MemoryUsed / 1024000, 0) & ” ” & Round(Application.MemoryFree / 1024000, 0)
Range(“G” & r1 & “:G” & r1 + 5).FormulaR1C1 = “=SUM(RC27:RC54)”
Range(“AA” & r1 + 4 & “:BJ” & r1 + 4).FormulaR1C1 = “=IF(R[-4]C0,R[-5]C,0)”
Range(“G” & r1 + 4).Copy: Range(“H” & r1).PasteSpecial xlValues
Range(“G” & r1 + 5).Copy: Range(“I” & r1).PasteSpecial xlValues
Range(“I” & r1 + 2).FormulaR1C1 = “=SUM(R11C:R[-2]C)/1024000″
Range(“H” & r1 + 2).FormulaR1C1 = “=SUM(R11C:R[-2]C)/1024000″
If Range(“C7″) = 0.5 Or Range(“C7″) = 0 Then Workbooks(“GES”).Save: Workbooks(“SXX”).Save
Range(“NAM!F31:F55″).Copy Range(“NAM!K31″): Range(“NAM!E28″) = Now() – Range(“NAM!E28″)
‘If Range(“C7″) = 0 Then Range(“NAM!H1″) = Range(“NAM!H1″) = 0 Else Range(“NAM!H1″) = 1
If Range(“AA” & r1) + Range(“D” & r1) + Range(“E” & r1) = 0 Then Range(“AA” & r1).EntireRow.Delete
Range(“G” & r1 & “:BJ” & r1).Replace “0″, “”, xlWhole: Workbooks(“SXX”).Activate
GoTo SHE
‘EOI ——————————————————————————-EOI
SHP: If sr = 3 Then Stop
‘Range(“D3″).Select: Application.Run “GES.GES”
For k = 0 To 23 ’2 mean 3 hours
For j = 1 To 59
Range(“B4″) = 1: Application.OnTime Now + TimeValue(k & “:” & j & “:00″), “GES.Aux”
Next j: Next k
GoTo SHE
‘EOI ——————————————————————————-EOI
SHQ: If sr = 3 Then Stop
‘GoTo QHS
SendKeys (“{left}~”): ActiveWorkbook.FollowHyperlink Address:=Range(“A2″), NewWindow:=True
Application.Wait (Now + TimeValue(“0:0:3″)): SendKeys (“%to”)
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys (“%d~”)
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys (“%f”)
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys (“~”)
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys (“%c”)
For i = 1 To 3: Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys (“+({tab})”): Next i
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys (“~”):
Application.Wait (Now + TimeValue(“0:0:3″))
Application.Wait (Now + TimeValue(“0:0:1″)): SendKeys “%”: SendKeys “fx”
QHS:
Application.Wait (Now + TimeValue(“0:0:1″)): Sheets(“NAM”).Select
Range(“A31:Z60″).ClearContents: Range(“L31:L60″).FormulaR1C1 = “=RC[-6]-RC[-1]“
Range(“I31:I60″).FormulaR1C1 = “=RC[-1]-RC[-2]“
Range(“A31:A60″).FormulaR1C1 = “=IF(RC[1]=RC[2],1,0)”
Range(“H1″) = 0
GoTo SHE
‘EOI ——————————————————————————-EOI
SHR: If sr = 3 Then Stop
GoTo SHE
‘EOI ——————————————————————————-EOI
SHS: If sr = 3 Then Stop
GoTo SHE
‘EOI ——————————————————————————-EOI
SHE: Application.ScreenUpdating = True: Range(n & “D6″) = Timer – t: End Sub
‘EOI ——————————————————————————-EOI
Sub ORI()
For i = 0 To Range(“E7″)
For j = 0 To Range(“E8″) Step -1
x = Range(“D7″) + i * Range(“C7″): w = Range(“D8″) + j * Range(“C8″) ‘x=long w=lati
AppActivate “Google Earth”: Application.Wait (Now + TimeValue(“0:0:1″))
SendKeys “{backspace 20}”: SendKeys (w & “,” & x & “~”): Range(“C3″) = w & “,” & x
Cells(2 + j, 20 + i) = w & “,” & x
Application.Wait (Now + TimeValue(“0:0:” & Range(“B8″))): Next j
Application.Wait (Now + TimeValue(“0:0:” & Range(“B8″))): Next i
GoTo SHE
End Sub
Sub Auu()
Range(“C3″) = Range(“C3″) + 1: If Range(“C” & Range(“C3″)) = “” Then GoTo uua
AppActivate “Google Earth”: ‘Application.Wait (Now + TimeValue(“0:0:1″))
SendKeys “{backspace 20}”: SendKeys (Range(“C” & Range(“C3″)) & “~”):
Range(“D” & Range(“C3″)) = Now()
uua:
End Sub
Sub Auv()
Range(“WHD!B4″) = Range(“WHD!B4″) + 1
AppActivate “Microsoft Excel – GES”: Sheets(“WHD”).Select: Range(“D3″).Select
Application.Run “GES.GES”
End Sub
Sub Auw()
Workbooks(“GES”).Activate: Range(“F3″).Select
Range(“WEB!F2″) = Range(“WEB!F2″) + 1: Application.Run “GES.GES”
‘Application.Wait (Now + TimeValue(“0:0:15″)): SendKeys “{tab 2}~”
End Sub
Sub Aux()
Workbooks(“GES”).Activate: Sheets(“NAM”).Select
If Range(“G1″) > 30 Then Range(“G2:G3″).Select Else Range(“G2″).Select
Application.Run “GES.GES”
‘Workbooks(“SXX”).Activate: Sheets(“LNK”).Select: Range(“E3″).Select
‘Application.Run “LNK.LNK”
End Sub


Follow

Get every new post delivered to your Inbox.