Results 1 to 8 of 8

Thread: Key Pressed/Hotkeys Not working.. :( Help pls?

  1. #1
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default Key Pressed/Hotkeys Not working.. :( Help pls?

    Im trying to do a procedure that When a key is pressed, It opens a msg box for the user to type in and then sends the message to the SMART Client.. Or Sends the KeyPressed..

    But For some reason its NOT detecting If the F1 Key is pressed :S..

    reason for doing this Procedure: Dont like having to constantly press disable smart in order to type.. Id rather have a hotkey for typing..

    Is that even possible?? So far it works except that it doesnt detect the F1 key.. or any Hotkey Pressed..

    PHP Code:
    program new;
    {
    $DEFINE SMART}
    {
    $i srl\srl.scar}
    {
    $i reflection\reflection.simba}
    var
    Value string;

    Procedure ChatMessager;
    Begin
    If (IsFKeyDown(1)) then        //If Fkey is down then Open MessageBox Popup..
      
    Begin
       Value 
    := '';
       
    format('[%s] the value = [%s]',[booltostr(InputQuery('Enter A Message','ENTER HERE:',value)),value]);
       if 
    not (Value ''then     //If Value Is not *Blank* then Send User Message...
       
    begin
       TypeSend
    (value);
       
    end else
       if (
    Value 'Enter'then   //Type 'Enter' in the message box To Open QuickChat...
       
    begin
       SendKeys
    (Chr(13));
       
    end;
      
    end else
    If (
    IsKeyDown(27)) then       //If Escape key Pressed, SendKey *Escape*...
      
    Begin
        SendKeys
    (Chr(27));
      
    End;
    End;

    begin
    ChatMessager
    ;
    end
    Last edited by Brandon; 03-05-2011 at 09:53 PM.
    I am Ggzz..
    Hackintosher

  2. #2
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Loop the ChatMessager; procedure.

  3. #3
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    hmm... Not sure I made the question clear enough? How Would I go about doing that if the ChatMessager; is in a program like this (in the main loop):

    PHP Code:
    program new;
    {
    $DEFINE SMART}
    {
    $i srl\srl.scar}
    {
    $i reflection\reflection.simba}
    var
    Value string;

    Procedure ChatMessager;
    Begin
    If (IsFKeyDown(1)) then        //If Fkey is down then Open MessageBox Popup..
      
    Begin
       Value 
    := '';
       
    format('[%s] the value = [%s]',[booltostr(InputQuery('Enter A Message','ENTER HERE:',value)),value]);
       if 
    not (Value ''then     //If Value Is not *Blank* then Send User Message...
       
    begin
       TypeSend
    (value);
       
    end else
       if (
    Value 'Enter'then   //Type 'Enter' in the message box To Open QuickChat...
       
    begin
       SendKeys
    (Chr(13));
       
    end;
      
    end else
    If (
    IsKeyDown(27)) then       //If Escape key Pressed, SendKey *Escape*...
      
    Begin
        SendKeys
    (Chr(27));
      
    End;
    End;




    //Main Loop...
    begin
      R_FindRandoms
    ;

      
    R_OpenBankBooth('eb');
      
    OpenBankCheck;

      
    ChatMessager;  //<---- Here.. It's Inbetween Open Bank And Deposit bank..

      
    wait(2500);

      
    ChatMessager;  //<---- And Here..

      
    Repeat
      
    If(not(InvEmpty)) then
      begin
        depositall
    ;
      
    end;
    end
    I am Ggzz..
    Hackintosher

  4. #4
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, you need to loop it.

  5. #5
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    :S Not exactly sure If Im doing it right...
    PHP Code:
    begin
    Repeat
    ChatMessager
    ;
    Until(not(isFKeyDown(1)));
    end
    I am Ggzz..
    Hackintosher

  6. #6
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ^yes, but add some wait.
    or do
    SCAR Code:
    Mark := GetSystemTime;
    while (GetSystemTime - Mark < 2500) do
    begin
      ChatMessager;
      Wait(50);
    end;

  7. #7
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Sadly IsFKeyDown recognizes smart keypresses when smart is enabled. At least I had the problem last time I tried to recognize user input...

  8. #8
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    *sigh* Your right.. I noticed that just now after u posted.. I took out the lines:

    {$DEFINE SMART}
    {$i reflection\reflection.simba}

    And the keypress works... is there a way to get it to actually just work with smart?
    I am Ggzz..
    Hackintosher

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •