Autoremote & Webcam plugin

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

  1. Stéphane

    Stéphane New Member

  2. joaomgcd

    joaomgcd Administrator Staff Member

    Yes, it seems possible :) What part aren't you able to figure out?
     
  3. Stéphane

    Stéphane New Member

    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

    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

    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

    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

    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

    Can you try setting newest like
    Code (Text):
    newest = "C:\\eventghost"+"\\"+newest
     
  9. Stéphane

    Stéphane New Member

    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

    Awesome! Great to know! :D
     
    Andilee likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice