It is currently April 28th, 2024, 12:14 pm
Using WinAPI in Script Measure.
-
- Posts: 4
- Joined: July 31st, 2013, 9:31 am
Using WinAPI in Script Measure.
How to use WinAPI in script?
Last edited by GOST on August 1st, 2013, 8:10 am, edited 1 time in total.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Using WinAPI in Script Measure.
You can't.
-
- Posts: 4
- Joined: July 31st, 2013, 9:31 am
Re: Using WinAPI in Script Measure.
But, what you say about this:jsmorley wrote:You can't.
Code: Select all
require "alien"
f = alien.Kernel32.Beep
f:types{ret = 'long', abi = 'stdcall', 'long', 'long' }
print(f(500, 100))
print(f(550, 100))
print(f(600, 300))
f = alien.Kernel32.ExpandEnvironmentStringsA
f:types{ret = "long", abi = 'stdcall', "string", "pointer", "long" }
local buffer = alien.buffer(512)
f("%USERPROFILE%", buffer, 512)
print("%USERPROFILE% - " .. tostring(buffer))
f = alien.User32.MessageBoxA
f:types{ret = 'long', abi = 'stdcall', 'long', 'string', 'string', 'long' }
print(f(0, "Привет, MessageBoxA (stdcall)!", "Заголовок", 64))
-
- Developer
- Posts: 2688
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
-
- Posts: 4
- Joined: July 31st, 2013, 9:31 am
Re: Using WinAPI in Script Measure.
Okay! Than, another question: can i working with Windows Registry?
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Using WinAPI in Script Measure.
No, you can't.
Sent from my Kindle Fire using Tapatalk 2
Sent from my Kindle Fire using Tapatalk 2
-
- Posts: 4
- Joined: July 31st, 2013, 9:31 am
Re: Using WinAPI in Script Measure.
OK, thanks for help.