Browse Source

BoutonsPath

Joao Conceicao Nunes 3 years ago
parent
commit
b708efc988
57 changed files with 11489 additions and 101 deletions
  1. BIN
      App1.jar
  2. 35
    3
      External_Software/Glovepie/WiimoteScripts/WiimoteScript.PIE
  3. 67
    67
      External_Software/Glovepie/pielog.txt
  4. 1
    0
      External_Software/default.cfg
  5. BIN
      bin/App1.jar
  6. BIN
      bin/Application1/Fenetre$1.class
  7. BIN
      bin/Application1/Fenetre$2.class
  8. BIN
      bin/Application1/Fenetre$3.class
  9. BIN
      bin/Application1/Fenetre.class
  10. BIN
      bin/Application1/carte$1.class
  11. BIN
      bin/Application1/carte$2.class
  12. BIN
      bin/Application1/carte$3.class
  13. BIN
      bin/Application1/carte$4.class
  14. BIN
      bin/Application1/carte$5.class
  15. BIN
      bin/Application1/carte$6.class
  16. BIN
      bin/Application1/carte$7.class
  17. BIN
      bin/Application1/carte$8.class
  18. BIN
      bin/Application1/carte$9.class
  19. BIN
      bin/Application1/carte.class
  20. BIN
      bin/External_Software/Glovepie/Bird.dll
  21. BIN
      bin/External_Software/Glovepie/CStereoI.dll
  22. BIN
      bin/External_Software/Glovepie/D3DX81ab.dll
  23. BIN
      bin/External_Software/Glovepie/EMADevice_DLL.DLL
  24. BIN
      bin/External_Software/Glovepie/GlovePIE.exe
  25. 28
    0
      bin/External_Software/Glovepie/GlovePIE.exe.manifest
  26. 6
    0
      bin/External_Software/Glovepie/GlovePIE.ini
  27. BIN
      bin/External_Software/Glovepie/GlovePIE_Bird_5DT.exe
  28. 28
    0
      bin/External_Software/Glovepie/GlovePIE_Bird_5DT.exe.manifest
  29. BIN
      bin/External_Software/Glovepie/HAT3DIPC.dll
  30. 188
    0
      bin/External_Software/Glovepie/MouseScripts/MouseParty.pie
  31. BIN
      bin/External_Software/Glovepie/NPClient.dll
  32. 559
    0
      bin/External_Software/Glovepie/PIE.html
  33. BIN
      bin/External_Software/Glovepie/PPT.dll
  34. BIN
      bin/External_Software/Glovepie/RPPM3Csafe.dll
  35. BIN
      bin/External_Software/Glovepie/RPPM3DDI.dll
  36. BIN
      bin/External_Software/Glovepie/RPPM3USB.dll
  37. 21
    0
      bin/External_Software/Glovepie/SixaxisScripts/LegoIndianaJonesSIXAXIS.PIE
  38. 29
    0
      bin/External_Software/Glovepie/VoiceScripts/MouseVoiceCommands.pie
  39. 25
    0
      bin/External_Software/Glovepie/WiimoteScripts/LegoIndianaJonesWiimoteNunchuk.PIE
  40. 13
    0
      bin/External_Software/Glovepie/WiimoteScripts/WiimoteScript.PIE
  41. 66
    0
      bin/External_Software/Glovepie/WiimoteScripts/lednerg WiiMotion Plus Mouse.PIE
  42. 8267
    0
      bin/External_Software/Glovepie/documentation.rtf
  43. BIN
      bin/External_Software/Glovepie/edk.dll
  44. BIN
      bin/External_Software/Glovepie/edk_utils.dll
  45. BIN
      bin/External_Software/Glovepie/fglove.dll
  46. BIN
      bin/External_Software/Glovepie/p5dll.dll
  47. 67
    0
      bin/External_Software/Glovepie/pielog.txt
  48. 1933
    0
      bin/External_Software/Glovepie/readme.txt
  49. BIN
      bin/External_Software/Glovepie/thinkgear.dll
  50. BIN
      bin/External_Software/TGsetup.exe
  51. BIN
      bin/Images/Install_Wiimote/1.PNG
  52. BIN
      bin/Images/Install_Wiimote/2.PNG
  53. BIN
      bin/Images/Install_Wiimote/3.PNG
  54. BIN
      bin/Images/Install_Wiimote/4.PNG
  55. BIN
      bin/Images/Install_Wiimote/5.PNG
  56. 4
    2
      src/Application1/Fenetre.java
  57. 152
    29
      src/Application1/carte.java

BIN
App1.jar View File


+ 35
- 3
External_Software/Glovepie/WiimoteScripts/WiimoteScript.PIE View File

@@ -2,12 +2,44 @@
2 2
 var.PointerBump = KeepDown(Pressed(wiimote.A),var.ButtonFreezeTime) or KeepDown(Pressed(wiimote.B),var.ButtonFreezeTime)
3 3
 Wiimote.Led1 = true
4 4
 
5
-var.MoveButton = wiimote.B
5
+
6
+
7
+mouse.RightButton = wiimote.B  ;
6 8
 mouse.LeftButton = wiimote.A
7
-mouse.RightButton = wiimote.Plus
8
-mouse.MiddleButton = wiimote.Down
9
+Up = wiimote.Up
10
+Down = wiimote.Down
11
+Left = wiimote.Left
12
+Right = wiimote.Right
13
+
14
+
15
+
16
+
17
+
18
+if KeepDown(Pressed(wiimote.Plus),var.ButtonFreezeTime) then
19
+mouse.x = 0.5
20
+mouse.y = 0.5
21
+var.HeadMouv = True
22
+end if
23
+if KeepDown(Pressed(wiimote.Minus),var.ButtonFreezeTime) then
24
+mouse.x = 0.5
25
+mouse.y = 0.5
26
+var.HeadMouv = false
27
+end if
28
+
29
+
30
+
9 31
 
32
+if var.HeadMouv then
33
+Wiimote.Led2 = true
34
+Wiimote.Led3 = false
35
+else
36
+Wiimote.Led3 = true
37
+Wiimote.Led2 = false
10 38
 if wiimote.PointerVisible but not var.PointerBump then
11 39
 mouse.x = wiimote.PointerX
12 40
 mouse.y = wiimote.PointerY
13 41
 end if
42
+end if
43
+
44
+
45
+

+ 67
- 67
External_Software/Glovepie/pielog.txt View File

@@ -1,67 +1,67 @@
1
-(0, 06-mai-2020 10:24:44) Initializing PieLog
2
-(0, 06-mai-2020 10:24:44) Initializing filemode variable
3
-(0, 06-mai-2020 10:24:44) Initializing PieSpeech
4
-(0, 06-mai-2020 10:24:44) Initializing PieVariables
5
-(0, 06-mai-2020 10:24:44) Initializing PieCursorUnit
6
-(0, 06-mai-2020 10:24:44) Initializing PieMouse
7
-(0, 06-mai-2020 10:24:44) Initializing PieKeyboard
8
-(0, 06-mai-2020 10:24:44) Initializing PieInput
9
-(0, 06-mai-2020 10:24:44) Initializing PieOSC
10
-(0, 06-mai-2020 10:24:44) Initializing PiePie
11
-(0, 06-mai-2020 10:24:44) Initializing PieFunction
12
-(0, 06-mai-2020 10:24:44) Initializing PieStatement
13
-(0, 06-mai-2020 10:24:44) Initializing PieExpression
14
-(0, 06-mai-2020 10:24:44) Initializing PieJoystick
15
-(0, 06-mai-2020 10:24:44) Initializing PieP5
16
-(0, 06-mai-2020 10:24:44) Initializing PieMidi
17
-(0, 06-mai-2020 10:24:45) Initializing PiePPJoy
18
-(0, 06-mai-2020 10:24:45) Initializing PieRemote
19
-(0, 06-mai-2020 10:24:45) Initializing Pie Speech Recognition
20
-(0, 06-mai-2020 10:24:45) Initializing PieScreen
21
-(0, 06-mai-2020 10:24:45) GetMonitorEDID
22
-(0, 06-mai-2020 10:24:45) Initializing PieWIndow
23
-(0, 06-mai-2020 10:24:45) Initializing PieCursors
24
-(0, 06-mai-2020 10:24:45) Initializing PieZ800
25
-(0, 06-mai-2020 10:24:45) Initializing PieIntersense
26
-(0, 06-mai-2020 10:24:45) Initializing PieFastrak
27
-(0, 06-mai-2020 10:24:45) Initializing PiePPT
28
-(0, 06-mai-2020 10:24:45) Initializing PieTrackIR
29
-(0, 06-mai-2020 10:24:45) Initializing PiePinch
30
-(0, 06-mai-2020 10:24:45) Starting main
31
-(0, 06-mai-2020 10:24:45) Application object initialized
32
-(0, 06-mai-2020 10:24:45) Creating main window
33
-(0, 06-mai-2020 10:24:48) EditorForm.Create
34
-(0, 06-mai-2020 10:24:51) Checking command line parameters:
35
-(0, 06-mai-2020 10:24:51) Creating debug window
36
-(0, 06-mai-2020 10:24:52) Assigning exception handler
37
-(0, 06-mai-2020 10:24:52) Creating debug remote control window
38
-(0, 06-mai-2020 10:24:52) Running application
39
-(0, 06-mai-2020 10:24:54) FormCloseQuery
40
-(0, 06-mai-2020 10:24:54) Compile>Stop
41
-(0, 06-mai-2020 10:24:54) Application finished
42
-(0, 06-mai-2020 10:24:54) Destroying EditorForm
43
-(0, 06-mai-2020 10:24:54) Finalizing PiePinch
44
-(0, 06-mai-2020 10:24:54) Finalizing PieTrackIR
45
-(0, 06-mai-2020 10:24:54) Finalizing PiePPT
46
-(0, 06-mai-2020 10:24:54) Finalizing PieFastrak
47
-(0, 06-mai-2020 10:24:54) Finalizing PieIntersense
48
-(0, 06-mai-2020 10:24:54) Finalizing PieZ800
49
-(0, 06-mai-2020 10:24:54) Finalizing PieCursors
50
-(0, 06-mai-2020 10:24:54) Finalizing PieWindow
51
-(0, 06-mai-2020 10:24:54) Finalizing PieScreen
52
-(0, 06-mai-2020 10:24:54) Finalizing Pie Speech Recognition
53
-(0, 06-mai-2020 10:24:54) Finalizing PieRemote
54
-(0, 06-mai-2020 10:24:54) Finalizing PiePPJoy
55
-(0, 06-mai-2020 10:24:54) Finalizing PieMidi
56
-(0, 06-mai-2020 10:24:54) Finalizing PieP5
57
-(0, 06-mai-2020 10:24:54) Finalizing PieJoystick
58
-(0, 06-mai-2020 10:24:54) Finalizing PieStatement
59
-(0, 06-mai-2020 10:24:54) Finalizing PieFunction
60
-(0, 06-mai-2020 10:24:54) Finalizing PiePie
61
-(0, 06-mai-2020 10:24:54) Finalizing PieOSC
62
-(0, 06-mai-2020 10:24:54) Finalizing PieKeyboard
63
-(0, 06-mai-2020 10:24:54) Finalizing PieMouse
64
-(0, 06-mai-2020 10:24:54) Finalizing PieVariables
65
-(0, 06-mai-2020 10:24:54) Finalizing PieSpeech
66
-(0, 06-mai-2020 10:24:54) Finalizing PieLog
67
-(0, 06-mai-2020 10:24:54) Closing log file
1
+(0, 07-mai-2020 11:32:54) Initializing PieLog
2
+(0, 07-mai-2020 11:32:54) Initializing filemode variable
3
+(0, 07-mai-2020 11:32:54) Initializing PieSpeech
4
+(0, 07-mai-2020 11:32:54) Initializing PieVariables
5
+(0, 07-mai-2020 11:32:54) Initializing PieCursorUnit
6
+(0, 07-mai-2020 11:32:54) Initializing PieMouse
7
+(0, 07-mai-2020 11:32:54) Initializing PieKeyboard
8
+(0, 07-mai-2020 11:32:54) Initializing PieInput
9
+(0, 07-mai-2020 11:32:54) Initializing PieOSC
10
+(0, 07-mai-2020 11:32:54) Initializing PiePie
11
+(0, 07-mai-2020 11:32:54) Initializing PieFunction
12
+(0, 07-mai-2020 11:32:54) Initializing PieStatement
13
+(0, 07-mai-2020 11:32:54) Initializing PieExpression
14
+(0, 07-mai-2020 11:32:54) Initializing PieJoystick
15
+(0, 07-mai-2020 11:32:54) Initializing PieP5
16
+(0, 07-mai-2020 11:32:54) Initializing PieMidi
17
+(0, 07-mai-2020 11:32:54) Initializing PiePPJoy
18
+(0, 07-mai-2020 11:32:54) Initializing PieRemote
19
+(0, 07-mai-2020 11:32:54) Initializing Pie Speech Recognition
20
+(0, 07-mai-2020 11:32:54) Initializing PieScreen
21
+(0, 07-mai-2020 11:32:54) GetMonitorEDID
22
+(0, 07-mai-2020 11:32:54) Initializing PieWIndow
23
+(0, 07-mai-2020 11:32:54) Initializing PieCursors
24
+(0, 07-mai-2020 11:32:54) Initializing PieZ800
25
+(0, 07-mai-2020 11:32:54) Initializing PieIntersense
26
+(0, 07-mai-2020 11:32:54) Initializing PieFastrak
27
+(0, 07-mai-2020 11:32:54) Initializing PiePPT
28
+(0, 07-mai-2020 11:32:54) Initializing PieTrackIR
29
+(0, 07-mai-2020 11:32:54) Initializing PiePinch
30
+(0, 07-mai-2020 11:32:54) Starting main
31
+(0, 07-mai-2020 11:32:54) Application object initialized
32
+(0, 07-mai-2020 11:32:54) Creating main window
33
+(0, 07-mai-2020 11:32:54) EditorForm.Create
34
+(0, 07-mai-2020 11:32:54) Checking command line parameters:
35
+(0, 07-mai-2020 11:32:54) Creating debug window
36
+(0, 07-mai-2020 11:32:54) Assigning exception handler
37
+(0, 07-mai-2020 11:32:54) Creating debug remote control window
38
+(0, 07-mai-2020 11:32:54) Running application
39
+(0, 07-mai-2020 11:32:57) FormCloseQuery
40
+(0, 07-mai-2020 11:32:57) Compile>Stop
41
+(0, 07-mai-2020 11:32:57) Application finished
42
+(0, 07-mai-2020 11:32:57) Destroying EditorForm
43
+(0, 07-mai-2020 11:32:57) Finalizing PiePinch
44
+(0, 07-mai-2020 11:32:57) Finalizing PieTrackIR
45
+(0, 07-mai-2020 11:32:57) Finalizing PiePPT
46
+(0, 07-mai-2020 11:32:57) Finalizing PieFastrak
47
+(0, 07-mai-2020 11:32:57) Finalizing PieIntersense
48
+(0, 07-mai-2020 11:32:57) Finalizing PieZ800
49
+(0, 07-mai-2020 11:32:57) Finalizing PieCursors
50
+(0, 07-mai-2020 11:32:57) Finalizing PieWindow
51
+(0, 07-mai-2020 11:32:57) Finalizing PieScreen
52
+(0, 07-mai-2020 11:32:57) Finalizing Pie Speech Recognition
53
+(0, 07-mai-2020 11:32:57) Finalizing PieRemote
54
+(0, 07-mai-2020 11:32:57) Finalizing PiePPJoy
55
+(0, 07-mai-2020 11:32:57) Finalizing PieMidi
56
+(0, 07-mai-2020 11:32:57) Finalizing PieP5
57
+(0, 07-mai-2020 11:32:57) Finalizing PieJoystick
58
+(0, 07-mai-2020 11:32:57) Finalizing PieStatement
59
+(0, 07-mai-2020 11:32:57) Finalizing PieFunction
60
+(0, 07-mai-2020 11:32:57) Finalizing PiePie
61
+(0, 07-mai-2020 11:32:57) Finalizing PieOSC
62
+(0, 07-mai-2020 11:32:57) Finalizing PieKeyboard
63
+(0, 07-mai-2020 11:32:57) Finalizing PieMouse
64
+(0, 07-mai-2020 11:32:57) Finalizing PieVariables
65
+(0, 07-mai-2020 11:32:57) Finalizing PieSpeech
66
+(0, 07-mai-2020 11:32:57) Finalizing PieLog
67
+(0, 07-mai-2020 11:32:57) Closing log file

+ 1
- 0
External_Software/default.cfg View File

@@ -0,0 +1 @@
1
+{"settingsVersion":"0","videoPortTextBox":"7777","sensorPortTextBox":"5555","hotspotSsidTextBox":"trinus","hotspotPwdTextBox":"mypassword","forcedIPCheckBox":"0","forcedIPTextBox":"192.168.42.129","fake3DComboBox":"0","fakeRollCheckBox":"0","motionBoostCheckBox":"1","qualityComboBox":"2","fastScalingCheckBox":"0","dynamicQualityCheckBox":"0","compressionTrackBar":"3","dynamicCompressionQualityCheckBox":"0","captureModeComboBoxV2":"0","captureCursorCheckBox":"0","maxFrameRateTextBox":"70","headmountComboBox":"0","sensorTypeComboBox":"0","trackIRFixCheckBox":"0","leftActionButton":"{\"actionName\":\"D1\",\"deviceId\":\"keyboard\"}","ignoreActionButton":"{\"actionName\":\"D3\",\"deviceId\":\"keyboard\"}","rightActionButton":"{\"actionName\":\"D2\",\"deviceId\":\"keyboard\"}","sensorResetActionButton":"{\"actionName\":\"D4\",\"deviceId\":\"keyboard\"}","orderYawComboBox":"0","orderPitchComboBox":"1","orderRollComboBox":"2","predictiveTrackBar":"0","scaleX":"146928","scaleY":"230000","scaleInX":"2450000","scaleInY":"1700000","screenCenterX":"500000","screenCenterY":"500000","lensCenterX":"536325","lensCenterY":"500000","warpX":"2300000","warpY":"220000","warpZ":"240000","warpW":"0","absScaleX":"0","absScaleY":"0","absScaleInX":"900","absScaleInY":"900","absScreenCenterX":"0","absScreenCenterY":"0","absLensCenterX":"0","absLensCenterY":"0","absWarpX":"0","absWarpY":"0","absWarpZ":"0","absWarpW":"0","absChroma":"0","absIpd":"500","scaleYawTrackBar":"30","scalePitchTrackBar":"15","scaleRollTrackBar":"0","invertYawCheckBox":"0","invertPitchCheckBox":"0","invertRollCheckBox":"0","previewCheckBox":"1","scaleXTrackBar":"1","scaleYTrackBar":"1","scaleZTrackBar":"1","positionPluginNameComboBox":"0","borderFixLeftTrackBar":"0","borderFixRightTrackBar":"0","borderFixTopTrackBar":"0","borderFixBottomTrackBar":"0","zoomTrackBar":"100","zoomCenterPivotCheckBox":"0","wifiHotspotCheckBox":"0","simpleMode":"0","deadZoneTrackBar":"0","dpiFixCheckBox":"0","precisionMouseCheckBox":"0","queueFramesCheckBox":"1","bruteCheckCheckBox":"1","nvidiaOptimizedCheckBox":"0","lowColorButton":"buttonface","highColorButton":"buttonface","steamVRSourceCheckBox":"0","leftTriggerComboBox":"RESET","centerTriggerComboBox":"RESET","rightTriggerComboBox":"ZOOM","useMoonlightCheckBox":"0","brightnessTrackBar":"500","contrastTrackBar":"500","nsdCheckCheckBox":"1","extSteamVRComboBox":"-1","headZOffsetTrackBar":"0","headYOffsetTrackBar":"0","driftCompensationCheckBox":"0","yawOffsetTrackBar":"0","pitchOffsetTrackBar":"0","steamVRSyncCheckBox":"0","steamVRIPDtrackBar":"600","steamVRHookCaptureCheckBox":"1"}

BIN
bin/App1.jar View File


BIN
bin/Application1/Fenetre$1.class View File


BIN
bin/Application1/Fenetre$2.class View File


BIN
bin/Application1/Fenetre$3.class View File


BIN
bin/Application1/Fenetre.class View File


BIN
bin/Application1/carte$1.class View File


BIN
bin/Application1/carte$2.class View File


BIN
bin/Application1/carte$3.class View File


BIN
bin/Application1/carte$4.class View File


BIN
bin/Application1/carte$5.class View File


BIN
bin/Application1/carte$6.class View File


BIN
bin/Application1/carte$7.class View File


BIN
bin/Application1/carte$8.class View File


BIN
bin/Application1/carte$9.class View File


BIN
bin/Application1/carte.class View File


BIN
bin/External_Software/Glovepie/Bird.dll View File


BIN
bin/External_Software/Glovepie/CStereoI.dll View File


BIN
bin/External_Software/Glovepie/D3DX81ab.dll View File


BIN
bin/External_Software/Glovepie/EMADevice_DLL.DLL View File


BIN
bin/External_Software/Glovepie/GlovePIE.exe View File


+ 28
- 0
bin/External_Software/Glovepie/GlovePIE.exe.manifest View File

@@ -0,0 +1,28 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3
+  <assemblyIdentity
4
+    type="win32"
5
+    name="CodeGear RAD Studio"
6
+    version="11.0.2627.5503" 
7
+    processorArchitecture="*"/>
8
+  <dependency>
9
+    <dependentAssembly>
10
+      <assemblyIdentity
11
+        type="win32"
12
+        name="Microsoft.Windows.Common-Controls"
13
+        version="6.0.0.0"
14
+        publicKeyToken="6595b64144ccf1df"
15
+        language="*"
16
+        processorArchitecture="*"/>
17
+    </dependentAssembly>
18
+  </dependency>
19
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
20
+    <security>
21
+      <requestedPrivileges>
22
+        <requestedExecutionLevel
23
+          level="requireAdministrator"
24
+          uiAccess="false"/>
25
+        </requestedPrivileges>
26
+    </security>
27
+  </trustInfo>
28
+</assembly>

+ 6
- 0
bin/External_Software/Glovepie/GlovePIE.ini View File

@@ -0,0 +1,6 @@
1
+[EditorForm]
2
+FormVersion=0
3
+
4
+[EditorForm\TEditorForm.FileRecentManager]
5
+Item_0=C:\Users\nunes\Desktop\Travail\PIR\Software\Glovepie\WiimoteScripts\Test.PIE
6
+

BIN
bin/External_Software/Glovepie/GlovePIE_Bird_5DT.exe View File


+ 28
- 0
bin/External_Software/Glovepie/GlovePIE_Bird_5DT.exe.manifest View File

@@ -0,0 +1,28 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3
+  <assemblyIdentity
4
+    type="win32"
5
+    name="CodeGear RAD Studio"
6
+    version="11.0.2627.5503" 
7
+    processorArchitecture="*"/>
8
+  <dependency>
9
+    <dependentAssembly>
10
+      <assemblyIdentity
11
+        type="win32"
12
+        name="Microsoft.Windows.Common-Controls"
13
+        version="6.0.0.0"
14
+        publicKeyToken="6595b64144ccf1df"
15
+        language="*"
16
+        processorArchitecture="*"/>
17
+    </dependentAssembly>
18
+  </dependency>
19
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
20
+    <security>
21
+      <requestedPrivileges>
22
+        <requestedExecutionLevel
23
+          level="requireAdministrator"
24
+          uiAccess="false"/>
25
+        </requestedPrivileges>
26
+    </security>
27
+  </trustInfo>
28
+</assembly>

BIN
bin/External_Software/Glovepie/HAT3DIPC.dll View File


+ 188
- 0
bin/External_Software/Glovepie/MouseScripts/MouseParty.pie View File

@@ -0,0 +1,188 @@
1
+// Click the RUN Button above -^ to start,
2
+// The mice must be plugged in before pressing RUN.
3
+
4
+// Don't click the title bar of THIS window with the REAL mouse or it
5
+// will freeze! This includes when it is minimized to the desktop.
6
+// You can click title bars of other windows with the real mouse, and
7
+// you can click this window's title bar with any fake mouse.
8
+// If it freezes, use Alt+Tab to fix it.
9
+
10
+// The mice will move slowly over GlovePIE's window because of the
11
+// syntax highlighter. Minimise GlovePIE to see it properly.
12
+
13
+// This script has mouse 1 controlling the real mouse pointer, and up
14
+// to 3 other mice controlling fake mouse pointers. The fake mouse
15
+// pointers will have a coloured number next to them.
16
+
17
+// All mouse pointers start in the same spot as the original cursor
18
+// until you move them.
19
+
20
+if starting then
21
+  cursor2.visible = false
22
+  cursor3.visible = false
23
+  cursor4.visible = false
24
+endif
25
+
26
+// The real cursor is now only controlled by mouse 1
27
+mouse.Swallow = true
28
+fakemouse.DirectInputX = mouse1.DirectInputX
29
+fakemouse.DirectInputY = mouse1.DirectInputY
30
+mouse.LeftButton = mouse1.LeftButton
31
+mouse.RightButton = mouse1.RightButton
32
+mouse.MiddleButton = mouse1.MiddleButton
33
+mouse.XButton1 = mouse1.XButton1
34
+mouse.XButton2 = mouse1.XButton2
35
+
36
+// Show a fake cursor 2
37
+if mouse2.present but not var.shown2 then
38
+  cursor2.visible = true
39
+  var.Mouse2x = mouse.CursorPosX
40
+  var.Mouse2y = mouse.CursorPosY
41
+  var.shown2 = true
42
+endif
43
+
44
+// Show a fake cursor 3
45
+if mouse3.present but not var.shown3 then
46
+  cursor3.visible = true
47
+  var.Mouse3x = mouse.CursorPosX
48
+  var.Mouse3y = mouse.CursorPosY
49
+  var.shown3 = true
50
+endif
51
+
52
+// Show a fake cursor 4
53
+if mouse4.present but not var.shown4 then
54
+  cursor4.visible = true
55
+  var.Mouse4x = mouse.CursorPosX
56
+  var.Mouse4y = mouse.CursorPosY
57
+  var.shown4 = true
58
+endif
59
+
60
+// Do mouse pointer 2
61
+if mouse2.present then
62
+  // How much has mouse 2 moved?
63
+  var.deltax2 = Delta(mouse2.DirectInputX)
64
+  var.deltay2 = Delta(mouse2.DirectInputY)
65
+
66
+  // Mouse ballistics attempt
67
+  var.velocity = ([(smooth(var.deltaX2) / 24ms) in inches per second, (smooth(var.deltaY2) / 24ms) in inches per second] )
68
+  var.speed = |var.velocity|
69
+  if var.speed <= 0.2 then
70
+    var.deltax2 = var.deltax2 * 2
71
+    var.deltay2 = var.deltay2 * 2
72
+  endif
73
+  if var.speed > 0.2 and var.speed <= 0.4 then
74
+    var.deltax2 = var.deltax2 * 4
75
+    var.deltay2 = var.deltay2 * 4
76
+  endif
77
+  if var.speed > 0.4 and var.speed <= 1.25 then
78
+    var.deltax2 = var.deltax2 * 7
79
+    var.deltay2 = var.deltay2 * 7
80
+  endif
81
+  if var.speed > 1.25 and var.speed <= 3.9 then
82
+    var.deltax2 = var.deltax2 *12 //* 7
83
+    var.deltay2 = var.deltay2 *12 //* 7
84
+  endif
85
+  if var.speed > 3.9 then
86
+    var.deltax2 = var.deltax2 * 20// * 13.77
87
+    var.deltay2 = var.deltay2 * 20// * 13.77
88
+  endif
89
+  var.Mouse2x = var.Mouse2x pixels + (var.deltax2 in pixels)
90
+  var.Mouse2y = var.Mouse2y pixels + (var.deltay2 in pixels)
91
+  if var.Mouse2x < screen.DesktopLeft then var.Mouse2x = screen.DesktopLeft
92
+  if var.Mouse2x > screen.DesktopRight then var.Mouse2x = screen.DesktopRight
93
+  if var.Mouse2y < screen.DesktopTop then var.Mouse2y = screen.DesktopTop
94
+  if var.Mouse2y > screen.DesktopBottom then var.Mouse2y = screen.DesktopBottom
95
+endif
96
+Cursor2.PosX = var.Mouse2x
97
+Cursor2.PosY = var.Mouse2y
98
+Cursor2.LeftButton = mouse2.LeftButton
99
+Cursor2.RightButton = mouse2.RightButton
100
+Cursor2.MiddleButton = mouse2.MiddleButton
101
+
102
+// Do mouse pointer 3
103
+if mouse3.present then
104
+  // How much has mouse 2 moved?
105
+  var.deltax3 = Delta(mouse3.DirectInputX)
106
+  var.deltay3 = Delta(mouse3.DirectInputY)
107
+
108
+  // Mouse ballistics attempt
109
+  var.velocity = ([(smooth(var.deltaX3) / 24ms) in inches per second, (smooth(var.deltaY3) / 24ms) in inches per second] )
110
+  var.speed = |var.velocity|
111
+  if var.speed <= 0.2 then
112
+    var.deltax3 = var.deltax3 * 2
113
+    var.deltay3 = var.deltay3 * 2
114
+  endif
115
+  if var.speed > 0.2 and var.speed <= 0.4 then
116
+    var.deltax3 = var.deltax3 * 4
117
+    var.deltay3 = var.deltay3 * 4
118
+  endif
119
+  if var.speed > 0.4 and var.speed <= 1.25 then
120
+    var.deltax3 = var.deltax3 * 7
121
+    var.deltay3 = var.deltay3 * 7
122
+  endif
123
+  if var.speed > 1.25 and var.speed <= 3.9 then
124
+    var.deltax3 = var.deltax3 *12 //* 7
125
+    var.deltay3 = var.deltay3 *12 //* 7
126
+  endif
127
+  if var.speed > 3.9 then
128
+    var.deltax3 = var.deltax3 * 20// * 13.77
129
+    var.deltay3 = var.deltay3 * 20// * 13.77
130
+  endif
131
+  var.Mouse3x = var.Mouse3x pixels + (var.deltax3 in pixels)
132
+  var.Mouse3y = var.Mouse3y pixels + (var.deltay3 in pixels)
133
+  if var.Mouse3x < screen.DesktopLeft then var.Mouse3x = screen.DesktopLeft
134
+  if var.Mouse3x > screen.DesktopRight then var.Mouse3x = screen.DesktopRight
135
+  if var.Mouse3y < screen.DesktopTop then var.Mouse3y = screen.DesktopTop
136
+  if var.Mouse3y > screen.DesktopBottom then var.Mouse3y = screen.DesktopBottom
137
+endif
138
+Cursor3.PosX = var.Mouse3x
139
+Cursor3.PosY = var.Mouse3y
140
+Cursor3.LeftButton = mouse3.LeftButton
141
+Cursor3.RightButton = mouse3.RightButton
142
+Cursor3.MiddleButton = mouse3.MiddleButton
143
+
144
+// Do mouse pointer 4
145
+if mouse4.present then
146
+  // How much has mouse 2 moved?
147
+  var.deltax4 = Delta(mouse4.DirectInputX)
148
+  var.deltay4 = Delta(mouse4.DirectInputY)
149
+
150
+  // Mouse ballistics attempt
151
+  var.velocity = ([(smooth(var.deltaX4) / 24ms) in inches per second, (smooth(var.deltaY4) / 24ms) in inches per second] )
152
+  var.speed = |var.velocity|
153
+  if var.speed <= 0.2 then
154
+    var.deltax4 = var.deltax4 * 2
155
+    var.deltay4 = var.deltay4 * 2
156
+  endif
157
+  if var.speed > 0.2 and var.speed <= 0.4 then
158
+    var.deltax4 = var.deltax4 * 4
159
+    var.deltay4 = var.deltay4 * 4
160
+  endif
161
+  if var.speed > 0.4 and var.speed <= 1.25 then
162
+    var.deltax4 = var.deltax4 * 7
163
+    var.deltay4 = var.deltay4 * 7
164
+  endif
165
+  if var.speed > 1.25 and var.speed <= 3.9 then
166
+    var.deltax4 = var.deltax4 *12 //* 7
167
+    var.deltay4 = var.deltay4 *12 //* 7
168
+  endif
169
+  if var.speed > 3.9 then
170
+    var.deltax4 = var.deltax4 * 20// * 13.77
171
+    var.deltay4 = var.deltay4 * 20// * 13.77
172
+  endif
173
+  var.Mouse4x = var.Mouse4x pixels + (var.deltax4 in pixels)
174
+  var.Mouse4y = var.Mouse4y pixels + (var.deltay4 in pixels)
175
+  if var.Mouse4x < screen.DesktopLeft then var.Mouse4x = screen.DesktopLeft
176
+  if var.Mouse4x > screen.DesktopRight then var.Mouse4x = screen.DesktopRight
177
+  if var.Mouse4y < screen.DesktopTop then var.Mouse4y = screen.DesktopTop
178
+  if var.Mouse4y > screen.DesktopBottom then var.Mouse4y = screen.DesktopBottom
179
+endif
180
+Cursor4.PosX = var.Mouse4x
181
+Cursor4.PosY = var.Mouse4y
182
+Cursor4.LeftButton = mouse4.LeftButton
183
+Cursor4.RightButton = mouse4.RightButton
184
+Cursor4.MiddleButton = mouse4.MiddleButton
185
+
186
+
187
+
188
+

BIN
bin/External_Software/Glovepie/NPClient.dll View File


+ 559
- 0
bin/External_Software/Glovepie/PIE.html View File

@@ -0,0 +1,559 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+<html>
3
+<head>
4
+  <title>Programmable Input Emulator 0.41</title>
5
+                    
6
+  <meta http-equiv="content-type"
7
+ content="text/html; charset=ISO-8859-1">
8
+           
9
+  <meta name="author" content="Carl Kenner">
10
+</head>
11
+  <body>
12
+     
13
+<h1>Programmable Input Emulator 0.41 Introduction</h1>
14
+   <br>
15
+
16
+(Don't forget to also read the Documentation.rtf file)<p>
17
+   The GlovePIE Programmable Input Emulator (previously known as PIE) emulates input devices 
18
+by using other input devices.<br>
19
+   This means you can use the joystick in a keyboard only game (eg. DOOM3)
20
+ or the keyboard in a joystick only game (eg. Return Of The King Co-op mode). 
21
+ Or you can control any game with a virtual reality glove. Or you can create 
22
+ macros to do complex moves at the touch of a button (eg. Mortal Kombat). 
23
+Or you can play musical instruments from your PC.<br>
24
+   <br>
25
+   This is still a beta version, so it will be buggy and incomplete.<br>
26
+     
27
+<h2>You can emulate:</h2>
28
+     
29
+<ul>
30
+     <li>the mouse</li>
31
+     <li>the keyboard (on windows 2000 and XP)</li>
32
+     <li>Multiple joysticks or gamepads (if you download and install PPJoy)</li>
33
+     <li>Multiple MIDI devices (if you download and install Midi Yoke or
34
+Hubi's  loopback driver)</li>
35
+     <li>Microphone input (in theory)</li>
36
+     
37
+</ul>
38
+   <br>
39
+     
40
+<h2>You can get input from:</h2>
41
+     
42
+<ul>
43
+     <li>multiple mice</li>
44
+     <li>multiple keyboards</li>
45
+     <li>multiple joysticks or gamepads</li>
46
+     <li>Multiple Essential Reality P5 virtual reality gloves</li>
47
+     <li>multiple MIDI devices</li>
48
+     <li>a microphone</li>
49
+     
50
+</ul>
51
+   <br>
52
+     
53
+<h2>Requirements:</h2>
54
+     
55
+<ul>
56
+     <li>DirectX 8 or higher</li>
57
+     <li>PPJoy if you want to use virtual joysticks</li>
58
+     <li>Midi Yoke if you want to emulate MIDI
59
+input</li>
60
+     <li>Windows 2000 or above if you want to emulate the keyboard</li>
61
+     <li>SAPI 5.0 (Comes with Windows XP and Office XP) or SAPI 5.1 if you
62
+ want speech synthesis and recognition</li>
63
+     
64
+</ul>
65
+   I highly recommend buying an Essential Reality P5 virtual reality glove. 
66
+ They are very cheap. You can do wonderous 
67
+things with a virtual reality glove and PIE! Actually you should buy two since
68
+they are cheap and you save on shipping if you buy both at once.<br>
69
+   <br>
70
+     
71
+<h2>Installing:</h2>
72
+   <br>
73
+   Just extract the ZIP file into whatever folder you want. &nbsp;There is
74
+ no installation program.<br>
75
+   You will also need to download and install PPJoy and Midi Yoke if you
76
+want  to use them. After you install PPJoy you need to create at least one
77
+virtual  joystick.<br>
78
+   You should associate .PIE files with GlovePIE in windows, so you can just click 
79
+ on PIE scripts and open them in GlovePIE.<br>
80
+   <br>
81
+     
82
+<h2>Uninstalling:</h2>
83
+   Just delete the folder you installed GlovePIE into.<br>
84
+   You may also want to remove or change the association for .PIE files.<br>
85
+   <br>
86
+     
87
+<h2>Running:</h2>
88
+   You can start GlovePIE by double clicking on its icon in windows explorer,
89
+or  by double clicking on a .PIE file if you have set up the associations.
90
+You  can also start it from a command prompt (aka DOS window), or create
91
+a shortcut  to it on your desktop, quick-launch bar, or start menu. <br>
92
+   <br>
93
+   By default, when PIE starts it displays an empty script window. You can
94
+ write a new PIE script there, or you can load an existing file from the
95
+file  menu. But it will not actually do anything until you choose "Run" from
96
+the  "Run!" menu. Then it will check your script for errors and run it. If
97
+there  are any errors it will just ignore those lines. When you have finished
98
+playing  you can choose "Stop" from the "Run!" menu. PIE will not emulate
99
+anything  unless it is running. Exiting PIE by closing its window will stop
100
+all emulation.  You can also just check your program for errors without running
101
+it by choosing  "Check for errors" from the "Run" menu. If there are any
102
+errors a box will  pop up at the bottom of the window with a list of errors
103
+and line numbers.  If nothing appears then there are no errors. You can tell
104
+when your script  is running because the title bar at the top of the window
105
+will change.<br>
106
+   <br>
107
+   If you run PIE from the command prompt or a shortcut then you can specify 
108
+ command line parameters. You must use quotation marks around any parameter 
109
+ which includes a space.<br>
110
+     
111
+<table cellpadding="2" cellspacing="2" border="1" width="60%">
112
+     <tbody>
113
+       <tr>
114
+         <td valign="top"><i>filename.PIE</i><br>
115
+         </td>
116
+         <td valign="top">The name of a PIE script to open. You may or may
117
+ not include the .PIE extension. The script will not do anything until you
118
+ choose "Run" from the "Run!" menu.<br>
119
+         </td>
120
+       </tr>
121
+       <tr>
122
+         <td valign="top">                     
123
+      <pre>-<i>filename.PIE</i></pre>
124
+         </td>
125
+         <td valign="top">The name of a PIE script to open and run. You may 
126
+ or may not include the .PIE extension. It will start running automatically<br>
127
+         </td>
128
+       </tr>
129
+       <tr>
130
+         <td valign="top">                     
131
+      <pre>/r:<i>filename.EXE</i></pre>
132
+         </td>
133
+         <td valign="top">The name of a .EXE file or other program to start 
134
+ running automatically when PIE starts. This allows you to start the game 
135
+and PIE at the same time.<br>
136
+         </td>
137
+       </tr>
138
+           
139
+  </tbody>   
140
+</table>
141
+   <br>
142
+   <br>
143
+     
144
+<h2>Menus:</h2>
145
+   PIE has the following menus:<br>
146
+   <br>
147
+     
148
+<table cellpadding="2" cellspacing="2" border="1" width="100%">
149
+     <tbody>
150
+       <tr>
151
+         <td valign="top">File<br>
152
+         </td>
153
+         <td valign="top"><br>
154
+         </td>
155
+         <td valign="top">Standard file menu. Except the only way to save 
156
+files  is by choosing "Save As..."<br>
157
+         </td>
158
+       </tr>
159
+       <tr>
160
+         <td valign="top">File<br>
161
+         </td>
162
+         <td valign="top">New<br>
163
+         </td>
164
+         <td valign="top">Clears the script window. You will lose your work 
165
+ if you haven't saved it.<br>
166
+         </td>
167
+       </tr>
168
+       <tr>
169
+         <td valign="top">File<br>
170
+         </td>
171
+         <td valign="top">Open...<br>
172
+         </td>
173
+         <td valign="top">Load a PIE script file. This will not start it
174
+running  until you choose "Run" from the "Run!" menu. <br>
175
+   You will lose your work if you haven't saved it.<br>
176
+         </td>
177
+       </tr>
178
+       <tr>
179
+         <td valign="top">File<br>
180
+         </td>
181
+         <td valign="top">Save As...<br>
182
+         </td>
183
+         <td valign="top">The only way to save a file. If you don't use this 
184
+ you will lose your work! <br>
185
+   You need to choose the filename every time. Sorry.<br>
186
+         </td>
187
+       </tr>
188
+       <tr>
189
+         <td valign="top">File<br>
190
+         </td>
191
+         <td valign="top">Exit<br>
192
+         </td>
193
+         <td valign="top">Quit PIE and stop emulating anything. Please save 
194
+ your work before you choose this. <br>
195
+   It will NOT ask you whether you want to save.<br>
196
+         </td>
197
+       </tr>
198
+       <tr>
199
+         <td valign="top">Edit<br>
200
+         </td>
201
+         <td valign="top"><br>
202
+         </td>
203
+         <td valign="top">Standard edit commands<br>
204
+         </td>
205
+       </tr>
206
+       <tr>
207
+         <td valign="top">Run!<br>
208
+         </td>
209
+         <td valign="top"><br>
210
+         </td>
211
+         <td valign="top">The Run menu is for running and checking your script. 
212
+ It won't emulate anything unless it is running.<br>
213
+         </td>
214
+       </tr>
215
+       <tr>
216
+         <td valign="top">Run!<br>
217
+         </td>
218
+         <td valign="top">Check for errors<br>
219
+         </td>
220
+         <td valign="top">Check the script for errors. This was called "Compile" 
221
+ in the previous version. <br>
222
+   Only use this while your program is not running.<br>
223
+   A box will pop up at the bottom of the window if there are any errors. 
224
+Errors  will also be highlighted in red.<br>
225
+   You can single-click on an error in the box to go to that line.<br>
226
+         </td>
227
+       </tr>
228
+       <tr>
229
+         <td valign="top">Run!<br>
230
+         </td>
231
+         <td valign="top">Run<br>
232
+         </td>
233
+         <td valign="top">Start your script going. This starts the actual 
234
+emulation  process. <br>
235
+   Basically it will just loop through your script about 40 times per second.<br>
236
+   If there are any errors they will be highlighted and included in the error 
237
+ box, but the script will still run and just ignore those lines.<br>
238
+   The script will keep running until you chose "Stop" from the "Run!" menu, 
239
+ or try to close the PIE window.<br>
240
+   While running, your script may move the cursor around or press keys which 
241
+ may do bad things to the PIE window if it is in the foreground.<br>
242
+   I recommend starting notepad and placing it in the foreground while you
243
+ are running a script that presses keys.<br>
244
+         </td>
245
+       </tr>
246
+       <tr>
247
+         <td valign="top">Run!<br>
248
+         </td>
249
+         <td valign="top">Stop<br>
250
+         </td>
251
+         <td valign="top">Stops your script running. You should do this before 
252
+ you check for errors or run your program again. <br>
253
+   You don't need to do this before closing the window, that will stop it 
254
+automatically.<br>
255
+         </td>
256
+       </tr>
257
+       <tr>
258
+         <td valign="top">Settings<br>
259
+         </td>
260
+         <td valign="top"><br>
261
+         </td>
262
+         <td valign="top">Turns the P5 gloves' mouse mode off, or brings
263
+up  Control Panel applets for the various input devices PIE uses.<br>
264
+         </td>
265
+       </tr>
266
+       <tr>
267
+         <td valign="top">Settings<br>
268
+         </td>
269
+         <td valign="top">Turn P5 Mouse Mode Off<br>
270
+         </td>
271
+         <td valign="top">If you have any P5 virtual reality gloves connected, 
272
+ this will switch off mouse mode for all of them. <br>
273
+   Don't do this while your script is running or the P5 will no longer work 
274
+ with it.<br>
275
+         </td>
276
+       </tr>
277
+       <tr>
278
+         <td valign="top">Settings<br>
279
+         </td>
280
+         <td valign="top">Control Panel<br>
281
+         </td>
282
+         <td valign="top">Starts control panel<br>
283
+         </td>
284
+       </tr>
285
+       <tr>
286
+         <td valign="top">Settings<br>
287
+         </td>
288
+         <td valign="top">P5<br>
289
+         </td>
290
+         <td valign="top">This will bring up the P5 control panel (for your 
291
+ virtual reality glove) if it is installed.<br>
292
+   You can calibrate or test your bend sensors, change the mouse mode settings, 
293
+ or test the buttons.<br>
294
+   This is the original Essential Reality version that only supports a single 
295
+ glove. If you want to calibrate or change the settings for multiple gloves, 
296
+ you should download the Dual Mode Driver and use its VBControlPanel instead.<br>
297
+         </td>
298
+       </tr>
299
+       <tr>
300
+         <td valign="top">Settings<br>
301
+         </td>
302
+         <td valign="top">PPJoy<br>
303
+         </td>
304
+         <td valign="top">Brings up the PPJoy control panel, if PPJoy is
305
+installed.  This allows you to add virtual joysticks or set the number of
306
+buttons, axes  and hats the virtual joystick has. You can also chose which
307
+axes or hats correspond to analog0 to analog15, and what buttons or hats
308
+correspond to digital0 to digital31.<br>
309
+         </td>
310
+       </tr>
311
+       <tr>
312
+         <td valign="top">Settings<br>
313
+         </td>
314
+         <td valign="top">Joystick<br>
315
+         </td>
316
+         <td valign="top">Brings up the Game Controllers or Joystick control 
317
+ panel. It allows you to test your virtual joystick. I don't recommend calibrating 
318
+ virtual joysticks.<br>
319
+         </td>
320
+       </tr>
321
+       <tr>
322
+         <td valign="top">Settings<br>
323
+         </td>
324
+         <td valign="top">Mouse<br>
325
+         </td>
326
+         <td valign="top">Brings up the mouse control panel.<br>
327
+         </td>
328
+       </tr>
329
+       <tr>
330
+         <td valign="top">Settings<br>
331
+         </td>
332
+         <td valign="top">Keyboard<br>
333
+         </td>
334
+         <td valign="top">Brings up the keyboard control panel.<br>
335
+         </td>
336
+       </tr>
337
+       <tr>
338
+         <td valign="top">Settings<br>
339
+         </td>
340
+         <td valign="top">MIDI<br>
341
+         </td>
342
+         <td valign="top">Brings up the closest thing to a MIDI control panel. 
343
+ This should allow you to chose which MIDI device you want to use as the default
344
+ output.<br>
345
+         </td>
346
+       </tr>
347
+       <tr>
348
+         <td valign="top">Settings<br>
349
+         </td>
350
+         <td valign="top">Speech<br>
351
+         </td>
352
+         <td valign="top">Tries to bring up the Speech control panel to change 
353
+ the default text to speech voice. This may not work if the SAPI is not installed 
354
+ in the default directory.<br>
355
+         </td>
356
+       </tr>
357
+       <tr>
358
+         <td valign="top">TroubleShooter<br>
359
+         </td>
360
+         <td valign="top"><br>
361
+         </td>
362
+         <td valign="top">This menu allows you to disable features that you 
363
+ don't think are working or are giving you errors. The settings are not saved 
364
+ between sessions. <br>
365
+   It was designed for an error some people got with the joystick, but those 
366
+ error messages no longer appear so it is unnecessary.<br>
367
+         </td>
368
+       </tr>
369
+       <tr>
370
+         <td valign="top">Help<br>
371
+         </td>
372
+         <td valign="top"><br>
373
+         </td>
374
+         <td valign="top">Get help on PIE.<br>
375
+         </td>
376
+       </tr>
377
+           
378
+  </tbody>   
379
+</table>
380
+   <br>
381
+   <br>
382
+     
383
+<h2>Scripting Tutorial:</h2>
384
+     
385
+<h3>Tutorial 1 - easy stuff</h3>
386
+   Lets make a pie script to simulate pressing the W, A, S and D keys when
387
+ you press the arrow keys.<br>
388
+   This will not work on Windows 98.<br>
389
+   <br>
390
+   Start up PIE.<br>
391
+   Choose the "File" Menu, then click "New". This will clear whatever was 
392
+in  the big white box so you can type your own script.<br>
393
+   We want the W key to be controlled by the up key so type this on one line 
394
+ then press Enter:<br>
395
+   <br>
396
+   W = Up<br>
397
+   <br>
398
+   This is a working PIE Script so you can test it by choosing the "Run!" 
399
+menu  and clicking "Run". <br>
400
+   <br>
401
+   Whenever you press the up arrow key (on the cursor pad, not the numeric
402
+ keypad) it will type a "w". Try it out! This will work in any program.<br>
403
+   Note that it will still move the cursor up. The Up arrow key still has 
404
+its  original function, but it emulates a w at the same time. Try holding 
405
+down  shift and pressing Up. It will type a capital W, unless capslock is 
406
+on. Unlike  the real "W" key, holding down the Up arrow will only type a single
407
+"w".<br>
408
+   <br>
409
+   Now chose the "Run!" menu and click "Stop". This will return our keyboard 
410
+ to normal.<br>
411
+   <br>
412
+   Now do the other keys like this:<br>
413
+   <br>
414
+   A = Left<br>
415
+   S = Down<br>
416
+   D = Right<br>
417
+   <br>
418
+   (Don't worry if the S is orange, that is because S is also an abbreviation 
419
+ for seconds).<br>
420
+   <br>
421
+   Save your script as Tutorial1.PIE by chosing the "File" menu then "Save
422
+ As...".<br>
423
+   And run it again. Stop it when you have finished playing.<br>
424
+   <br>
425
+   You can change it to use any keys you want. You can even use keys that 
426
+don't  exist on your keyboard, like the MediaPlay key which is on some multimedia 
427
+ keyboards. If you don't know what a key is called, just guess. It is not 
428
+fussy about the key names. You could have written this and it would still 
429
+work:<br>
430
+   <br>
431
+   W = UpArrow<br>
432
+   A = CursorLeft<br>
433
+   <br>
434
+   If you want to make it clear that it is a key on the keyboard, you can 
435
+type  this:<br>
436
+   <br>
437
+   key.W = key.Up<br>
438
+   <br>
439
+   (When you type the dot it will pop up with a list of keys. If you can't
440
+ get out of this, click somewhere in the PIE window. Then press Control +
441
+Space and the list will pop up again, but this time it should work. If not,
442
+choose the "Troubleshooter" menu and click "Disable Code Completion")<br>
443
+   <br>
444
+   or this:<br>
445
+   <br>
446
+   keyboard.W = keyboard.Up<br>
447
+   <br>
448
+   or even this:<br>
449
+   <br>
450
+   keyboard's W = UpArrow of Keyboard<br>
451
+   <br>
452
+   <br>
453
+     
454
+<h3>Tutorial 2 - emulating a joystick</h3>
455
+   This time we will control a virtual joystick using the keyboard.<br>
456
+   This will only work if you have downloaded and installed PPJoy.<br>
457
+   <br>
458
+   This is not really much harder to do in PIE than the keyboard, but we
459
+have  know how to use PPJoy and the joystick control panel first. So please
460
+be patient.<br>
461
+   <br>
462
+   Start PIE.<br>
463
+   Click File/New.<br>
464
+   <br>
465
+   But before we write our script, we need to make sure PPJoy is set up correctly.<br>
466
+   Chose the "Settings" menu and click "PPJoy".<br>
467
+   If PPJoy is installed it should pop up with a window titled &nbsp;"PPJoy 
468
+ Joystick and Gamepad Configuration Utility".<br>
469
+   There is a big white list box in the middle of the window with the heading 
470
+ "Configured joysticks". One of the items in the list needs to be "Virtual 
471
+ Joystick 1".<br>
472
+   <br>
473
+   If Virtual Joystick 1 is not there, or the box is empty then you need
474
+to  do the following:<br>
475
+     
476
+<ul>
477
+     <li>click the "Add..." button.</li>
478
+     <li>Where it says "Parallel port" choose "Virtual port"</li>
479
+     <li>Where it says "Controller number" choose "Controller 1"</li>
480
+     <li>Click the "Add" button</li>
481
+     <li>Now wait and go through the hardware setup dialog boxes that pop 
482
+up</li>
483
+     <li>Choose the default options in any dialog boxes</li>
484
+     <li>Be patient, it needs to find and install several drivers</li>
485
+     
486
+</ul>
487
+   Regardless of whether it was there before, or you just added it, you should 
488
+ have a "Virtual Joystick 1" in the list box. Select it and choose "Mapping". 
489
+ It will pop up with the dialog box saying "Welcome to the Joystick/Pad mapping 
490
+ wizard". If it doesn't work then you probably weren't patient enough in the
491
+ previous step. Choose "Set a custom mapping for this controller" (which should
492
+ already be selected) and click "Next &gt;".&nbsp; Now you can choose how
493
+many axes, buttons and hats the virtual joystick should have, and which axes
494
+they are. Leave the default settings and click "Next &gt;". Now you can choose
495
+ which analog inputs control which axes. You will notice that analog0 controls
496
+ the x axis (horizontal), and analog1 controls the y axis (vertical). These
497
+ are good defaults so click "Next &gt;". Now you can choose which digital
498
+inputs should control which buttons. Notice digital 0 controls joystick button
499
+1, and digital 1 controls joystick button 2. These are also good defaults
500
+so choose next. Now you can choose which analog or digital inputs control
501
+the imaginary hats on the top of the joystick. One will be controlled by
502
+digitals 16-19 and the other will be controlled by analog 8. These are good
503
+defaults too, so click Next and then Finish.<br>
504
+   <br>
505
+   Click "Done" in the PPJoy control panel and go back to PIE.<br>
506
+   <br>
507
+   We can test the virtual joystick we just made by choosing the "Settings" 
508
+ menu and chosing "Joystick". This will open up the joystick control panel. 
509
+ Choose PPJoy Virtual Joystick 1 and click "Properties". Now it will pop up
510
+ with another dialog box, choose the "Test" tab. This displays all the axes
511
+ and buttons on the virtual joystick. They should all be in the middle.<br>
512
+   <br>
513
+   Now lets make a PIE script to control the virtual joystick. Assuming your 
514
+ screen resolution is 1024 by 768, Type the following:<br>
515
+   <br>
516
+   ppjoy.analog0 = (mouse.cursorposx - 512) / 512<br>
517
+   <br>
518
+   Remember how analog 0 was the x axis in the mapping before? Well it was. 
519
+ <br>
520
+  <br>
521
+  The above line sets the analog 0 value for virtual joystick 1 to a number 
522
+ between -1 and 1 depending on the location of the mouse cursor on the screen.<br>
523
+   <br>
524
+   Now run your script by choosing Run/Run on the menu. Go back to the Joystick 
525
+ control panel's test tab and see how the horizontal position of the cross 
526
+ in the box is controlled by the mouse.<br>
527
+   <br>
528
+   Now let's do the same for the y axis (384 is half the screen height):<br>
529
+   <br>
530
+   ppjoy.analog1 = &nbsp;(mouse.cursorposy - 384) / 384<br>
531
+   <br>
532
+   This works because PIE uses joystick values between -1 and 1. The cursor 
533
+ position is in pixels from 0 to 767. Subtracting 384 gives a value between 
534
+ -384 and 383. Dividing by 384 gives a value between -1 and (almost) 1.<br>
535
+   <br>
536
+   There is an easier way to do the exact same above calculations in PIE:<br>
537
+   <br>
538
+   ppjoy.analog0 = MapRange(mouse.cursorposx, 0,1023, -1,1)<br>
539
+   ppjoy.analog1 = MapRange(mouse.cursorposy, 0,767, -1,1)<br>
540
+   <br>
541
+   Now let's do the buttons:<br>
542
+   <br>
543
+   ppjoy.digital0 = mouse.LeftButton<br>
544
+   ppjoy.digital1 = mouse.RightButton<br>
545
+   ppjoy.digital2 = mouse.MiddleButton<br>
546
+   ppjoy.digital3 = mouse.XButton1<br>
547
+   ppjoy.digital4 = mouse.XButton2<br>
548
+   <br>
549
+   Now run your script and test it in the joystick control panel or a game. 
550
+ You should be able to control the joystick with the mouse.<br>
551
+   <br>
552
+   If you wanted to control virtual joystick 2, you would just change ppjoy
553
+ to ppjoy2.<br>
554
+  eg. ppjoy2.digital0 = mouse.LeftButton<br>
555
+  <br>
556
+  <br>
557
+ 
558
+</body>
559
+</html>

BIN
bin/External_Software/Glovepie/PPT.dll View File


BIN
bin/External_Software/Glovepie/RPPM3Csafe.dll View File


BIN
bin/External_Software/Glovepie/RPPM3DDI.dll View File


BIN
bin/External_Software/Glovepie/RPPM3USB.dll View File


+ 21
- 0
bin/External_Software/Glovepie/SixaxisScripts/LegoIndianaJonesSIXAXIS.PIE View File

@@ -0,0 +1,21 @@
1
+// Lego Indiana Jones, SIXAXIS, by Carl Kenner
2
+WASD = sixaxis1.LeftStick + sixaxis1.DPad
3
+Enter = sixaxis1.Start
4
+Esc = sixaxis1.Select
5
+U = sixaxis1.cross
6
+H = sixaxis1.square or sixaxis1.Stabbing
7
+J = sixaxis1.circle or sixaxis1.SwingVertical
8
+K = sixaxis1.triangle
9
+Space = sixaxis1.R1
10
+LCtrl = sixaxis1.L1
11
+
12
+ArrowKeys = sixaxis2.LeftStick + sixaxis2.DPad
13
+NumpadEnter = sixaxis2.Start
14
+F2 = sixaxis2.Select
15
+Numpad5 = sixaxis2.cross
16
+Numpad1 = sixaxis2.square or sixaxis2.Stabbing
17
+Numpad2 = sixaxis2.circle or sixaxis2.SwingVertical
18
+Numpad3 = sixaxis2.triangle
19
+NumPad0 = sixaxis2.R1
20
+RCtrl = sixaxis2.L1
21
+

+ 29
- 0
bin/External_Software/Glovepie/VoiceScripts/MouseVoiceCommands.pie View File

@@ -0,0 +1,29 @@
1
+if said("stop") then
2
+  var.speed = [0, 0]
3
+end if
4
+
5
+if said("slow") then
6
+  var.speed = var.speed / 2
7
+end if
8
+
9
+if said("fast") then
10
+  var.speed = var.speed * 2
11
+end if
12
+
13
+if said("left") then
14
+  var.speed = [-3, 0]
15
+end if
16
+
17
+if said("right") then
18
+  var.speed = [3, 0]
19
+end if
20
+
21
+if said("up") then
22
+  var.speed = [0, -2]
23
+end if
24
+
25
+if said("down") then
26
+  var.speed = [0, 2]
27
+end if
28
+
29
+mouse.DirectInput2D += var.speed

+ 25
- 0
bin/External_Software/Glovepie/WiimoteScripts/LegoIndianaJonesWiimoteNunchuk.PIE View File

@@ -0,0 +1,25 @@
1
+// Lego Indiana Jones, Wiimote+Nunchuk, by Carl Kenner
2
+WASD = nunchuk1.Joy + Wiimote1.DPad
3
+Enter = Wiimote1.Plus
4
+Esc = Wiimote1.Minus
5
+U = Wiimote1.A
6
+H = Wiimote1.B or Wiimote1.Stabbing or Nunchuk1.Stabbing
7
+J = Nunchuk1.Z or Wiimote1.SwingVertical
8
+K = nunchuk1.C
9
+Space = Wiimote1.One
10
+LCtrl = Wiimote1.Two
11
+
12
+H = (Nunchuk1.Shake) and (not Nunchuk1.Z)
13
+
14
+ArrowKeys = nunchuk2.Joy + Wiimote2.DPad
15
+NumpadEnter = Wiimote2.Plus
16
+F2 = Wiimote2.Minus
17
+Numpad5 = Wiimote2.A
18
+Numpad1 = Wiimote2.B or Wiimote2.Stabbing or Nunchuk2.Stabbing
19
+Numpad2 = nunchuk2.Z or Wiimote2.SwingVertical
20
+Numpad3 = nunchuk2.C
21
+NumPad0 = Wiimote2.One
22
+RCtrl = Wiimote2.Two
23
+
24
+Numpad1 = (Nunchuk2.Shake) and (not Nunchuk2.Z)
25
+

+ 13
- 0
bin/External_Software/Glovepie/WiimoteScripts/WiimoteScript.PIE View File

@@ -0,0 +1,13 @@
1
+var.ButtonFreezeTime = 250ms
2
+var.PointerBump = KeepDown(Pressed(wiimote.A),var.ButtonFreezeTime) or KeepDown(Pressed(wiimote.B),var.ButtonFreezeTime)
3
+Wiimote.Led1 = true
4
+
5
+var.MoveButton = wiimote.B
6
+mouse.LeftButton = wiimote.A
7
+mouse.RightButton = wiimote.Plus
8
+mouse.MiddleButton = wiimote.Down
9
+
10
+if wiimote.PointerVisible but not var.PointerBump then
11
+mouse.x = wiimote.PointerX
12
+mouse.y = wiimote.PointerY
13
+end if

+ 66
- 0
bin/External_Software/Glovepie/WiimoteScripts/lednerg WiiMotion Plus Mouse.PIE View File

@@ -0,0 +1,66 @@
1
+/*
2
+    WiiMotion Plus Mouse                                  v 2010.01.14
3
+    by lednerg
4
+
5
+    Emulates the basic functionality of a Gyration Air Mouse.
6
+    Requires GlovePIE version .42 or higher.
7
+
8
+    Leave the Wiimote on your desk when starting so it can calibrate.
9
+    Hold B to move, A = Left-Click, + = Right-Click, Down = Middle-Click.
10
+*/
11
+
12
+var.MoveButton = wiimote.B
13
+mouse.LeftButton = wiimote.A
14
+mouse.RightButton = wiimote.Plus
15
+mouse.MiddleButton = wiimote.Down
16
+
17
+var.Speed = 75   // 0 to 100
18
+
19
+PIE.FrameRate = 120hz
20
+if wiimote.HasMotionPlus = false then debug = "WiiMotion Plus NOT DETECTED!"
21
+if wiimote.HasMotionPlus = true and var.MoveButton = true {
22
+   var.YawSpeed = wiimote.MotionPlus.YawSpeed
23
+   var.PitchSpeed = wiimote.MotionPlus.PitchSpeed
24
+   if SameValue( Smooth(wiimote.SmoothRoll, 10), wiimote.SmoothRoll, 10) then var.Roll = Smooth(wiimote.SmoothRoll, 10) else var.Roll = wiimote.SmoothRoll
25
+   if var.Roll < 0 and var.Roll >= -90 {
26
+      var.XYswap = 1 - EnsureMapRange(var.Roll, -90, 0, 0, 1)
27
+      var.RightDown = -1
28
+      var.TopUp = 1
29
+   }
30
+   if var.Roll <= 90 and var.Roll >= 0 {
31
+      var.XYswap = 1 - EnsureMapRange(var.Roll, 90, 0, 0, 1)
32
+      var.RightDown = 1
33
+      var.TopUp = 1
34
+   }
35
+   if var.Roll > 90 and var.Roll <= 180 {
36
+      var.XYswap = 1 - EnsureMapRange(var.Roll, 90, 180, 0, 1)
37
+      var.RightDown = 1
38
+      var.TopUp = -1
39
+   }
40
+   if var.Roll < -90 and var.Roll >= -180 {
41
+      var.XYswap = 1 - EnsureMapRange(var.Roll, -90, -180, 0, 1)
42
+      var.RightDown = -1
43
+      var.TopUp = -1
44
+   }
45
+   var.SpeedX = var.TopUp * var.YawSpeed - ( var.TopUp * var.YawSpeed * var.XYswap ) + ( var.RightDown * var.PitchSpeed * var.XYswap )
46
+   var.SpeedY = var.TopUp * var.PitchSpeed - ( var.TopUp * var.PitchSpeed * var.XYswap) + ( -var.RightDown * var.YawSpeed * var.XYswap )
47
+   mouse.DirectInputX = int(var.MouseX)
48
+   mouse.DirectInputY = int(var.MouseY)
49
+   var.MouseX = var.MouseX + ( var.SpeedX / (10500000 - EnsureMapRange(var.Speed, 0, 100, 0, 10000000) ) )
50
+   var.MouseY = var.MouseY - ( var.SpeedY / (10500000 - EnsureMapRange(var.Speed, 0, 100, 0, 10000000) ) )
51
+/* // for mouse.x and mouse.y instead
52
+   mouse.x = var.MouseX
53
+   mouse.y = var.MouseY
54
+   var.MouseX = var.MouseX + ( var.SpeedX / (20500 - EnsureMapRange(var.Speed, 0, 100, 0, 20000) ) )
55
+   var.MouseY = var.MouseY - ( var.SpeedY / (20500 - EnsureMapRange(var.Speed, 0, 100, 0, 20000) ) )
56
+*/
57
+}
58
+if var.MoveButton = false {
59
+   var.MouseX = mouse.DirectInputX
60
+   var.MouseY = mouse.DirectInputY
61
+/* // for mouse.x and mouse.y instead
62
+   var.MouseX = mouse.x
63
+   var.MouseY = mouse.y
64
+*/
65
+}
66
+

+ 8267
- 0
bin/External_Software/Glovepie/documentation.rtf
File diff suppressed because it is too large
View File


BIN
bin/External_Software/Glovepie/edk.dll View File


BIN
bin/External_Software/Glovepie/edk_utils.dll View File


BIN
bin/External_Software/Glovepie/fglove.dll View File


BIN
bin/External_Software/Glovepie/p5dll.dll View File


+ 67
- 0
bin/External_Software/Glovepie/pielog.txt View File

@@ -0,0 +1,67 @@
1
+(0, 07-mai-2020 11:32:54) Initializing PieLog
2
+(0, 07-mai-2020 11:32:54) Initializing filemode variable
3
+(0, 07-mai-2020 11:32:54) Initializing PieSpeech
4
+(0, 07-mai-2020 11:32:54) Initializing PieVariables
5
+(0, 07-mai-2020 11:32:54) Initializing PieCursorUnit
6
+(0, 07-mai-2020 11:32:54) Initializing PieMouse
7
+(0, 07-mai-2020 11:32:54) Initializing PieKeyboard
8
+(0, 07-mai-2020 11:32:54) Initializing PieInput
9
+(0, 07-mai-2020 11:32:54) Initializing PieOSC
10
+(0, 07-mai-2020 11:32:54) Initializing PiePie
11
+(0, 07-mai-2020 11:32:54) Initializing PieFunction
12
+(0, 07-mai-2020 11:32:54) Initializing PieStatement
13
+(0, 07-mai-2020 11:32:54) Initializing PieExpression
14
+(0, 07-mai-2020 11:32:54) Initializing PieJoystick
15
+(0, 07-mai-2020 11:32:54) Initializing PieP5
16
+(0, 07-mai-2020 11:32:54) Initializing PieMidi
17
+(0, 07-mai-2020 11:32:54) Initializing PiePPJoy
18
+(0, 07-mai-2020 11:32:54) Initializing PieRemote
19
+(0, 07-mai-2020 11:32:54) Initializing Pie Speech Recognition
20
+(0, 07-mai-2020 11:32:54) Initializing PieScreen
21
+(0, 07-mai-2020 11:32:54) GetMonitorEDID
22
+(0, 07-mai-2020 11:32:54) Initializing PieWIndow
23
+(0, 07-mai-2020 11:32:54) Initializing PieCursors
24
+(0, 07-mai-2020 11:32:54) Initializing PieZ800
25
+(0, 07-mai-2020 11:32:54) Initializing PieIntersense
26
+(0, 07-mai-2020 11:32:54) Initializing PieFastrak
27
+(0, 07-mai-2020 11:32:54) Initializing PiePPT
28
+(0, 07-mai-2020 11:32:54) Initializing PieTrackIR
29
+(0, 07-mai-2020 11:32:54) Initializing PiePinch
30
+(0, 07-mai-2020 11:32:54) Starting main
31
+(0, 07-mai-2020 11:32:54) Application object initialized
32
+(0, 07-mai-2020 11:32:54) Creating main window
33
+(0, 07-mai-2020 11:32:54) EditorForm.Create
34
+(0, 07-mai-2020 11:32:54) Checking command line parameters:
35
+(0, 07-mai-2020 11:32:54) Creating debug window
36
+(0, 07-mai-2020 11:32:54) Assigning exception handler
37
+(0, 07-mai-2020 11:32:54) Creating debug remote control window
38
+(0, 07-mai-2020 11:32:54) Running application
39
+(0, 07-mai-2020 11:32:57) FormCloseQuery
40
+(0, 07-mai-2020 11:32:57) Compile>Stop
41
+(0, 07-mai-2020 11:32:57) Application finished
42
+(0, 07-mai-2020 11:32:57) Destroying EditorForm
43
+(0, 07-mai-2020 11:32:57) Finalizing PiePinch
44
+(0, 07-mai-2020 11:32:57) Finalizing PieTrackIR
45
+(0, 07-mai-2020 11:32:57) Finalizing PiePPT
46
+(0, 07-mai-2020 11:32:57) Finalizing PieFastrak
47
+(0, 07-mai-2020 11:32:57) Finalizing PieIntersense
48
+(0, 07-mai-2020 11:32:57) Finalizing PieZ800
49
+(0, 07-mai-2020 11:32:57) Finalizing PieCursors
50
+(0, 07-mai-2020 11:32:57) Finalizing PieWindow
51
+(0, 07-mai-2020 11:32:57) Finalizing PieScreen
52
+(0, 07-mai-2020 11:32:57) Finalizing Pie Speech Recognition
53
+(0, 07-mai-2020 11:32:57) Finalizing PieRemote
54
+(0, 07-mai-2020 11:32:57) Finalizing PiePPJoy
55
+(0, 07-mai-2020 11:32:57) Finalizing PieMidi
56
+(0, 07-mai-2020 11:32:57) Finalizing PieP5
57
+(0, 07-mai-2020 11:32:57) Finalizing PieJoystick
58
+(0, 07-mai-2020 11:32:57) Finalizing PieStatement
59
+(0, 07-mai-2020 11:32:57) Finalizing PieFunction
60
+(0, 07-mai-2020 11:32:57) Finalizing PiePie
61
+(0, 07-mai-2020 11:32:57) Finalizing PieOSC
62
+(0, 07-mai-2020 11:32:57) Finalizing PieKeyboard
63
+(0, 07-mai-2020 11:32:57) Finalizing PieMouse
64
+(0, 07-mai-2020 11:32:57) Finalizing PieVariables
65
+(0, 07-mai-2020 11:32:57) Finalizing PieSpeech
66
+(0, 07-mai-2020 11:32:57) Finalizing PieLog
67
+(0, 07-mai-2020 11:32:57) Closing log file

+ 1933
- 0
bin/External_Software/Glovepie/readme.txt
File diff suppressed because it is too large
View File


BIN
bin/External_Software/Glovepie/thinkgear.dll View File


BIN
bin/External_Software/TGsetup.exe View File


BIN
bin/Images/Install_Wiimote/1.PNG View File


BIN
bin/Images/Install_Wiimote/2.PNG View File


BIN
bin/Images/Install_Wiimote/3.PNG View File


BIN
bin/Images/Install_Wiimote/4.PNG View File


BIN
bin/Images/Install_Wiimote/5.PNG View File


+ 4
- 2
src/Application1/Fenetre.java View File

@@ -40,7 +40,7 @@ public class Fenetre  extends JFrame implements ActionListener{
40 40
 	 private JButton boutonfininstall;
41 41
 	 private CardLayout cl;
42 42
 	 private FlowLayout fl;
43
-	 String[] listContent = {"CARD_1","CARD_2","CARD_3","CARD_4","CARD_5","CARD_6","CARD_7"};
43
+	 String[] listContent = {"CARD_1","CARD_2","CARD_3","CARD_4","CARD_5","CARD_6","CARD_7","CARD_8"};
44 44
 	 
45 45
 	 public int Indice = 0;
46 46
 	 public Graphics g ;
@@ -84,6 +84,7 @@ public class Fenetre  extends JFrame implements ActionListener{
84 84
 		 carte card5 = new carte (5,1);
85 85
 		 carte card6 = new carte (6,1);
86 86
 		 carte card7 = new carte (7,1);
87
+		 carte card8 = new carte(8,1);
87 88
 		 
88 89
 		
89 90
 		
@@ -110,6 +111,7 @@ public class Fenetre  extends JFrame implements ActionListener{
110 111
 		 conteneur.add(card5,listContent[4]);
111 112
 		 conteneur.add(card6,listContent[5]);
112 113
 		 conteneur.add(card7,listContent[6]);
114
+		 conteneur.add(card8,listContent[7]);
113 115
 		
114 116
 		
115 117
 	
@@ -139,7 +141,7 @@ public class Fenetre  extends JFrame implements ActionListener{
139 141
 	    
140 142
 	    boutonfininstall.addActionListener(new ActionListener() {
141 143
 	    	public void actionPerformed(ActionEvent event) {
142
-	    		cl.show(conteneur,"CARD_7");
144
+	    		cl.show(conteneur,"CARD_8");
143 145
 	    		
144 146
 	    		
145 147
 	    		

+ 152
- 29
src/Application1/carte.java View File

@@ -1,12 +1,16 @@
1 1
 package Application1;
2 2
 
3
+import java.awt.AWTException;
3 4
 import java.awt.Color;
5
+import java.awt.Desktop;
4 6
 import java.awt.FlowLayout;
5 7
 import java.awt.Graphics;
6 8
 import java.awt.GridLayout;
7 9
 import java.awt.Image;
8 10
 import java.awt.event.ActionEvent;
9 11
 import java.awt.event.ActionListener;
12
+import java.awt.event.InputEvent;
13
+import java.awt.event.KeyEvent;
10 14
 import java.io.File;
11 15
 import java.io.IOException;
12 16
 import java.util.concurrent.TimeUnit;
@@ -14,24 +18,45 @@ import java.util.concurrent.TimeUnit;
14 18
 import javax.imageio.ImageIO;
15 19
 import javax.swing.BorderFactory;
16 20
 import javax.swing.JButton;
21
+import javax.swing.JFileChooser;
17 22
 import javax.swing.JLabel;
18 23
 import javax.swing.JPanel;
19 24
 import javax.swing.JTextArea;
20 25
 import javax.swing.border.Border;
21 26
 import javax.swing.border.EtchedBorder;
22 27
 
28
+import java.awt.Robot;
29
+
23 30
 public class carte extends JPanel{
24 31
 	private int numero;
25 32
 	private Color couleur; // Background Color
26 33
 	
27
-	private int type; 
28
-	// type:= 1 => Installation
29
-	// type:= 2 => Fonctionnement
30
-	
34
+	private int type;
35
+	protected static String pathTrinus; 
36
+	protected static String pathRevit;
31 37
 	
32 38
 	
39
+	private String getPath () {
40
+		String path = ".";
41
+		int result = -99;
42
+		JFileChooser fileChooser = new JFileChooser();
43
+		
44
+			result = fileChooser.showOpenDialog(this);
45
+			if(result == JFileChooser.APPROVE_OPTION)
46
+			{
47
+				path = fileChooser.getSelectedFile().getAbsolutePath();
48
+			}
49
+		
50
+		
51
+		
52
+		System.out.println(path);
53
+		return path;
54
+		
55
+	}
33 56
 	
34 57
 	
58
+	// type:= 1 => Installation
59
+	// type:= 2 => Fonctionnement
35 60
 	public carte (int i, int t) {
36 61
 		
37 62
 		numero = i;
@@ -39,12 +64,14 @@ public class carte extends JPanel{
39 64
 		type = t;
40 65
 		int taille = 15; //taille police
41 66
 		
67
+		
42 68
 		Border border = BorderFactory.createEtchedBorder(EtchedBorder.RAISED);
43 69
 		Border blackline = BorderFactory.createLineBorder(Color.black);
44 70
 		Border compound;
45 71
 		compound = BorderFactory.createCompoundBorder(border, blackline);
46 72
 		JButton boutontest = new JButton("Test");
47 73
 		
74
+		
48 75
 		if (i==2) {
49 76
 			
50 77
 			
@@ -316,9 +343,10 @@ public class carte extends JPanel{
316 343
 			//Cadran 1 
317 344
 			
318 345
 			cadran1.setLayout(cad1);
346
+			cadran1.setBorder(compound);
319 347
 			
320 348
 			cadran1_1 = new TextPanel(taille);
321
-			cadran1_1.setBorder(compound);
349
+			
322 350
 			cadran1_1.AjouterParagraph("       \n");
323 351
 			cadran1_1.AjouterParagraph(" Maintenant nous devons installer la manette Wiimote.");;
324 352
 			cadran1_1.AjouterParagraph("Pour ça nous allons l'ajouter en tant que périphérique bluetooth."
@@ -350,12 +378,95 @@ public class carte extends JPanel{
350 378
 			add(cadran3);
351 379
 			add(cadran4);
352 380
 			
353
-			
381
+			BoutonInstallation.addActionListener(new ActionListener() {
382
+		    	public void actionPerformed(ActionEvent event) {
383
+		    		//Lancement du panneau de configuration
384
+					
385
+					Runtime rt = Runtime.getRuntime();
386
+					try {
387
+						rt.exec(new String[] {"cmd.exe","/c","start","control"});
388
+						
389
+					}catch (IOException e) {
390
+						e.printStackTrace();
391
+					}
392
+		    		
393
+		    		
394
+		    		
395
+		    		
396
+		    	}
397
+		    });
354 398
 			
355 399
 		
356 400
 	}
357 401
 		
358 402
 		else if (i==7) {
403
+			//Installation
404
+			TextPanel cadran1;
405
+			TextPanel cadran2;
406
+			JPanel cadran3;
407
+			JPanel cadran4;
408
+			JButton BoutonVarEnvTrinus;
409
+			JButton BoutonVarEnvRevit;
410
+			
411
+			GridLayout grid = new GridLayout(2,2);
412
+			grid.setHgap(10);
413
+			grid.setVgap(10);
414
+			setLayout(grid);
415
+			
416
+			
417
+			//Cadran 1
418
+			cadran1 = new TextPanel(taille);
419
+			cadran1.AjouterParagraph("Veuillez indiquer ou vous avez installé le logiciel Trinus. ");
420
+			cadran1.AjouterParagraph("Vous pouvez selectionner directement le fichier de lancement présent sur votre bureau.");
421
+			cadran1.AjouterParagraph("Ou alors donner le chemin du logiciel dans la racine. Typiquement le logiciel s'installe dans le dossier \"Program Files\"");
422
+			cadran1.setEditable(false);
423
+			cadran1.setBorder(compound);
424
+			// Cadran 2
425
+			cadran2 = new TextPanel(taille);
426
+			cadran2.AjouterParagraph("Veuillez indiquer ou vous avez installé le logiciel de CAD. De préferance Revit, puisque notre système est optimisé pour l'utilisation de Revit. ");
427
+			cadran2.AjouterParagraph("Vous pouvez selectionner directement le fichier de lancement présent sur votre bureau.");
428
+			cadran2.AjouterParagraph("Ou alors donner le chemin du logiciel dans la racine. Typiquement le logiciel s'installe dans le dossier \"Program Files\"");
429
+			cadran2.setEditable(false);
430
+			cadran2.setBorder(compound);
431
+			
432
+			//Cadran 3 
433
+			cadran3 = new JPanel();
434
+			BoutonVarEnvTrinus = new JButton("Indiquer où se trouve le logiciel Trinus");
435
+			cadran3.add(BoutonVarEnvTrinus);
436
+			
437
+			//Cadran 4 
438
+			cadran4 = new JPanel();
439
+			BoutonVarEnvRevit = new JButton("Indiquer où se trouve le logiciel de CAD");
440
+			cadran4.add(BoutonVarEnvRevit);
441
+			
442
+			
443
+			
444
+			//Ajout des cadran
445
+			add(cadran1);
446
+			add(cadran2);
447
+			add(cadran3);
448
+			add(cadran4);
449
+					
450
+			BoutonVarEnvTrinus.addActionListener(new ActionListener() {
451
+		    	public void actionPerformed(ActionEvent event) {
452
+		    	 carte.pathTrinus = getPath();
453
+		    		System.out.println(pathTrinus);
454
+		    			
455
+		    	}
456
+		    });
457
+			
458
+			BoutonVarEnvRevit.addActionListener(new ActionListener() {
459
+		    	public void actionPerformed(ActionEvent event) {
460
+		    		carte.pathRevit = getPath();
461
+		    		System.out.println(pathRevit);
462
+		    			
463
+		    	}
464
+		    });
465
+			
466
+			
467
+				
468
+		}
469
+		else if (i==8) {
359 470
 			//Initialitsation
360 471
 			TextPanel cadran1;
361 472
 			JPanel cadran2;
@@ -397,14 +508,20 @@ public class carte extends JPanel{
397 508
 			BoutonGlovePie.addActionListener(new ActionListener() {
398 509
 		    	public void actionPerformed(ActionEvent event) {
399 510
 		    		//Lancement du panneau de configuration
400
-					
401
-					Runtime rt = Runtime.getRuntime();
402
-					try {
403
-						rt.exec(new String[] {"cmd.exe","/c","start","control"});
511
+		    		File file = new File("External_Software/Glovepie/WiimoteScripts/WiimoteScript.PIE");
512
+		    		java.awt.Desktop desktop = Desktop.getDesktop();
513
+		    		
514
+		    		try {
515
+		    			
516
+						desktop.open(file);
404 517
 						
405
-					}catch (IOException e) {
518
+						
519
+						
520
+						
521
+					} catch (IOException e) {
522
+						// TODO Auto-generated catch block
406 523
 						e.printStackTrace();
407
-					}
524
+					} 
408 525
 		    		
409 526
 		    		
410 527
 		    		
@@ -414,18 +531,20 @@ public class carte extends JPanel{
414 531
 			BoutonTrinus.addActionListener(new ActionListener() {
415 532
 		    	public void actionPerformed(ActionEvent event) {
416 533
 		    		//Lancement du panneau de configuration
534
+		    		System.out.println(pathTrinus);
417 535
 					
418
-					Runtime rt = Runtime.getRuntime();
419
-					try {
420
-						rt.exec(new String[] {"cmd.exe","/c","start","control"});
421
-						
422
-					}catch (IOException e) {
423
-						e.printStackTrace();
424
-					}
425
-		    		
426
-		    		
427
-		    		
428
-		    		
536
+						File file = new File(pathTrinus);
537
+			    		java.awt.Desktop desktop = Desktop.getDesktop();
538
+			    		
539
+			    		try {
540
+			    		
541
+							desktop.open(file);
542
+							
543
+						} catch (IOException e) {
544
+							// TODO Auto-generated catch block
545
+							e.printStackTrace();
546
+						}
547
+							
429 548
 		    	}
430 549
 		    });
431 550
 			
@@ -433,17 +552,20 @@ public class carte extends JPanel{
433 552
 		    	public void actionPerformed(ActionEvent event) {
434 553
 		    		//Lancement du panneau de configuration
435 554
 					
436
-					Runtime rt = Runtime.getRuntime();
437
-					try {
438
-						rt.exec(new String[] {"cmd.exe","/c","start","control"});
555
+
556
+					File file = new File(pathRevit);
557
+		    		java.awt.Desktop desktop = Desktop.getDesktop();
558
+		    		
559
+		    		try {
560
+		    		
561
+						desktop.open(file);
439 562
 						
440
-					}catch (IOException e) {
563
+					} catch (IOException e) {
564
+						// TODO Auto-generated catch block
441 565
 						e.printStackTrace();
442 566
 					}
443 567
 		    		
444 568
 		    		
445
-		    		
446
-		    		
447 569
 		    	}
448 570
 		    });
449 571
 			BoutonInternet.addActionListener(new ActionListener() {
@@ -495,6 +617,7 @@ public class carte extends JPanel{
495 617
 			
496 618
 			
497 619
 			
620
+		
498 621
 			
499 622
 		}
500 623
 	}

Loading…
Cancel
Save