Zwei Makros gleichzeitig ausführen?

Allgemeines zum Thema EventGhost
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Zwei Makros gleichzeitig ausführen?

Post by krambriw » Wed Jan 08, 2014 6:37 am

Yes, it is a formatting error you get.

This is how the formatting MUST look like, everything adjusted to the left margin

Code: Select all

from threading import Thread, Event

def emberMediaManager(emberMediaManagerThreadEvent):
    eg.plugins.System.Execute(
        u'C:\\Users\\Illium\\Downloads\\EmberMM-Deploy_20131122\\EmberMM-Deploy_20131122\\Ember Media Manager.exe',
        u'-newauto -all -nowindow',
        1,
        True,
        2,
        u'C:\\Users\\Illium\\Downloads\\EmberMM-Deploy_20131122\\EmberMM-Deploy_20131122',
        False
    )
    emberMediaManagerThreadEvent.set()
    print "emberMediaManager thread finished"


emberMediaManagerThreadEvent = Event()
emberMediaManagerThread = Thread(
    target=emberMediaManager,
    args=(emberMediaManagerThreadEvent,)
)
emberMediaManagerThread.start()
print "Starting emberMediaManager thread"



Try now the following

a) click on the 'SELECT ALL'

b) type ctrl+c or right click on the highlighted text and select 'Copy'

c) open the configuration for the python script (or make a new one starting from an empty dialog)

d) type ctrl+v or right click in the dialog and select 'Paste'

At the end, it must look exactly like this:
Image2.jpg
Best regards
You do not have the required permissions to view the files attached to this post.

Ron The Don
Posts: 19
Joined: Sun Dec 22, 2013 11:34 am

Re: Zwei Makros gleichzeitig ausführen?

Post by Ron The Don » Wed Jan 08, 2014 12:51 pm

That's what I have been doing all along when using your code.

I still get an error message though for some reason.
This is how it looks on my EG by just copy/pasting your code into the script.

Image

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Zwei Makros gleichzeitig ausführen?

Post by krambriw » Wed Jan 08, 2014 1:09 pm

Don't you see that every line is adjusted to the right???

You have to delete the starting characters so that it looks exactly as my example

As example, look at the first line. In your case it is

Code: Select all

    from threading import Thread, Event

but in my example

Code: Select all

from threading import Thread, Event
You see the difference? I have nothing in front of the word 'from'

That is why you get the 'unexpected indent' error message, I have tried to explain, python is very sensitive to the formatting mistakes.

Try now to fix the lines in the script

Ron The Don
Posts: 19
Joined: Sun Dec 22, 2013 11:34 am

Re: Zwei Makros gleichzeitig ausführen?

Post by Ron The Don » Wed Jan 08, 2014 1:45 pm

Strange, when I copy/paste your thing into an empty python script, I get those spaces automatically. I will delete them!

Ron The Don
Posts: 19
Joined: Sun Dec 22, 2013 11:34 am

Re: Zwei Makros gleichzeitig ausführen?

Post by Ron The Don » Wed Jan 08, 2014 1:56 pm

Dear Walter,

I can report that everything works now, despite my apparent blindness when it comes to copying code ha.
Thanks so much for your help, you are a star.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Zwei Makros gleichzeitig ausführen?

Post by krambriw » Thu Jan 09, 2014 4:57 pm

Dear Ron,
Just happy to help, I am glad it is working now...

Is the main issue also ok now? I mean EG is not locked up anymore? You can control XBMC as you want with the remote now?

Best regards

Ron The Don
Posts: 19
Joined: Sun Dec 22, 2013 11:34 am

Re: Zwei Makros gleichzeitig ausführen?

Post by Ron The Don » Thu Jan 09, 2014 7:55 pm

Yes, I can control XBMC the entire time, no problem! I'll now read into "controlling multiple programs" with my remote.

Thanks again.

Post Reply