Advertisement
tonyrulez

GPXSee AHK script

Sep 6th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Kerékpáros utazásaim rögzítését könnyítő kis programocska.
  2. ; Csak akkor működik, ha a 3 lenti elérési út jó! Fokozottan figyelni, hogy a gps_computer F legyen.
  3. ; (vagyis 3db lemez van a gépben CDE, és ez az elsőnek rádugott tárhely)
  4. ; [megtehetném hogy a lemezeken sorban keressen iGPSPORT mappát, de leszarom]
  5.  
  6.  
  7. ; elérési utak
  8. gps_computer := "F:\iGPSPORT\Activities\20*.fit"
  9. drive_folder := "C:\Users\tonyrulez\Google Drive\iGPS\"
  10. excel := "C:\Users\tonyrulez\Google Drive\Dokumentumok\Programok\kerekpar computer.xlsx"
  11.  
  12. ; útvonalfájl áthelyezése Drive-ba
  13. FileMove, %gps_computer%, %drive_folder%
  14.  
  15. ; legfrisebb útvonalfájl keresése és megnyitása
  16. MostRecentTime:=
  17. Loop, %drive_folder%*.fit
  18. {
  19.     FileGetTime, ThisFileTime
  20.     if (MostRecentTime < ThisFileTime)
  21.     {
  22.         MostRecentTime := ThisFileTime
  23.         FilePath:=A_LoopFileFullPath
  24.     }
  25. }
  26. Run, %FilePath%
  27.  
  28. ; GPXSee bal oldalra mozgat
  29. WinWait, GPXSee
  30. WinMove,,, -8, 0, 960, 1050
  31.  
  32. ; Ctrl+S küldése stathoz
  33. Sleep, 500
  34. Send ^s
  35.  
  36. ; ScrollLock kikapcsol Excel miatt
  37. SetScrollLockState, Off
  38.  
  39. ; Excel megnyitása
  40. xl := ComObjCreate("Excel.Application")
  41. xl.Visible := true
  42. path = %excel%
  43. xl.Workbooks.Open(Path)
  44.  
  45. ; Excel jobbra
  46. WinWait, kerekpar computer.xls
  47. WinActivate, kerekpar computer.xls
  48. WinMove, A,, 960, 0, 960, 1050
  49.  
  50.  
  51.  
  52. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement