This commit is contained in:
Bram Veenboer
2011-02-20 19:39:43 +00:00
parent dff79afa29
commit 6ebbbba657
7 changed files with 32 additions and 18 deletions

View File

@@ -41,9 +41,9 @@ public class Main extends TaskListener {
public void initialise() throws DeviceInitialiseException {
add(new JIntellitypeDevice());
//add(new PlayerDevice());
add(new PlayerDevice());
//add(new RumblepadDevice());
add(new WiimoteDevice());
//add(new WiimoteDevice());
//add(new GUIDevice());
//add(new TextDevice());
//add(new LanTextDevice());
@@ -55,11 +55,11 @@ public class Main extends TaskListener {
}
}
//add(new ExampleApplication());
add(new ExampleApplication());
//add(new WMPApplication());
add(new GomPlayerApplication());
//add(new GomPlayerApplication());
//add(new WinampApplication());
add(new iTunesApplication());
//add(new iTunesApplication());
for (Application application : applicationCycle) {
application.start();
}

View File

@@ -43,7 +43,7 @@ public enum Command {
FORWARD_MAIL (40),
SEND_MAIL (41),
SPELL_CHECK (42),
DICTATE_OR_COMMAND_CONTROL_TOGGLE (43),
DICTATE_OR_COMMAND_CONTROL_TOGGLE (43),
MIC_ON_OFF_TOGGLE (44),
CORRECTION_LIST (45),
MEDIA_PLAY (46),

View File

@@ -166,7 +166,6 @@ public enum Key {
NONAME (0xFC),
PA1 (0xFD),
OEM_CLEAR (0xFE);
protected int code;

View File

@@ -89,8 +89,8 @@ abstract public class WindowsApplication extends Application {
protected void key(Type key, int code) throws SendKeyException {
int scanCode = mapVirtualKey.executeCall(new Object[] {code, 0});
int result = postMessage.executeCall(new Object[] {
handle, key.getCode(), code, (scanCode << 16)});
int result = postMessage.executeCall(new Object[] {
handle, key.getCode(), code, scanCode << 16});
if (result < 1 || postMessage.getLastError() != null) {
throw new SendKeyException();
}

View File

@@ -1,7 +1,5 @@
package pm.application.windows.gomplayer;
import java.io.IOException;
import pm.Action;
import pm.application.windows.Command;
import pm.application.windows.Type;
@@ -9,7 +7,6 @@ import pm.application.windows.Key;
import pm.application.windows.WindowsApplication;
import pm.exception.application.windows.SendCommandException;
import pm.exception.application.windows.SendKeyException;
import pm.util.Native;
public class GomPlayerApplication extends WindowsApplication {
protected final static String REGISTRY = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\Media\\GomPlayer\\shell\\open\\command";
@@ -17,7 +14,7 @@ public class GomPlayerApplication extends WindowsApplication {
protected final static String NAME = "GOM Player";
public GomPlayerApplication() {
super(PROGRAM, NAME, Native.getValue(REGISTRY));
super(PROGRAM, NAME, "C:\\Program Files (x86)\\GomPlayer\\GOM.exe");
}
public void action(Action action) {
@@ -49,9 +46,6 @@ public class GomPlayerApplication extends WindowsApplication {
case VOLUME_DOWN:
key(Type.DOWN, Key.DOWN);
break;
case SHUFFLE:
//
break;
}
} catch (SendCommandException e) {} catch (SendKeyException e) {}
}

21
java/src/pm/todo/TODO Normal file
View File

@@ -0,0 +1,21 @@
log bijhouden
mappings lezen vanuit config bestand
exeptions en foutmeldingen nakijken/afhandelen/loggen
initialises en exits controleren op succes. tussendoor afgesloten apps en devs herkennen en restarten? op runtime nieuwe applicaties of devices toevoegen of sluiten.
feedback systeem implementeren, rumble voor zowel wiimote als rumblepad
nummerinfo weergeven, waar? via feedback?
javadoc maken, class diagram opstellen enz.....
naamgeving en indeling classes/packages controleren
meer applicaties implementeren, zoals VLC, WMP, Youtube? (interface naar flash?)
logo ontwerpen
exporteren naar uitvoerbare jar file

View File

@@ -19,7 +19,7 @@ public class VBScript {
+ "Set processes = service.ExecQuery _\n"
+ " (\"select * from Win32_Process where name='%s'\")\n"
+ "For Each process in processes\n"
+ "wscript.echo process.Name \n"
+ "wscript.echo process.Name\n"
+ "Next\n"
+ "Set WSHShell = Nothing\n", program));
fileWriter.close();
@@ -43,7 +43,7 @@ public class VBScript {
+ "Set processes = service.ExecQuery _\n"
+ " (\"select * from Win32_Process where name='%s'\")\n"
+ "For Each process in processes\n"
+ "process.Terminate() \n"
+ "process.Terminate()\n"
+ "Next\n"
+ "Set WSHShell = Nothing\n", program));
fileWriter.close();