PDA

View Full Version : LUA - send one command n times


Mastiff
January 31st, 2005, 12:47 PM
For a script I need to send a command the number of times that is defined in a variable. The command is easy:
WindowHandle = FindWindow ("MJFrame",nil)
result = PostMessage ( WindowHandle, 33768, 10008, 16777216)


The first part doesn't have to be repeated, though. The variable WindowHandle won't change, so it's only the second line I need.

Promixis
January 31st, 2005, 01:20 PM
for x = 1,n do
postmessage....
end

Mastiff
January 31st, 2005, 02:08 PM
Thanks, Mike! :D