Autoremote & Webcam plugin

Discussion in 'EventGhost' started by Stéphane, May 18, 2015.

  1. Stéphane

    Stéphane New Member

    Joined:
    Mar 30, 2015
    Messages:
    19
    Likes Received:
    3
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Yes, it seems possible :) What part aren't you able to figure out?
     
  3. Stéphane

    Stéphane New Member

    Joined:
    Mar 30, 2015
    Messages:
    19
    Likes Received:
    3
    i have try anything yet ^^
    just install eventghost yesterday ,will continue this afternoon or on thursday
    i think i will be blocked at the macro to trigger the webcam plugin to take a picture

    Thanks for reply ;)
     
  4. Stéphane

    Stéphane New Member

    Joined:
    Mar 30, 2015
    Messages:
    19
    Likes Received:
    3
    lol pretty easy to do ^^

    so the trigger is when i send Photo, i take the picture :)

    Now send the photo to the device ^^
     
  5. Stéphane

    Stéphane New Member

    Joined:
    Mar 30, 2015
    Messages:
    19
    Likes Received:
    3
    i can't open it with open fil on tasker ?
    the task run but nothing is do.
    the parameter is %arfiles(1) in open file task :/


    EDIT :
    How can i pass the parameter to Autoremote ( without clicking on Send to eventghost on the picture file in explorer windows )
    i can choose the last picture taken with this :
    import os

    newest = max(os.listdir('.'), key = os.path.getctime)
    print newest
    but how can i pass this character to the autoremote action ?
     
    Last edited: May 19, 2015
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    you need to set that variable in a "global" place where AutoRemote can access it, for example eg.newestphoto, then use {eg.newestphoto} in the AutoRemote action :)
     
  7. Stéphane

    Stéphane New Member

    Joined:
    Mar 30, 2015
    Messages:
    19
    Likes Received:
    3
    OK :)
    But i have a problem with the path for autoremote :


    Here is my python script

    import os
    path = "C:\eventghost"
    os.chdir(path)
    files = sorted(os.listdir(os.getcwd()), key=os.path.getmtime)
    newest = files[-1]
    newest = ["C:\eventghost"+"/"+newest]
    eg.globals.chemin = newest


    i got the this problem :

    Sending files in message: ["['C:\\\\eventghost/picture-05.21.2015']"]
    Sending file: ['C:\\eventghost/picture-05.21.2015']
    Error sending files ["['C:\\\\eventghost/picture-05.21.2015']"]: [Errno 22] Invalid argument: u"['C:\\\\eventghost/picture-05.21.2015']"


    I don't know hot to make only 1 " \ "
    i tried to make the \ apartly like "c:"+"\\"+ .. but it is the same :/
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you try setting newest like
    Code (Text):
    newest = "C:\\eventghost"+"\\"+newest
     
  9. Stéphane

    Stéphane New Member

    Joined:
    Mar 30, 2015
    Messages:
    19
    Likes Received:
    3
    Here is my Python scipt :

    import os
    from time import gmtime, strftime
    strToday= strftime("%m.%d.%Y", gmtime())
    path = "C"+":"+"\\"+"eventghost"+"\\"+"picture-"+strToday
    os.chdir(path)
    files = sorted(os.listdir(os.getcwd()), key=os.path.getmtime)
    newest = files[-1]
    newest = "C"+":"+"\\"+"eventghost"+"\\"+"picture-"+strToday+"\\"+newest
    eg.globals.chemin = newest

    because the plugin create a new folder each day i must research the folder of day and the last files
    Then in autoremote send message i put the {eg.globals.chemin} ANNNND it works ! :)

    Thanks for your help !
     
    stanguay likes this.
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Awesome! Great to know! :D
     
    Andilee likes this.

Share This Page