SendKeys or Keystrokes Using iLogic

SendKeys or Keystrokes Using iLogic

Anonymous
Not applicable
1,402 Views
7 Replies
Message 1 of 8

SendKeys or Keystrokes Using iLogic

Anonymous
Not applicable

Hi All,

 

I've looked around and done some research on this and it seems possible just I can't figure out how to do it.

 

I'm looking to send keystrokes programmically using iLogic as if the keys were actually being pressed. I just want to send a simple set of keys like "QQ".

 

Does anybody know how I would do this through iLogic? Or trigger a code that would allow me to send these keys.

 

Thanks

Mitch

0 Likes
1,403 Views
7 Replies
Replies (7)
Message 2 of 8

skyngu
Collaborator
Collaborator

sendkey is a bad coding practice. dont use it unless you have to.

Autodesk Inventor Professional 2019
0 Likes
Message 3 of 8

Anonymous
Not applicable

Thanls for the tip,

 

I'm new to programming though and have gone through the tutorials and the "My First Plug In" Guide but still have trouble understanding VB

 

I'm trying to start up the dialog box connected to a custom Add-In we use. This can normally be accessed by pressing the button in the "Add-Ins" Tab

 

OR

 

There is a short cut which can be customized through inventor for a keyboard shortcut (ie. "QQ")

 

I'm not sure how to start up the dialog box by accessing it through code. But I figure I can make the keyboard press the "QQ" a little easier

 

Again, Thanks for the help

Mitch

0 Likes
Message 4 of 8

Anonymous
Not applicable

Even if it is an improper method of programming, is there anyone who can tell me how to do this

0 Likes
Message 5 of 8

skyngu
Collaborator
Collaborator

under controldefinition-defaultshortcut or overrideshortcut

you can set the default shortcut assigned to the command. I use "u" to hide or open browser when I need "real" full screen. it is a small vba macro. But it should work in vb.net too.

 

good luck

Autodesk Inventor Professional 2019
0 Likes
Message 6 of 8

Anonymous
Not applicable
Hi jcneal,

Thank you for responding again, if I'm understanding correctly, what your telling me is how to change the hotkey used for a command. This I know how to do or can figure out, but I don't know how to, I guess you would say, programmically simulate as if a key was being pushed. Through research I found that it might be this sendkey, but I'm not sure how to program it to press, say, this "u" shortcut you have through a rule.

Thanks again
Mitch
0 Likes
Message 7 of 8

skyngu
Collaborator
Collaborator

hmm, my bad. i misunderstand your question. I mean physically press a key, not "programme" to press a key.

 

sorry i dont know how to do it.

 

just out of curious, why do you need to press keys by programme instead of purely programming?

Autodesk Inventor Professional 2019
0 Likes
Message 8 of 8

Anonymous
Not applicable

I've done some research on how to try and access the button through programming. But I can't seem to find how to do so. What I found was that I need to add reference to a .dll (which I found) but also the dialog box. I did not find the dialog box as it was installed by an outside source and I can't seem to locate it.

0 Likes