Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scripthook .NET Question

Featured Replies

Firstly, I'm sorry if this is in the wrong place. I have a question about Scripthook, however.

 

Recently I've started work on a callout script to sort of put my knowledge into one project- However due to a lack of scripthook documentation I'm running into a problem.

 

How exactly are modifiers on keypresses supposed to work? I know this should be basic, but I for the life of me cannot figure out how to trigger a keypress like Shift+K or whatever modifier the user specifies in the .ini file.

 

Any help would be greatly appreciated.

Okay, so the best thing to do is use the scripthook's BindKey functionalitiy.   You can bind a key and multiple modifiers to a method that will be called once that key is pressed.

 

The easiest way to get user configured keys is to also use the scripthook's inbuilt .ini functionality.  You can do this with Settings.GetValueKey(...).

"You tell me exactly what you want, and I will very carefully explain to you why it cannot be."

  • Author

Thanks, Sam!

 

I've managed to get the .ini settings loading but I couldn't figure out how to put those keys to use with a modifier. I didn't even realize a function like BindKey existed though.

 

I have another silly question, though. Is there a certain way to bind two keys at once? BindKey(Keys.Shift&Keys.O, new KeyPressDelegate(testMethod)); isn't working properly.

 

Thanks so much for your help!

Edited by Vocosol

Nope, you don't do it like that.   You use the parameters of BindKey to specifiy modifiers.  like BindKey(Keys.O, true, false, true...);

"You tell me exactly what you want, and I will very carefully explain to you why it cannot be."

  • Author

Ahh, leave it to me to miss the parameters entirely. I think I got it figured out then.

 

Thanks again for your help, Sam

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Similar Content

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.