Chatting Feature(Might not be possible)

Chatting Feature(Might not be possible)

Postby hiddenlurikeen » Tue Nov 14, 2017 12:16 am

So like in my HKN script when I push shift enter it disables the hotkeys to allow for typing. Not sure if this is something you would consider or could code I know I can just togglekeys and turn them off before typing but sometimes im lazy or forget lol

HKN Scriptlet
------------------
<hotkey shift enter>
<toggle>
<if activewinis daoc1>
<setvar chatting true>
<SendLabel daoc1,daoc2,daoc3, daoc4,daoc5,daoc6,daoc7,daoc8,daocc,daocb,daoca>
<key enter>

<toggle>
<if activewinis daoc1>
<setvar chatting false>
<SendLabel daoc1,daoc2,daoc3,daoc4,daoc5,daoc6,daoc7,daoc8,daocc,daocb,daoca>
<key enter>


<hotkey a-u,w-z, space, backspace, comma, period, minus, oem2>
<passthrough>
<if chatting is true>
<SendLabel daoc2, daoc3,daoc4,daoc5,daoc6,daoc7,daoc8,daocc,daocb>
<Key %trigger%>
hiddenlurikeen
 
Posts: 72
Joined: Thu Nov 02, 2017 4:15 pm

Re: Chatting Feature(Might not be possible)

Postby Rob » Tue Nov 14, 2017 7:00 am

Does this do what you want?

Code: Select all
Hotkey ( Shift Enter )
{
   Foreground ( daoc1 )
   ToggleHotkeys ();
}
Author of Mojo
Rob
Site Admin
 
Posts: 791
Joined: Sat Sep 25, 2010 6:52 am

Re: Chatting Feature(Might not be possible)

Postby hiddenlurikeen » Tue Nov 14, 2017 7:02 am

Rob wrote:Does this do what you want?

Code: Select all
Hotkey ( Shift Enter )
{
   Foreground ( daoc1 )
   ToggleHotkeys ();
}



At work will give it a try was actually just thinking of that tbh lol

I also added it to send enter

Hotkey ( Shift Enter )
{
Foreground ( daoc1 )
ToggleHotkeys ();
key (Enter)
}

Will give it a try once I get home for work
Last edited by hiddenlurikeen on Tue Nov 14, 2017 7:08 am, edited 1 time in total.
hiddenlurikeen
 
Posts: 72
Joined: Thu Nov 02, 2017 4:15 pm

Re: Chatting Feature(Might not be possible)

Postby Rob » Tue Nov 14, 2017 7:25 am

hiddenlurikeen wrote:I also added it to send enter

Might work better if you do it with passthrough.

Code: Select all
Hotkey ( Shift Enter passthrough )
{
   Foreground ( daoc1 )
   ToggleHotkeys ();
}

I hope Mojo's passthrough keyword works. I haven't tested it in years. It's supposed to work.
Author of Mojo
Rob
Site Admin
 
Posts: 791
Joined: Sat Sep 25, 2010 6:52 am

Re: Chatting Feature(Might not be possible)

Postby hiddenlurikeen » Tue Nov 14, 2017 5:06 pm

Rob wrote:
hiddenlurikeen wrote:I also added it to send enter

Might work better if you do it with passthrough.

Code: Select all
Hotkey ( Shift Enter passthrough )
{
   Foreground ( daoc1 )
   ToggleHotkeys ();
}

I hope Mojo's passthrough keyword works. I haven't tested it in years. It's supposed to work.


It didnt like daoc1 as foreground it said "daoc" or "any" are the only two options which isnt a big deal it works on any daoc client with daoc so it works also it didnt like the ; after toggle keys so final code was(In case anyone else was needing it)

Code: Select all
Hotkey ( Shift Enter passthrough )
{
   Foreground ( daoc )
   ToggleHotkeys ()
}
hiddenlurikeen
 
Posts: 72
Joined: Thu Nov 02, 2017 4:15 pm

Re: Chatting Feature(Might not be possible)

Postby Rob » Tue Nov 14, 2017 5:11 pm

Thanks for fixing my mistakes. I keep typing semicolons by mistake because I write Mojo in C++ which has semicolons.

Is passthrough working?

This isn't really perfect, is it, because it doesn't toggle hotkeys back on when you leave chat? Or do you leave it with Shift Enter?
Author of Mojo
Rob
Site Admin
 
Posts: 791
Joined: Sat Sep 25, 2010 6:52 am

Re: Chatting Feature(Might not be possible)

Postby hiddenlurikeen » Tue Nov 14, 2017 5:12 pm

Rob wrote:Thanks for fixing my mistakes. I keep typing semicolons by mistake because I write Mojo in C++ which has semicolons.

Is passthrough working?

This isn't really perfect, is it, because it doesn't toggle hotkeys back on when you leave chat?


yes it is working long as i push shift enter to open and send chat it toggles it perfectly(same as i had to do before). And ya I figured the ; was because of actually coding most the time you use it lol I took 4 years c++ and 2 years vbs
hiddenlurikeen
 
Posts: 72
Joined: Thu Nov 02, 2017 4:15 pm

Re: Chatting Feature(Might not be possible)

Postby Rob » Wed Nov 15, 2017 9:28 pm

hiddenlurikeen wrote:lol I took 4 years c++ and 2 years vbs

If you want to work on Mojo I'm sure I can find something for you to do. :)
Author of Mojo
Rob
Site Admin
 
Posts: 791
Joined: Sat Sep 25, 2010 6:52 am

Re: Chatting Feature(Might not be possible)

Postby hiddenlurikeen » Thu Nov 16, 2017 6:02 am

no thanks I hate c++ lol now visual basics i would consider it lol
hiddenlurikeen
 
Posts: 72
Joined: Thu Nov 02, 2017 4:15 pm

Re: Chatting Feature(Might not be possible)

Postby Rob » Thu Nov 16, 2017 7:00 am

If I had known this offer was gonna come along I would have picked a different language. :)
Author of Mojo
Rob
Site Admin
 
Posts: 791
Joined: Sat Sep 25, 2010 6:52 am


Return to Feature requests

Who is online

Users browsing this forum: No registered users and 2 guests