Jump to content

Search the Community

Showing results for tags 'nasa'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. Hello, It's now working quite nice. See this post in the UDF forum Regards, Rudi. ------------ no need to read all the other lines ----------- this is a first script, to get NASA solar pictures to my local disk. Works quite okay, but it is very slow. 1.) Possibly there is a chance to speed it up? #include <Inet.au3> #include <Date.au3> $url = "http://sdo.gsfc.nasa.gov/assets/img/browse/" $Start = "2016/01/01" $NextDate = $Start $RegExJpgName = '(.*?<a href=")([\d_]+?_1024_0193\.jpg)(">.*)' ; $2 returns the JPG file name. Size 1024x1024, Picture colouring type 0193 (whatsoever that exactly means ;-) $SolarFolder = @TempDir & "\SolarJPGs\" DirCreate($SolarFolder) ShellExecute($SolarFolder) HttpSetProxy(1) ; direct access While (_DateDiff("D", $NextDate, _NowCalcDate()) > -1) $NextFolder = $url & $NextDate & "/" ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $NextFolder = ' & $NextFolder & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console GetJPGs($NextFolder) $NextDate = _DateAdd("D", 1, $NextDate) WEnd Func GetJPGs($_URL) $page = _INetGetSource($_URL) $aPage = StringSplit($page, "<tr>", 1) For $a = 1 To $aPage[0] If StringRegExp($aPage[$a], $RegExJpgName) Then $_JPG = StringStripWS(StringRegExpReplace($aPage[$a], $RegExJpgName, "$2"), 1 + 2) $_NextURL = $_URL & $_JPG $_NextJPG = $SolarFolder & $_JPG If FileExists($_NextJPG) Then ContinueLoop ; that file has been downloaded before ALREADY ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $_NextJPG = ' & $_NextJPG & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $result = InetGet($_NextURL, $_NextJPG, 1 + 2, 1) EndIf Next EndFunc ;==>GetJPGs 2.) When I open the first picture with Irfan View, I can use the "right" arrow to "movie" through that series of JPG files. What is the easiest way to "merge" those pics to a movie? (format doesn't matter, one that's good for androids would be nice. No experience with all that so far. I found how to split movies to one pic per frame using Irfan, but not how to merge JPGs to a movie) Any suggestions appreciated, propably there are ready-to-use tools out there I just missed, because I didn't know what to search for exactly. Or there is an easy solution to "play" the images as a movie within an Autoit GUI? Comment: Interesting points of time I've found so far are e.g.: 2016-01-06@12:41:30 the focus on the sun was almost lost 2016-01-13@13:55:18 it's obviously a satelite cam, starting a 360° rotation at this point of time Regards, Rudi.
  2. Hi. You are a solar enthusiast? for my personal fun I wrote these two scripts. The first one is downloading all the JPG solar pictures, starting at a given date. the 2nd one will display them in an Autoit GUI, with an adjustable image difference for your right and left eye: "Stare through" your monitor, so that your left eye will focus the left image, your right eye the right image, then you will recognize the 3D effect. If you have difficulties to "match" the left / right image to your left / right eye, then ... decrease the GUI's size (PAGE-DN), until the "image-middle-distance" is a bit BELOW your eye's distance (depends on your monitor's size and your physiognomy) put your face very close to your monitor, then slowly fade back, until you will recognize to see virtually THREE images Wait a moment to recognize the 3D effect of the "middle image" Concentrate on this "middle image" and it's 3D effect AVOID rotating or moving your head in any direction, except forward/backward! This propably will kill down the focus, if you've had difficulties to get it in the beginning! Try to SLOWLY fade back with your face even more, until you have reached a comfortable distance. Now use PAGE-UP, do increase the GUI's (the images) size: Once you've caught the 3D "match", you can usually increase the size to values, you would have never ever been able to "match" at the first time. (The downloaded images are 1024 x 1024 pixels) #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Description=Display NASA JPG solar pics as a 3D movie #AutoIt3Wrapper_Res_Fileversion=1.0.0.7 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_LegalCopyright=Rudi Thilo #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_Res_Field=phone|+49 171 685 9 685 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs autoit v3.3.12.0 author: Rudi Thilo +49 171 685 9 685 Download the solar JPG pictures of NASA from the subfolders of the URL specified as first variable declaration 1.) download the JPGs using this script 2.) Use "Solar-GUI-2.au3 to display them as a movie inside an Autoit3 GUI as a "poor-man's-3D-cinema" Both scripts have to be in the same folder. have fun! :D #ce #include <Inet.au3> #include <Date.au3> $url = "http://sdo.gsfc.nasa.gov/assets/img/browse/" $Start = "2015/01/01" $NextDate = $Start $RegExJpgName = '(.*?<a href=")([\d_]+?_1024_0193\.jpg)(">.*)' ; $2 returns the JPG file name. Size 1024x1024, Picture colouring type 0193 (whatsoever that exactly means ;-) $SolarFolder = @ScriptDir & "\SolarJPGs\" DirCreate($SolarFolder) ShellExecute($SolarFolder) HttpSetProxy(1) ; direct access While (_DateDiff("D", $NextDate, _NowCalcDate()) > -1) $NextFolder = $url & $NextDate & "/" ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $NextFolder = ' & $NextFolder & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console GetJPGs($NextFolder) $NextDate = _DateAdd("D", 1, $NextDate) WEnd Func GetJPGs($_URL) $page = _INetGetSource($_URL) $aPage = StringSplit($page, "<tr>", 1) if @error then Exit For $a = 1 To $aPage[0] If StringRegExp($aPage[$a], $RegExJpgName) Then $_JPG = StringStripWS(StringRegExpReplace($aPage[$a], $RegExJpgName, "$2"), 1 + 2) $_NextURL = $_URL & $_JPG $_NextJPG = $SolarFolder & $_JPG If FileExists($_NextJPG) Then ContinueLoop ; that file has been downloaded before ALREADY ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $_NextJPG = ' & $_NextJPG & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console $result = InetGet($_NextURL, $_NextJPG, 1 + 2, 1) EndIf Next EndFunc ;==>GetJPGs #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Description=Display NASA JPG solar pics as a 3D movie #AutoIt3Wrapper_Res_Fileversion=2.0.0.17 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_LegalCopyright=Rudi Thilo #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_Res_Field=phone|+49 171 685 9 685 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs autoit v3.3.12.0 display the previously downloaded solar images as a movie in one Autoit3 GUI, to get some 3D impression use ARROW-UP to increase the GUI's size use ARROW-DOWN to decrease the GUI's size use LEFT-ARROW to run the movie backward use RIGHT-ARROW to run the movie forward use PAGEUP to increase the delta between the two images (more 3D effect) use PAGEDN to decrease the delta between the two images. Negative values will give you a strange effect use ESC to close the program have fun! :D #ce #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <Misc.au3> #include <file.au3> $SolarFolder = @ScriptDir & "\SolarJPGs\" #Region Fill array with all found JPG files $aJPGs = _FileListToArray($SolarFolder, "*.jpg", 1, 1) If @error Then MsgBox(0, "Solar JPGs", "No JGP files found in path" & @CRLF & $SolarFolder) Exit EndIf _ArraySort($aJPGs, 0, 1) #EndRegion Fill array with all found JPG files $Delta = 3 $forward = True $LastDate = StringLeft($aJPGs[1], 4) & "-" & StringMid($aJPGs[1], 5, 2) & "-" & StringMid($aJPGs[1], 7, 2) Local $hDLL = DllOpen("user32.dll") AdlibRegister("ReadKeys") $h = 300 $w = $h * 2 $margin = 2 $GuiTitle = "solar movie, " & $h & " px, " $Gui = GUICreate($GuiTitle & $LastDate, $w + $margin, $h + $margin) $Left = GUICtrlCreatePic($aJPGs[1 + $Delta], $margin, $margin, $w / 2 - $margin * 2, $h - $margin * 2) $Right = GUICtrlCreatePic($aJPGs[1], $w / 2 + $margin, $margin, $w / 2 - $margin * 2, $h - $margin * 2) GUISetState() $pointer = 1 While 1 If ($pointer + $Delta) > (UBound($aJPGs) - 1) Or ($pointer > UBound($aJPGs)) Then MsgBox(0, "", "Last image reached." & @CRLF & @CRLF & "Changing direction to reverse now...", 3) $forward = False $pointer -= 1 ElseIf ($pointer < 1) Or ($pointer + $Delta) < 1 Then MsgBox(0, "", "First image reached." & @CRLF & @CRLF & "Changing direction to forward now...", 3) $forward = True $pointer += 1 EndIf Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ConsoleWrite("close erkannt" & @CRLF) #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Default Button=Second, Icon=Question, Timeout=5 ss, Miscellaneous=Top-most attribute If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(262436, "ESC recognized", "Do you want to terminate this program?", 5) Select Case $iMsgBoxAnswer = 6 ;Yes Exit Case $iMsgBoxAnswer = 7 ;No Case $iMsgBoxAnswer = -1 ;Timeout EndSelect #EndRegion --- CodeWizard generated code Start --- EndSwitch $NextName = $aJPGs[$pointer + $Delta] $NextName = StringTrimLeft($NextName, StringInStr($NextName, "\", 0, -1)) $NextDate = StringLeft($NextName, 4) & "-" & StringMid($NextName, 5, 2) & "-" & StringMid($NextName, 7, 2) If $NextDate <> $LastDate Then $LastDate = $NextDate AdjustTitle() EndIf $L = $aJPGs[$pointer + $Delta] $R = $aJPGs[$pointer] GUICtrlSetImage($Left, $L) GUICtrlSetImage($Right, $R) If $forward Then $pointer += 1 Else $pointer -= 1 EndIf WEnd Func ReadKeys() $aPos = WinGetPos($Gui) If _IsPressed("26", $hDLL) Then ; UP arrow key $h += 2 $w = $h * 2 WinMove($Gui, "", $aPos[0] - 1, $aPos[1] - 1, $w + $margin * 4, $h + $margin * 2 + 20) ; symmetrically expand one pixel in each direction AdjustTitle() GUICtrlDelete($Left) GUICtrlDelete($Right) $Left = GUICtrlCreatePic($L, $margin, $margin, $w / 2 - $margin * 2, $h - $margin * 2) $Right = GUICtrlCreatePic($R, $w / 2 + $margin, $margin, $w / 2 - $margin * 2, $h - $margin * 2) ElseIf _IsPressed("28", $hDLL) Then ; DOWN arrow key $h -= 2 $w = $h * 2 WinMove($Gui, "", $aPos[0] + 1, $aPos[1] + 1, $w + $margin * 4, $h + $margin * 2 + 20) ; symmetrically shrink one pixel in each direction AdjustTitle() GUICtrlDelete($Left) GUICtrlDelete($Right) $Left = GUICtrlCreatePic($L, $margin, $margin, $w / 2 - $margin * 2, $h - $margin * 2) $Right = GUICtrlCreatePic($R, $w / 2 + $margin, $margin, $w / 2 - $margin * 2, $h - $margin * 2) ElseIf _IsPressed("21", $hDLL) Then ; PAGE-UP key $Delta += 1 If ($pointer + $Delta) > (UBound($aJPGs) - 1) Then MsgBox(0, "", "The End") Exit EndIf AdjustTitle() ElseIf _IsPressed("22", $hDLL) Then ; PAGE-DOWN key $Delta -= 1 AdjustTitle() ElseIf _IsPressed("25", $hDLL) Then ; LEFT cursor key $forward = False ElseIf _IsPressed("27", $hDLL) Then ; RIGHT cursor key $forward = True EndIf EndFunc ;==>ReadKeys Func AdjustTitle() $GuiTitle = "solar movie, " & $h & " px, D: " & $Delta & " " & $LastDate WinSetTitle($Gui, "", $GuiTitle) EndFunc ;==>AdjustTitle Regards, Rudi.
×
×
  • Create New...