What can be passed through from 'send' mode, to 'insert command code' function.

Discussion, questions and support.
Post Reply
Marty123
Posts: 28
Joined: Apr 17th, ’22, 23:05

Post by Marty123 » Jun 30th, ’23, 14:22

What can be passed through from 'send' mode, to 'insert command code' function.

Hi Tom/Marko,

I tried to use this function (XL:=ComObjcreate("Excel.Application") in 'insert command code' under 'send' mode. the error i've gotten is "An outgoing call cannot be made since the application is dispatching an input-synchronous call".

Are there some functions that can be used in 'command' mode but cannot be used in 'insert command code' under 'send' mode?
User avatar
Marko
Posts: 1813
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jun 30th, ’23, 18:00

There are some limitations, one is with the Com objects. For using those I recommend saving the script as ahk file and run it with "Run" mode.
Marty123
Posts: 28
Joined: Apr 17th, ’22, 23:05

Post by Marty123 » Jul 1st, ’23, 14:41

Thanks Marko. I am obtaining multiple data from user thru 'manual input' in send mode, (because I like the rich interface in fastkeys) then would like to pass these variables to fill up an excel file. In command mode I am already familiar with all of the functions to do so, but like I said, send mode provide a visually appealing interface so I preferred that to command mode. However I am not sure of how to pass along these data derived from send mode and access my Excel file on my desktop to fill up certain cells
User avatar
Marko
Posts: 1813
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jul 5th, ’23, 19:34

I see what you mean. As mentioned COM object is currently not supported in such a way and you need to create a standalone script. You can use InputBox command to gather the data.
https://www.autohotkey.com/docs/v1/lib/InputBox.htm
Post Reply