plugin to sense that a butoon in XL has been pressed

Help each other out

plugin to sense that a butoon in XL has been pressed

Postby lar282 on Mon Oct 17, 2005 7:20 am

Hi
Is it possible from a plugin to sense that a button in Xlobby has been pressed?


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby art on Wed Oct 19, 2005 2:58 am

I'm not sure if that's possible, but if you want to track some specific button, why don't you create a command in the plugin and add it to the event that button executes. That way every time button is pressed it will do whatever it needs plus your command will be executed and you can do than whatever you need.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby lar282 on Wed Oct 19, 2005 6:16 am

thanks for the tip, but the plugin is a timer and I need to abort the timer if a user presses a button.


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby ComputerTimeCO on Wed Oct 19, 2005 6:54 am

Hi Lasse,

I'm not real sure what you are trying to do, but you can create a new window and assign it keyboard focus. The cancel button can be apart of that window. What ever your processing should be ran on a separate thread.

Regards,
Carm.
ComputerTimeCO
 
Posts: 47
Joined: Mon Oct 11, 2004 10:24 am

Postby lar282 on Wed Oct 19, 2005 6:58 am

Well....

I'm almost done with the plugin now so here we gooooo


Its a Autoplay plugin. Since I haven't heard from Steven in a long time I thought I might as well just write one that suited me!

When a cd is inserted a overlay is opened and a timer is started. After the timer is ended(10sek), the overlay is closed and a certain number of XL commands are sent. NOW, the problem is what happens if the user presses play dvd and the timer doesn't sense that and goes on counting.after 10 sek it will aslo play the dvd!!!!The simplest way of fixing it is just to have a abort command in the plugin and the user must add that to the play dvd event, but I thought it might be cooler to sense a button down press.


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby lar282 on Wed Oct 19, 2005 9:54 am

Another question?

Can I sendcommand using an EVENT in xlobby from a plugin?
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby badubo on Wed Oct 19, 2005 9:56 am

Can I sendcommand using an EVENT in xlobby from a plugin?

No, only commands, I already asked that to Steven (mainly for having the same multithreading issue as a real event)
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby lar282 on Wed Oct 19, 2005 9:57 am

thanks badubo
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden