Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

AHK + LUA Interop (stdlib), proof of concept


  • Please log in to reply
17 replies to this topic
  • Guests
  • Last active:
  • Joined: --
Stdlib scripts (like lua.ahk) are intended to be placed in a function library folder. That way #include is not necessary.

Guest_AutoHotkey_L
  • Guests
  • Last active:
  • Joined: --
In lua_ahkfunctions.ahk I see:

EnvSet(L)
{
   arg1 := lua_tostring(L, 1)
   arg2 := lua_tostring(L, 2)
   arg3 := lua_tostring(L, 3)
   arg4 := lua_tostring(L, 4)
   arg5 := lua_tostring(L, 5)

   EnvSet, %arg1%, %arg2%, %arg3%, %arg4%, %arg5%

   return 0
}
and
Pause(L)
{
   arg1 := lua_tostring(L, 1)
   arg2 := lua_tostring(L, 2)
   arg3 := lua_tostring(L, 3)
   arg4 := lua_tostring(L, 4)

   Pause, %arg1%, %arg2%, %arg3%, %arg4%

   return 0
}
In the AHK docs, I see 2 arguments for EnvSet and 2 arguments for Pause.

I am confused why there are 5 arguments for the former and 4 for the latter in lua_ahkfunctions.ahk. Any help with this?

inconu
  • Members
  • 1 posts
  • Last active: Feb 10 2011 09:50 PM
  • Joined: 09 Jan 2011
sorry for my bad english,

I just want to play mouse clicks with ahk script and calling this script from lua.

could you show me lua code ?