ID:1924307
 
(See the best response by Nadrew.)
Hey guys so I am trying to make it where you can select 9 skills and use them by holding down the letter D and pressing a number 1-9. HOw would I go about doing that?

You can do this using javascript/jquery or winset (I can be wrong about this one though).

With javascript you would want to do something like this:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> //You need to put this because we are using jquery.
<script>

var Combo1 = false; //If the D key is pressed
var Combo2 = false; //If a number key is pressed
var Combo2Key = 0; //The char code of the number key

$(document).ready(function(){ //wait for the document to load

$(document).keydown(function(e){
var KeyInformation = e.which || e.keyCode;
if(KeyInformation == 68){Combo1 = true;} //If the D key is pressed
if(KeyInformation >= 48 && KeyInformation <=57){Combo2 = true;Combo2Key=KeyInformation;}//If a number from 1-9 is pressed
if(Combo1== true && Combo2 == true){alert("ComboKey: D+"+String.fromCharCode(Combo2Key));} //If the 2 keys are pressed
});


$(document).keyup(function(e){
var KeyInformation = e.which || e.keyCode;
if(KeyInformation == 68){Combo1 = false;} //D key released
if(KeyInformation == Combo2Key){Combo2 = false;}//Number key released
});



});



</script>
</head>
<body>

</body>
</html>


If you press the D key and any number from 1-9 the computer will react (in this case I made the computer show you an alert message saying which keys you are pressing, like this "You are pressing D + 1" for example.


Run this code on a hidden browser and you should have no problems.
Best response
You're probably better off just using window macros in this case, just have macros for 1-9 tied to a verb that executes whatever's in that slot.

The javascript method is nice for certain things (like capturing all input), but it adds extra steps to the process (and overhead, but not a ton) needlessly. You're calling a lot of back-and-forth instead of just 'fires a macro, executes a verb'.

Check out the 'Skin Reference' under the 'Help' menu in Dream Maker for more information on macros. There's also a ton about them here on the forums.