Log in

View Full Version : AutoHotKeys (Extensions)



Brandon
03-29-2011, 12:09 AM
KK I looked on wizzup's site documentation and searched for AutoHotKeys.. Nothing comes up.. Searched here, nothing comes up.. Googled and I get it for VB and other languages...


Im trying to implement it into an extension so that when the user presses a key while the simba window is minimized, it will have a form popup.

//I have:

MenuForm.AUTOHOTKEYS; //and that doesnt work. if I put MenuForm.Autohotkeys := dgsdgs; //doesnt work.

//if I put
MenuForm.AutoHotKeys := 'fdgd'; //doesnt work;
MenuForm.AutoHotKeys := 132; //doesnt work either.

//Tried
MenuForm.Autohotkeys:: #n //<-- means windowskey + n doesnt work..
MenuForm.Autohotkeys::KeyDown(123) := inputQuery(......);

//Tried
Procedure Userinput
begin
inputQuery(......);
end;

procedure Init;
begin
if (Keydown(123)) then
Userinput;
end;


Tried all this aswell:

Var I: integer;

Function Keypress: boolean; external;

Begin
I:=0;
Repeat
Writeln (I);
I:=I+1;
Until Keypress
End.

//OnKeyDown didnt work, onKeyPress, getkeystate, ReadKey didnt work either :S


Sigh nothing works and its not documented at all... So how do I use this or even do what Im trying to do?

i luffs yeww
03-29-2011, 12:28 AM
I'm very confus right now and didn't really look into what you're doing. There are some tuts on extensions that may help. Mimicking SRL.sex (to some extent) may help. Also, with keys, you can do #13; for char 13, or chr(13);. Also, VK_WHATEVER exist. To get a full list of the virtual keys (VK), check Simba sawse.

https://github.com/MerlijnWajer/Simba/blob/master/Units/MMLCore/mufasatypes.pas

Virtual Keys start at line 187 as of March 28, 2011, 5:28 PM PST.

Brandon
03-29-2011, 01:55 AM
Doesnt work... this is for an extension not a script... I checked all extensions but I dont see any of them with examples of how to catch a keypress in windows. or any platform..