Graphics

 View Only
  • 1.  Sharing my sample/test scripts on GitHub

    Posted 10-19-2012 08:32
    Hi,

    I'm new to Ross XPression and still learning what can be done.

    I'm posting some of my sample/test scripts on GitHub: https://github.com/erikusaj/Ross_XPression_scripting

    Mostly experiments using following COM objects: FSO, MSXML2, ADODB.

    Hope they can be of some use.

    [I]XPression_StaticMap.vbs[/I]

    script to generate a Map of your location from Google static maps API edit

    [I]XPression_QRcode.vbs[/I]

    script to generate a QR code by using Google chart API

    [I]XPression_GoogleChartMap.vbs[/I]

    script to generate a Geo-political map texture by using GoogleChart API

    [I]XPression_TVshow_Banner.vbs[/I]

    script to retrieve a banner for a TV-show from www.thetvdb.com


  • 2.  RE: Sharing my sample/test scripts on GitHub

    Posted 10-11-2013 00:05
    thank you Erik!

    #XPression


  • 3.  RE: Sharing my sample/test scripts on GitHub

    Posted 10-11-2013 08:06
    Hope you they are useful at least as learning examples.

    I was hoping the TV-station I was working for would adopt some solution, for Example you can use a Twitter intent URL (https://dev.twitter.com/docs/intents) to follow someone by scanning a code on TV, or retweet something doing the same.

    If you use a url-shortener this can be also used to to measure conversions via TV.

    As for the TV show banner sample the idea would be to set up a in-house server with show assets. Textures for Bugs / credit squeeze, etc. can be then generated by calling the server API. Again mostly a proof-of-concept. If there is no-API it can still be used to load textures based on some naming conventions.

    Another thing I was experimenting was controlling a 3rd-party CG (some opensource CG) via the XPression rundown. A simple scene with a script that sends a command with parameters can do the trick. In such way all can be served by MOS automation edited and previewed in the newsroom tool, controlled in XPression Remote Sequencer ...

    #XPression


  • 4.  RE: Sharing my sample/test scripts on GitHub

    Posted 12-04-2013 22:45
    These scripts are great! One question: the first Static_Map in the rundown seems to always default to the previous map that was loaded. The next Static_Map in the sequence loads correctly. Any ideas?

    Also, Noob Questions: COM objects. FSO, MSXML2, ADODB. What are these, and how do I know I have them "installed"?

    #XPression


  • 5.  RE: Sharing my sample/test scripts on GitHub

    Posted 12-09-2013 10:27
    Regarding the loading question I'm not sure. would need to debug and update it a bit. Looking at the code it might be better if I deleted the file and texture. In such way it would be always loaded.

    As per COM object libraries:

    In general they are all available on Windows. If some COM object is not available the CreateObject would return an error. Looking at the code I did not add appropriate error handling on object creation:

    On Error Resume Next

    obj = CreateObject(" ... ")

    If Err.Number 0 Then

    ' code to output error message: Err.Number Err.Description

    End If


    FSO = FileSystemObject, contains functions enabling working with files, folders and drives from scripts. http://msdn.microsoft.com/en-us/library/d6dw7aeh(v=vs.84).aspx

    Used to delete files, or to create folders.

    MSXML = Microsoft XML Core Services (MSXML) provides a comprehensive set of W3C compliant XML APIs. This is needed if you wish to use some XML-related functions.

    Used for parsing some XML node.

    ADODB - ActiveX Data Objects (ADO) contains objects with functions to access data sources.

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms681025(v=vs.85).aspx

    I used the ADODB.Stream object to save the response body as stream to a file.

    But other ADO objects can be used for example to connect to a database and retrieve data - ADODB.connection and ADODB.Recordset objects.

    #XPression


  • 6.  RE: Sharing my sample/test scripts on GitHub

    Posted 12-11-2013 20:22
    It seems to be working now but I wasn't sure where to enter that code at :/

    I added:

    1. Text2 field which the user can specify the zoom level between 1 and 24.

    2. A red label that centers on map with the letter "L" for "Location".

    Dim Text1 As xpTextObject

    Self.GetObjectByName("Text1", Text1)

    Dim Text2 As xpTextObject

    Self.GetObjectByName("Text2", Text2)

    Dim url="http://maps.googleapis.com/maps/api/staticmap?center=" & Text1.Text & "&zoom=" & Text2.Text & "&size=400x400&markers=color:red%7Clabel:L%7C" & Text1.Text & "&maptype=roadmap&sensor=false"


    #XPression


  • 7.  RE: Sharing my sample/test scripts on GitHub

    Posted 12-12-2013 07:23
    Just note, when using any Web API, pay attention to any use limits:

    https://developers.google.com/maps/documentation/staticmaps/#Limits

    as well as any other terms & conditions.

    #XPression


  • 8.  RE: Sharing my sample/test scripts on GitHub

    Posted 12-12-2013 16:30
    Thanks for linking that. I did read the terms before considering using google for maps.

    Thanks again Erik!

    #XPression