This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 Action Scripts Using Alien
 Example Alien Script
 Forum Locked
 Printer Friendly
Author Previous Topic Topic   

Rob

USA
2615 Posts

Posted - 01/09/2012 :  06:37:54  Show Profile  Visit Rob's Homepage
(alien was built into S+ at 1.1.9)

Example Lua Script to directly call user32.dll to display a message box (not via the bound acMessageBox(), this is directly calling it):

   local alien = alien.core
   local mb = alien.load("user32.dll")
   local messagebox = mb.MessageBoxA
   messagebox:types{ ret = 'long', abi = 'stdcall', 'long', 'pointer', 'string', 'long' }
   test = "test"
   messagebox(0, test, "test2", 0)

Remember, alien.core and alien.struct are preloaded, so you do not need to add:

require "alien"

..in your Lua script (as many sample scripts on the Internet do), you will receive an error, unless the alien DLLs are somewhere in the path, but I'm not so sure they would play well together...so that's at your own risk.
  Previous Topic Topic   
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000